Top Banner
uClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10- 20
39

UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

Mar 26, 2015

Download

Documents

Jordan Murray
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

uClinux on ARM7TDMI

Duke Cho

EmbeddedWeb Co., Ltd.

2nd Open Seminar

2002-10-20

Page 2: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-2- uClinux on ARM7TDMI2nd Open Seminar

Table of Contents• uClinux 소개

• uClinux 개발환경 (for ARM7TDMI)

• DYAUS 보드 소개

• 데모

Page 3: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-3- uClinux on ARM7TDMI2nd Open Seminar

uClinux

– History– What is uClinux?– Microcontroller Project (uCsimm)– uClinux Ports– RT-Kernel– Difference between Linux and uClinux

Page 4: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-4- uClinux on ARM7TDMI2nd Open Seminar

History• Jan 1998

The first ports of Linux to systems without a MMU was done by Kenneth Albanowski and D. Jeff Dionne

• Dec 1998 D. Jeff Dionne and Michael Durrant started work on

designing a simm module capability of using the uClinux code as an OS

• Feb 1999 uClinux was successfully ported to the Motorola MCF5206

and MCF5307 ColdFire® microprocessor

Page 5: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-5- uClinux on ARM7TDMI2nd Open Seminar

History (cont’)• 13 Sep 1999

Jeff and Michael have released uClinux 2.0.38.0

• 22 Oct 1999The uCsimm module Rt-Control Inc. created to run uClinux for embedded systems is now shipping

• 12 Apr 2000New uClinux version 2.0.38.1pre7 announced

• 16 Oct 2002the lastest uClinux version 2.5.43uc0 announced

Page 6: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-6- uClinux on ARM7TDMI2nd Open Seminar

What is uClinux?• A derivative of Linux 2.0 kernel intended for microcontro -llers

without MMUs• Pronounced "you-see-linux“• Free software under GNU Public License

Page 7: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-7- uClinux on ARM7TDMI2nd Open Seminar

What is uClinux? (cont’)• Linux vs. uClinux

– Multitasking can be tricky!!– Most of binaries and source code for the kernel have been

rewritten to tighten-up and slim-down the code base– The uClinux is much, much smaller than the original Linux

2.0 kernel, while retaining the main advantages of the Linux OS: stability, superior network capability(a full TCP/IP stack), and excellent file system support (Only NFS, ext2, MS-DOS and FAT16/32)

• common Linux API• uCKernel < 512 KB• uCKernel + tools < 900 KB

Page 8: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-8- uClinux on ARM7TDMI2nd Open Seminar

Microcontroller Project• The uCsimm module is a microcontroller module built

specifically for the uClinux OS• developed by Arcturus Networks Inc.(formerly Rt-Control Inc.)• Features:

– a 16 MHz 68EZ328 DragonBall microcontoller

– 2 MB Flash ROM– 8 MB DRAM– 21 general purpose I/O pins (or up to 13

with a graphic LCD panel enabled)– a built-in display driver, capable of driving a

monochrome LCD panel up to QVGA resolution (640x480)– RS-232 Serial Support– High speed (1Mbps) I2C or SPI 3 wire serial– a 3.3 Volt draw

Page 9: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-9- uClinux on ARM7TDMI2nd Open Seminar

uClinux Ports• Community members from all over the world have

been porting uClinux since its release in 1998• While originally developed for the Motorola 68000

chip, the number of available ports is always expanding

• Ported Microcontrollers and Microprocessors– Motorola DragonBall, and other 68K Derivatives– Motorola ColdFire– ARM7TDMI and MC68EN302– ETRAX– Intel i960– PRISMA– Atari 68K

• Several Devices running uClinux

Page 10: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-10- uClinux on ARM7TDMI2nd Open Seminar

uClinux Ports (cont’)• Motorola DragonBall, and other 68K Derivatives

– The first release to the public domain supporting the Motorola DragonBall(M68EZ328), M68238, and M68EN322

– Since then, uClinux has grown exponentially, as the worlds greatest MMU-less chip receive there own ports

• ARM7TDMI – Aplio ported APLIO/TRIO chip (ARM7TDMI) and MC68EN302– Built by standard uClinux 2.0.38 kernel– Applied ARM patches and uClinux patches

Page 11: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-11- uClinux on ARM7TDMI2nd Open Seminar

Real-Time Extension for uClinux• uClinux Real Time moves up to 1pre1 (Oct., 2000)

• Phil Wilshire has taken Kwonsk’s uClinux/RTL patches up to a later revision of uClinux

• This has run on a uCSimm but is NOT fully tested yet

• The Real Time Linux Portalhttp://www.realtimelinux.org/

Page 12: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-12- uClinux on ARM7TDMI2nd Open Seminar

Differences between Linux and uClinux• Memory Management

– The most significant difference is the lack of a MMU in uClinux

– uClinux removes the MMU requirement by implementing a flat memory model (a 1-to-1 virtual-to-physical mapping)

– uClinux allocates stack space at the end of the data for the executable

– On uClinux, memory is limited to whatever physical memory is available at a given time to a program

Page 13: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-13- uClinux on ARM7TDMI2nd Open Seminar

Differences between Linux and … (cont’)

• Linux Memory Map

Linuxw/ Virtual Memory

stack

heap

staticData

text

TOP ADDRD000-0000

(virtual)

Virtual Gap

~ 256 MB

Gaps Round to Next page

BASE ADDRC000-0000

(virtual)

uClinux

stack

heap

staticData

text

TOP ADDR00EA-6000

(physical)

BASE ADDR00E8-0000

(physical)

Heap Pages

Allocated Using MMAPFixed size Stack

No Gaps

Page 14: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-14- uClinux on ARM7TDMI2nd Open Seminar

Differences between Linux and … (cont’)

• Process Forking– Currently, the fork has not yet been implemented for any

current implementation of uClinux

– The use of vfork call or utilization of multiple threads instead of multiple processes can compensate for the lack of a working fork call in most cases

– As uClinux cannot implement the copy on write policy of Linux, user applications must be careful not to change the state of data in memory between vfork and exec calls

Page 15: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-15- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경

– Cross Development Tools– Libraries– Debug Concept / JTAG Emulators / Debugger– Initialize Debgger / Intialization Script

Page 16: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-16- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경

Debug Host

EmbeddedICE Interface

TAP Controller

ARMCore

EmbeddedICE macrocell

NET+40

Target System with NET+40

ROM

RAM

Peripheral

The NET+40 is one of the ARM core SoC, manufactured by NetSilicon Inc.

Page 17: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-17- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

Cross Development Tools– http://www.uclinux.org/pub/uClinux/arm-tools/

• binutils-2.11• gcc-2.95.3• gdb-5.0• elf2flt-20011203

– http://www.uclinux.org/pub/uClinux/dist/• binutils-2.10• gcc-2.95.3• gdb-5.0• elf2flt-20020218• genromfs-0.5.1

Page 18: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-18- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

Libraries• uClibc

- The latest version: uClibc 0.9.15- download: http://www.uclibc.org/downloads/

• uC-libc– The old uClibc version– download: http://www.uclinux.org/pub/uClinux/libraries/

Page 19: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-19- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

uClinux/distribution (Official Full Source)– The Latest snapshot source package is released on Sep.

27th, 2002– Support Architectures

• M68k• ColdFire• ARM• Sparc• i960• NEC v850• OPENcores OR1000

– Kernels• 2.0.39 and 2.4.19 kernel sources

– Libraries• the older uC-libc and newer uClibc

– Rich Application Sources

Page 20: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-20- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

uClinux/distribution (Official Full Source)

uClinux-distuClinux-dist

/NetSilicon /NetSilicon

/Samsung/Samsung

/Arcturus /Arcturus

tools for romfs

root file system

the newer uClibc

application programs

vendor products

for NET+40for S3C4510

for uCdimm and uCsimm

binbin

configconfig

DocumentationDocumentation

vendorsvendors

liblib

linux-2.0.xlinux-2.0.x

linux-2.4.xlinux-2.4.x

toolstools

uClibcuClibc

useruser

romfsromfs

uClinux-2.4.19

uClinux-2.0.19

the older uC-libc

configuration files for buid

NETtel binary filesmiscellaneous documents

Page 21: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-21- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

Debug Concept• ARM7TDMI contains hardware extensions for advanced debugging

features– The ARM7TDMI debug interface is based on IEEE Std.1149.1-1990,

“Standard Test Access Port and Boundary-Scan Architecture”– The debug extensions allow the core to be stopped either on a given

instruction fetch breakpoint / watchpoint

Page 22: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-22- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

JEENI (JTAG EmbeddedICE EtherNet Interface)

– Non-intrusive, uses no target resources & requires no porting to the target system

– ROMless booting– Supports ARM7 and ARM9 cores containing "DI" macrocells– Unlimited software breakpoints – Ethernet and serial I/O ports for fast, flexible host interface – High-speed download (>100k bytes per second) of application code – Network compatibility allows shared and remote operation – Internal ARM 710A cached processor assures fast operation – Four status LEDs for observing operation – Flash memory for easy firmware updates to next generation ARM cores – Vendor: Embedded Performance, Inc.

Page 23: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-23- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

JTAG Emulators

Wigglers

Raven

Macraigor System AIJI System

OPENice-A900

Multi-ICE

ARM

Page 24: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-24- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

• Building Software– GNU Cross Development Tools (gcc, as, ld, and etc.)– add an option “-gstabs” to an assembler– add an option “-g” to a compiler

• How to execute and debug the built image– by Monitor Program :

> download into a target RAM via user program (serial or Ethernet) > Debug : manually insert some debug codes such as print function

– by JEENI (EmbeddedICE) : > download into a target RAM or a RAM included in an ICE via gdb > Debug : can use advanced debug features, breakpoint, watchpoint and etc., via gdb

Page 25: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-25- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

Debugger

• Linux Platform (gdb or DDD)

– Breakpoints– Watchpoints– Backtrace– Disassembled code– Examine Memory– Examine Registers

GNU DDD is a graphical front-end for command-line debuggers such as GDB, DBX, WDB, Ladebug, JDB, XDB, the Perl debugger

Page 26: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-26- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

Initialize Debugger (change memory map)

Special Function Registers

CS 0

0xFFF00000

0x00000000

Memory Map after Reset Memory Map after Initialization

0xFF800000

Cache RAM0xFFFFFFFF

FP-DRAM (CS1)

USB & LEDs (CS4)

FLASH (blk 1) (CS0/2)

EEPROM (CS2/0)

0x00000000

0x10000000

0x01000000

0x10400000

0x20000000

0x30000000

0x40000000

16M

4M

1M

FLASH (blk 2) (CS0/2)0x10800000

LCD (CS3)

0x20100000

0x400010004K

0x300010004K

0x40000000

This memory map is for NetSilicon NET+40 MCU.

Page 27: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-27- uClinux on ARM7TDMI2nd Open Seminar

uClinux 개발환경 (cont’)

Initialize Debugger by script (When FLASH is at CS0)

Script for GDB

target rdi e=211.234.32.155

#target rdi /dev/ttyS0

set {long}0xffb00000 = 0xC004a000

set {long}0xffc00000 = 0x0dc00000

set (long)0xffc00054 = 0xfffffa40

set (long)0xffc00050 = 0x40000001

set (long)0xffc00044 = 0xfffffa40

set (long)0xffc00040 = 0x30000001

set (long)0xffc00034 = 0xfff80a40

set (long)0xffc00030 = 0x20000001

set (long)0xffc00024 = 0xff000090

set (long)0xffc00020 = 0x00000009

set (long)0xffc00014 = 0xff8002f4

set (long)0xffc00010 = 0x10000001

“.gdbinit” script file

Connect I/F (eth)

Connect I/F (serial)

FLASH (CS0)

DRAM (CS1)

EEPROM (CS2)

LCD (CS3)

USB&LED (CS4)

System Ctrl.

Memory Mod.

Page 28: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-28- uClinux on ARM7TDMI2nd Open Seminar

DYAUS

– DYAUS Product Family– DBoot Bootloader– emnux Kernel– Software Packages

Page 29: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-29- uClinux on ARM7TDMI2nd Open Seminar

DYAUS™• DYanamic All User Support• uClinux kernel-2.0.38pre7/2.4.17uc0

• DYAUS™ Series– DYAUS-Exx : Embedded Linux Evaluation Board– DYAUS-Rxx : ROM Emulator– DYAUS-SE : CASE Tool (It’s renamed to Cstate™)

Page 30: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-30- uClinux on ARM7TDMI2nd Open Seminar

DYAUS Product Family• DYAUS™-E100

– NetSilicon NET+40– 1 Parallel, 2 RS-232, 1 Ethernet, etc.

• DYAUS™-E200– Samsung S3C4530A– 2 RS-485, 1 RS-232, 1 Ethernet, etc.

• DYAUS™-E210– Samsung S3C4530A– VME Bus, 2 RS-232, 2 Ethernet, etc.

Page 31: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-31- uClinux on ARM7TDMI2nd Open Seminar

DBoot Bootloader• Supported processor(s):

– ARM7TDMI based SoC– NetSilicon NET+40 and Samsung S3C4530A

• Features:– “dsh” command prompt for user interface– download the image through the serial port using XMODEM

or through the Ethernet port using TFTP protocol– execute the program from Flash or DRAM– write the image into Flash and erase block/sector/all – reload from Flash into DRAM– able to set the network configuration– able to edit memory information– support the diagnostic tests (irq, printer)

Page 32: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-32- uClinux on ARM7TDMI2nd Open Seminar

DBoot Bootloader (cont’)

Page 33: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-33- uClinux on ARM7TDMI2nd Open Seminar

emnux Kernel• derived from uClinux kernel• It has two version, 2.0(2.0.38pre7) and 2.4(2.4.17uc0)

/kernel/linux/kernel/linux

/arch/arch

/drivers/drivers

/fs/fs

/include/include

/init/init

/ipc/ipc

/kernel/kernel

/lib/lib

/mm/mm

/mmnommu/mmnommu

/net/net

/scripts/scripts

/armnommu/armnommu /i196/i196 /m68knommu/m68knommu

/boot/boot /mach-netarm/mach-netarm /kernel/kernel /lib/lib /mm/mm

/asm-armnommu/asm-armnommu /linux/linux /net/net

/arch-netarm/arch-netarm /proc-netarm/proc-netarm

Page 34: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-34- uClinux on ARM7TDMI2nd Open Seminar

Software Packages

emnux-2.4emnux-2.4

toolstools

uC-libcuC-libc

kernelkernel

userappsuserapps application programs

the older uC-libc

cross development tool sourcesemnux kernel

/uc_apps /uc_apps

/build/build

/apps /apps mount, ftp, ping (uC-libc)

root file system

busybox, tinylogin, inetd (uClibc)

/disk /disk root directory

/bin /bin

/etc /etc

/usr /usr

/usr/local/usr/local arm-dyausarm-dyaus

cross development environment dir.for ARM7TDMI

/arm-elf /arm-elf

/bin /bin

/include /include

Page 35: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-35- uClinux on ARM7TDMI2nd Open Seminar

Demonstration

– emnux-2.4 on DYAUS-E100– Boa embedded web server– C CGI program

Page 36: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-36- uClinux on ARM7TDMI2nd Open Seminar

BookmarksuClinux• uClinux Official Site

http://www.uclinux.org• The uClinux Directory

http://home.at/uclinux• uClinux Software

http://www.uclinux.net

uClinux Vendors• EmbeddedWeb Co., Ltd.

http://www.embeddedweb.co.kr• Arcturus Networks Inc.

http://www.arcturusnetworks.com• Snap Gear Inc.

http://www.snapgear.com• Lineo, Inc.

http://www.lineo.com

Page 37: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-37- uClinux on ARM7TDMI2nd Open Seminar

Bookmarks (cont’)

JTAG Emulator Vendors• Embedded Performance, Inc.

http://www.episupport.com• Macraigor System

http://www.macraigor.com• AIJI System Co., Ltd.

http://www.aijisystem.com

Useful Sites• uClinux for Samsung S3C4510A

http://mac.os.nc 셔 .edu.tw• uClinux for Samsung S3C44b0x

http://www.start-web.net/tpu• uClinux on the NET V850E

http://www.ic.nec.co.jp/micro/uclinux/eng

Page 38: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

-38- uClinux on ARM7TDMI2nd Open Seminar

Bookmarks (cont’)

Cross Development Environment• uClibc

http://www.uclibc.org

• genromfshttp://romfs.sourceforge.net

Page 39: UClinux on ARM7TDMI Duke Cho EmbeddedWeb Co., Ltd. 2 nd Open Seminar 2002-10-20.

Thanks for your interest!!

Don’t hesitate to contact!

Duke Cho

[email protected]