Home

Port of RedHat eCos to the CubeSat Computer

image

Contents

1. in the make file should be changed to the ecos_install directory Then use make to compile the source code and link the o file with the ecos library 5 5 2 Loading Hello Now can load and run the hello application through serial port with RedBoot On the host either on Windows platform or on the Linux platform open a console window gt arm elf gdb nw gt quipping gdb target remote dev ttySO gt quipping gdb Set remotebaud 38400 gt quipping gdb load hello gt quipping gdb c The snapshot for loading and running Hello is as the following SUN sun cc arm elf gdb nw GNU gdb 6 1 1 Copyright 2004 Free Software Foundation Inc GDB is free software covered by the GNU General Public License and you are welcome to change it and or distribute copies of it under certain conditions Type show copying to see the conditions There is absolutely no warranty for GDB Type show warranty for details This GDB was configured as host i686 pc cygwin target arm elf qiuping gdb set remotebaud 38400 qiuping gdb target remote dev ttyS0 Remote debugging using dev ttySO Ox010033fc in qiuping gdb load hello Loading section rom vectors size 0x40 lma 0x400000 Loading section text size Oxl6S5b4 lma 0x400040 Loading section rodata size 0x3258 lma 0x4l165f4 Loading section data size Ox83c lma Ox41984c Start address 0x400040 load size 106632 Transfer rate 26658 bits sec 316 bytes write
2. qiuping gdb c Continuing Hello elos world Figure 13 Hello World print on the console 5 5 3 Debugging the Hello Debugging hello can use GDB command line or Insight The detailed instruction for debugging is not addressed 1 this is a simple hello world program E include lt stdio h gt E int main void return Figure 14 Insight Debug Window lt j Maca i eli Ox010033fc in Loading section rcom_vectors size 040 Ima 0400000 Loading section text size Ox312de Ima 040004 Loading section rodata size Ox89cO Ima 02431318 Loading section data size Oxa58 lma 0 439cd8 Start address 0Ux400040 load size 239408 Transfer rate 24554 bits sec 303 bytes write Svitching to Thread 2 Breakpoint an ar Bee c 6 EE 90 DO ES hello eCos worl Breakpoint 3 exit status 0 at opt Yecos latest ecos packages langquage vc libcYstartup curre Current language auto currently c gdab gt Figure 15 Console output 5 5 4 Flash device and File System support The following files are changed or created from the released eCos for this project 1 ecos ecos packages devs flash toshiba tc58xxx current include flash_tc58xxx i ni major changed file 2 ecos ecos packages dev flash arm eb40 current src eb40_nand_flash c new created file 3 ecos ecos packages dev flash arm eb40 current cdl flash_eb40 cdl changed file In the latest eCOS package there has already been
3. Type show copying to see the conditions There is absolutely no warranty for GDB Type show warranty for details This GDB was configured as host i686 pc cygwin target arm elf qiuping gdb target remote dev ttyS0 Remote debugging using dev ttyS0 0x00403394 in qiuping gdb set remotebaud 38400 qiuping gdb i Figure 9 RedBoot Debug Terminal Use GDB stub we can check register info see figure 10 This GDB was configured as host i686 pe cygwin target arm elf qiuping gdb target remote dev ttry50 Remote debugging using dev ttrySO 0x00403394 in qiuping gdb set remotebaud 38400 qiuping gdb info reg r Ox403390 4207504 rl Oxl 1 rz OxZ Z r3 0x13 19 r4 Oxd3 211 r5 0x5 5 r 0x6 6 r Ox if rs 0x8 8 rg 0x9 3 rlo Oxa 10 rll DOx47 fffc 4718588 riz Ox480000 4718592 sp Ox4 ffec 4718572 LE Ox407150 4223312 pe 0x403394 4207508 fps 0x0 o cpsr Oxd3 211 qiuping gdb Figure 10 Info Reg we can check memory see figure 11 qiuping gdb x 4xw Ox400000 Ox400000 OxeS9ff018 OxeS9f f 018 OxeS9ffOls Oxes59ffo01s qiuping gdb 0x400010 OxeS9ff01s 0x00000000 OxeS9ff018 OxeS9ff018 qiuping gdb Ox400020 0x00400040 0x004001cc 0x004001f0 0x00400Z1c qiuping gdb 0x400030 0x00400238 0x00000000 0x00400350 0x00400318 qiuping gdb 0x400040 OxeS59 0430 Oxe3a0181f Oxes5801000 OxeS59 1428 qiuping gdb Ox400050 OxeS801004 Oxe3a018le OxeS801010 Oxe3a01802 qiuping gd
4. 128 Mutexes 32 Mailboxes 32 Semaphores 32 Scheduler operations 128 Counters 32 Alarms 32 Confidence Ave Min Max Var Ave Min Function 86 48 71 29 101 56 7 99 48 28 Create thread 20 70 20 51 21 48 0 31 80 80 Yield thread all suspended ES 17 07 25 51 3 16 52 34 20 70 28 98 17 11 27 85 20 70 17428 52 34 33 01 72 03 96 99 51 48 2 78 11 81 11 81 11 81 11 81 5 49 20 20 24 44 18 25 16 11 6 10 124 21 9 28 2 93 22 58 2 44 22 58 2 44 22 71 22 71 21 18 18 98 16 60 16 60 2539 2 93 51 76 20 51 28 32 16 60 26 37 20 51 16 60 51 76 32B 70 31 95 70 49 80 1 95 11 72 11 72 METZ 1111 72 4 88 19 53 24 41 17 58 15 63 5 86 124 02 8 79 2 93 22 46 1 95 22 46 1 95 22 46 22 46 20 51 18 55 17 58 17 58 26 37 3 91 S213 21 48 30 27 17 58 28 32 21 48 17 58 SNE 33 20 27 112 30 164 06 2 93 12 70 12 70 12 70 12 70 5 86 20 51 PSSS 18 55 16 60 6 84 125 00 DT 2 93 23 44 2 93 23 44 2 93 23 44 23 44 21 48 19 53 0 48 0 49 0 21 0 36 0 47 0 31 0 48 0 49 0 52 0 31 0 45 0 47 0 31 0 38 1 22 1 76 0 26 0 17 0 17 0 17 0 17 0 46 0 42 0 06 0 42 0 49 56 52 88 76 60 80 60 52 96 80 64 60 80 80 64 99 84 90 90 90 90 62 68 96 68 100 44 Suspend suspended thread 52 Resume thread 88 Set priority 76 Get priority 40 Kill suspended thread 80 Yield
5. 51 28 Alarm latency many threads 2 10 98 0 Alarm gt thread resume latency 0 00 Clock interrupt latency 0 00 Clock DSR latency 300 271 312 mainstack 832 Thread stack used 1120 total All done main stack stack used 832 size 2400 All done Interrupt stack used 288 size 4096 All done Idlethread stack used 272 size 2048 Timing complete 30350 ms total PASS lt Basic timing OK gt EXIT lt done gt Our results Reading the hardware clock takes 20 ticks overhead this value will be factored out of all other measurements Clock interrupt took 403 76 microseconds 496 raw clock ticks Testing parameters Clock samples 32 Threads 25 Thread switches 128 Mutexes 32 Mailboxes 32 Semaphores 32 Scheduler operations 128 Coungtensk 32 Flags 32 Alarms 32 Confidence Ave Min Max Var Ave Min Function Sia 9 425 605 860 26 53 72 642 365 Create thread 144 48 144 05 144 87 oma 52 48 Yield thread all suspended Sails LS Gil L5 Gil oS 0 00 100 100 Suspend suspended thread 99 62 99 29 100 11 0 39 60 60 Resume thread 140 44 139 99 140 80 0 40 56 44 Set priority W382 ls ios 0 39 60 40 CST priority 350 74 349 95 350 78 0 06 96 4 Kill suspended thread 144 170 ONE SIS 144 Oil SAL LIS e ES 943 2907 OR 80 Ws USE 80 47 118 134 116 SOR SON TLS 84 LT 135 LT 135 17 143 143 123 WOSE 132 SUE 997 34 sT T2 63 TG
6. Again you need to build your apps from source if you want to take advantage of Cygwin functionality The source code and detailed installing instruction can be found on http www cygwin com 4 2 1 2 GNU Tools on Cygwin The Ocdemon JTAG GNU tools are provided by OCDemon Macraigor Systems It is used to communication with JTAG Wiggler ARM 20 The source code and installing information can be found on http www macraigor com full_ gnu htm During GNU Tools installation files are placed in the following directories cygwin usr local bin binary GNU tools OCDemon binaries cygwin usr local OCDEMON cpu type example example source amp makefile windows system OCDemon support binaries On the Cygwin environment need to install another set of GNU tools if you choose prefer debugging code on the Windows platform Since the GUN tools provided by Ocdemon Macraigor don t have source level debugging capability so installed a most recent version of GUN tools The source code and installation instruction can be found on http www gnu org 4 2 1 3 GNU tools on Linux built the RedBoot and eCos on the Linux platform so ARM based GNU tools need to install on the Linux including GNU Binary utilities GNU C C Compiler and GUN Insight Debugger with Insight Interface The source code and installing instruction can be found on http www gnu org 4 2 1 4 CVS CVS is the Concurrent Versions System the dominant open s
7. supported by RedBoot The GDB stub in the RedBoot will receive commands from gdb tool on host The output will be sent by GDB stub to gdb on host Since the currently supported ocdemon GDB is too old it can t read DWARF2 format debugging information in the object file it cannot provide the source level debugging To get source level debugging capability in Cygwin installed a latest stable version of GDB in Cygwin Note To use serial port as connection between gdb on host and gdb stub in redboot we need close the hyper terminal if it is still connected If serial port is not released there will be conflicts The debugging environment is illustrated in the following figure 8 Host Target GDB Application RedBoot GDB stub Ethernet Ethernet Figure 8 The debug environment for this example running GDB on the host and RedBoot on the target The detailed steps are 1 open a Cygwin terminal 2 cd to the working directory 3 arm elf gdb nw note make sure the right version is run 4 set remotebaud 38400 5 target remote dev ttySO The commands and result can be seen on Figure 9 E suN sun usr local arm bin cd f ec SUN sun cc arm elf gdb nw GNU gdb 6 1 1 Copyright 2004 Free Software Foundation Inc GDB is free software covered by the GNU General Public License and you are welcome to change it and or distribute copies of it under certain conditions
8. warranty for details This GDB was configured as host i586 pe cygwin target arm elf Setting up the environment for debugging gdb Macraigor Systems OCDemon version 20 7 capability 0x10027 OxO in 2 Cubesat qdb load redboot_ram elf Loading section rom vectors size 0x40 lma 0x400000 Loading section text size Oxb cO lma 0x400040 Loading section rodata size Oxld7 b lma Ox40b800 Loading section data size 0x74c lma Ox40d57c Start address 0x400040 load size 56519 Transfer rate 11898 bits sec 504 bytes write Cubesat gdb c Continuing Fig ure 6 RedBoot Loading We could open the hyper terminal to get connected with RedBoot 1 Open the hyper terminal window 2 Set the baud rate be 38400 Gdb knows where the software has been loaded to execute the redboot just loaded type c command Below is the output from redboot CubSat NA THO FEE 50 BAC Risa HBA RedBoot tm bootstrap and debug environment RAM Non certified release version 2 built 05 37 14 Aug 6 2004 Platform Atmel AT91 redStar ARM7TDMI Julie honor project redStar Copyright C 2000 2001 2002 Red Hat Inc RAM 0x00400000 0x00480000 0x00413e60 0x00480000 available FLASH 0x01000000 0x01020000 512 blocks of 0x00000100 bytes each RedBoot gt _ EE 0 04 38 E b4801 38400 s N 1 SCROLL Cars mm E ATEN Figure 7 Hyper terminal For RedBoot RAM version 5 4 4 Debugging using GDB through serial port
9. 4 1 New version of eCos In order to use the most updated features of eCos such as TOSHIBA NAND flash and JFFS2 supporting adopted the latest eCos which can be downloaded using CVS For our new platform use must do some necessary changes The following files are changed from released eCos 1 ecos ecos packages hal arm at91 eb40 current include hal_platform_setup h 2 lecos ecos packages hal arm at91 eb40 current include pkgconf mit_arm_at91 _eb40 ram h 3 ecos ecos packages hal arm at91 eb40 current include pkgconf mit_arm_at91 _eb40 ram ldi 4 lecos ecos packages hal arm at91 eb40 current include pkgconf mlt_arm_at91 _eb40 rom h 5 ecos ecos packages hal arm at91 eb40 current include pkgconf mit_arm_at91 _eb40_ rom ldi In hal_platform_setup h there are hardware dependent initialization code such as memory peripheral devices and so on The changes are necessary to reflect the difference of CC7 and EB40 for which the original code is written Note when ram version redboot is built please make sure the hardware initialization is included Generally ram version application will not initialize the hardware It is rom version redboot that is going to initialize the hardware What is defined in mlt_arm_at91_eb40_xxx h and mlt_arm_at91_eb40_xxx Idi is the memory arrangement The memory defined here should match the configuration done in hal_platform_setup h 5 4 2 Build Once the change of new version of eCos for our platform is
10. 45 LS 06 62 94 sad 45 90 all 82 82 51 val 07 24 20 34 47 795 39 24 a 140 24 s00 24 24 65 15 YE 10 90 90 DS 144 170 NS 157 144 SL 358 283 564 529 283 i0 EUs Wik Vi AIRE 47 118 133 HGS JOR IDO LS Se alias 135 LF 134 Ke 143 99k 99 34 143 L226 103 Lik 205 o 10 85 54 05 15 a 10 29 82 76 223 58 32 32 2 32 20 Som 47 Z5 34 81 oo 83 09 o LO 09 028 09 2A 24 89 36 85 ZS 29 18 144 170 oS ol JT O6 1356 144 5 NG o 7 Oil o US 678 285 885 845 656 o LF 367 49 a Ol o HS 11 39 SOJA SOYA SIONES SOYA 98 17 17 98 48 02 118 135 11 SI 792 TS SORES 36 62 TLS AO 84 64 17 91 135 a 10 17 91 135 o LO 17 91 143 144 123 104 132 6 100 100 24 205 TiAl 18 66 11 11 39 500 0 0 30 30 0 06 OR OR 30 41 0 00 24 62 OF 24 60 Silk 5 Sil 15539 oS ES AS e 47 D9 o MS eS 96 a JG 0 38 OR 0 0 615 19 40 0 00 ORAS OF 35 0539 ORAS OF 00 ORAS OF 18 ORAS SO a A Sl amp 00 aul 299 40 e omon oro ORS 100 100 Suspend 76 24 Yield no other thread 76 24 Resume suspended low prio thread 96 4 Resume runnable low prio thread 76 24 Suspend runnable thread 52 52 Yield only
11. 6 ROTTEN iba 33 IS Ln 3 Introduction The RTOS operating system eCos and the Cubesat computer are introduced as followings 3 1 eCos eCos is an open source royalty free real time operating system form Red Hat Inc intended for embedded applications GNU open source development tools support eCos The highly configurable nature of eCos allows the operating system to be customized to precise application requirements delivering the best possible run time performance and an optimized hardware resource footprint A thriving net community has grown up around the operating system ensuring on going technical innovation and wide platform support 3 1 1 Core functionality As a RTOS the following core functionality is provided e Hardware Abstraction Layer HAL e Real time kernel o Interrupt handling Exception handling Choice of schedulers Thread support Rich set of synchronization primitives Timers counters and alarms Choice of memory allocates o Debug and instrumentation support e ITRON 3 0 compatible API e POSIX compatible API e ISO C and math libraries e Serial Ethernet wallclock and watchdog device drivers e USB slave support e TCP IP networking stacks e GDB debug support OL VO Or Or 0 O 1o 3 1 2 Configurability One of the key technological innovations in eCos is the configuration system It is important to understand that the component framework makes up the eCos system Developers are able to select com
12. 9 0 25 81 81 Put Get mbox AG SS Wy 20 0 25 81 81 Init semaphore 102 55 103 36 omon 75 25 Post 0 semaphore 103 36 104518 0 31 75 25 Wait 1 semaphore o AL 39 53 0 18 87 12 Trywait 0 semaphore gL 15 91 97 0 25 81 81 Trywait 1 semaphore 11 39 1221 0 38 62 62 Peek semaphore 35 81 35 81 0 00 100 100 Destroy semaphore A232 APA 03 0 18 87 87 Post Wait semaphore 36 62 37 44 O 10 93s 66 Creeis Couimicsic 13 84 13 84 0 00 1007 100 Cet covirez valus 16 23 17 0 0 25 81 18 Set counter value 12142 12208 0 40 56 56 Tick counter Aleik 21 97 0 35 68 00 Dealers Coumesic AAPOR OSS 0 25 la 187 mit ilag 128 59 129 41 0 31 75 75 Destroy flag 89 53 89 53 0 00 100 100 Mask bits in flag 104 99 OSG ARES 87 12 Set bits in flag no waiters 155 45 150 26 AS Wee Wess maie tor ilag LAND IBS 2 154 63 239 59 40 Weultc itor flag OR 156 26 AOS 35 68 68 Wait for flag AND CLR 154 039 155 45 1350 68 Sie Wait for flag OR CIR 10 53 10 598 0 00 100 100 Peek on flag SO Se a a S 52 90 IS NR 0 40 56 56 Create alarm 138 36 139317 0 25 81 81 Initialize alarm Gole s6 27 0 18 87 12 Disable alarm 191 05 132 66 0 18 87 12 Enable alarm 104 99 105 80 0 31 75 25 Delete alarm Teg AT 169 28 0 LS ele 37 wick Concer il alarm 1699 59 2068 85 871 55 845 de Mick Counter meny ellerime 290 55 G6lil 22 19 41 S65 S65 Tiek E tims covmusrz il alami 13 39 6393 48 149 43 BSG 34 Wieck E Tirs coumrsie
13. 93 Sl Zs 6 84 30 27 304 69 43 95 774 41 320 31 113 28 113 28 113 28 189 45 23 44 33 20 22 46 18 55 19 53 2 93 2 93 24 41 68 36 5 86 17 58 19 53 16 60 15 63 5 86 6 84 73 24 7 81 3 91 3 91 24 41 5 86 11 72 3228 3 91 3228 7 81 31 25 425 78 44 92 893 55 433 59 167 97 159 18 158 20 331 05 25 39 514 65 0 00 100 100 Tryget non empty mbox 0 37 75 25 Peek item empty mbox 0 00 100 100 Tryget empty mbox 0 37 75 25 Waiting to get mbox 0 00 100 100 Waiting to put mbox 0 48 56 56 Delete mbox 0 33 78 78 Put Get mbox 0 49 100 50 Init semaphore 0 46 62 62 Post 0 semaphore 0 48 56 56 Wait 1 semaphore 0 30 81 81 Trywait 0 semaphore 0 44 65 34 Trywait 1 semaphore 0 37 75 25 Peek semaphore 0 49 100 50 Destroy semaphore 0 17 90 90 Post Wait semaphore 0 37 75 75 Create counter 0 37 75 75 Get counter value 0 21 87 87 Set counter value 0 42 68 31 Tick counter 0 46 62 37 Delete counter 0 30 81 81 Create alarm 0 33 78 78 Initialize alarm 0 21 87 87 Disable alarm 0 37 75 75 Enable alarm 0 30 81 81 Delete alarm 0 17 90 9 Tick counter 1 alarm 7 28 96 96 Tick counter many alarms 0 17 90 9 Tick amp fire counter 1 alarm 13 62 93 93 Tick amp fire counters gt 1 together 6 84 96 96 Tick amp fire counters gt 1 separately 0 84 57 42 Alarm latency 0 threads 8 20 50 31 Alarm latency 2 threads 8 09
14. Port of RedHat eCos to the CubeSat Computer Qiuping Tao September 10 2004 Supervised by Professor Michel Barbeau IN 1 Abstract This project intends to port the eCos RTOS to the Cubesat computer which is a single board computer that fits inside a 10 cm cube satellite create a file system to access the flash device in order to provide the ability to save the data when the power is shut off also perform the benchmark testing for the new ported operating system be 2 Table of Contents Ta ADS 2 22 Table COMES a manana 3 A teehee O aa a a e bD a a ek eer ainet biedne eee oa 5 3 1 BCOSics cl A aia i 5 SA Core f nctionality cr ii de aa Ei Eaa Ea a en 5 Oca CONMUTADOR AAN ES AAA aie 6 3 1 3 Processor and Evaluation platform SUPpPOFt ooooococcccccccccoccnccnncncnnco 6 3 4 CC OS SUDPOM users icon pon 7 32 GUDC AAA aadiveaaxbesatencsnsauenern 7 3 2 POCESSON anea enceiadsnuae rsp ss Mam E E E an wlansanaeiionee 7 3 2 2 Memon MID a masts di thonecd ita naan 8 S221 internal Memo coria re 8 3 2 2 2 External MENO ii Aanaiewsientaunsbay vers 9 3 2 9 Peripheral S A A SR eae 9 3 2 3 1 Serial COMMUNICAtION oooococccccccoccoccnconconcnncnncnnnnnnncnnnnnnnnnos 9 4 Development Sel siria a 11 4 1 Hardware SUD ai ida 11 AZ SOftWare Sel raras a iaa 12 4 2 1 Host Development PlatformM ooocococcoccococconooconcnonnnnnnonncnnnnnnos 13 BoD NST AAA es eet canara e EEE EEEE ONE TESE EIRE EES 13 4 2 1 2 GNU Tools on CY
15. WI ia e teeter wea eos ule aa 13 42 153 GNU Tools ON MIDA adaware E aes 13 OD TAO Si col zs A A O coke ales me cM hs cle hh 14 4 2 1 5 Source NAVIGAIO 2iczesscsnnkaiaacedduyoraine condder aeda rana col n 14 4 2 1 6 Configuration TOO uo licoicosics baso esteban 14 ALARCON apa 14 A A NN 15 4 2 3 1 Architecture Overview ccccceceeceeeeceeeeeeeeeeeeeeeeeeaeeneass 15 4 2 3 2 SCOS REPOSO aii a eo 16 4 2 3 3 eCos TerminOlogy ici A A A 17 4 2 3 4 eCos Configuration OptiON oooooccccccnccccocncccconnccncnnnccncnnnannns 17 4 24 Flash DEVICE torta 18 4 2 5 File System JFFS 2 ic birds ii ida eins iaa iia ed 19 Dz POMO ci iia 20 Sal Target Platform e o 20 5 2 SOLU e a a E KO EK r Hanmer ed uuu E eee ean een eee 20 0 0 JAS COMMUNICAWON rr ad A as A ais e 20 5 4 Building REGBOOL ti E A A E E a 22 5 4 1 New Versi0N e OOS A T A a p A r a uiie Eti NARs 22 AA O ea a a eats eee ee 23 5 4 3 Loading RedBoot to RAM c ecceeeeeeeee ee ee ee eet este eeeeeeaeneeees 24 5 4 4 Debugging using RedBoot oooooomcoccooncoconencaconcncanenener rra 25 5 5 Building COS AppliCallOn sra ana 29 Side Helo EXIME arse dl ltt 29 5 5 2 Loading Hello to RAM cx sscdesexccopseectesvccdvscadeseeccopedieaideaenssaekae te 30 5 5 3 Debugging Hell a eri 31 5 54 Flash Driver SUDpOM tacea oana R E 31 5 5 5 File System SUD dia com A ARES 32 5 6 Loading RedBoot to BootromM oooooiocnconocononconencncencneronnancanenencananeos 32
16. a Toshiba TC58xxx flash driver That driver is not supported on EB40 from which our target software is inherited The TC58xxx is a multiplexed port device The driver existing has been written based on the hardware design which is different with CC7 The changes are needed in that driver to be able to control the flash device 5 6 Load RedBoot to Bootrom In order to avoid loading RedBoot every time when the hardware is powered on then decide to load the RedBoot to the Bootrom a small bug fix in the file ecos ecos packages devs flash atmel at29cxxxx current include flash_at_29cxxxx ini to make it possible The latest eCOS has a driver which is different with the old one And it doesn t work without fixing First need to build a rom version RedBoot then convert redboot elf file to redboot srec file to be able to download and burn the flash with rom version redboot we need 1 RAM version redboot linked and loaded into external SRAM which is big enough to hold image 2 hyper terminal which supports ymodem protocol After connected hyper terminal with target through serial port a on target type load b 0x440000 m ymodem b using hyper terminal send menu send the redboot srec to target c on target type Fis write f 0x10000000 b 0x440000 I length Note 0x440000 is the address where rom version image is temporarily stored on SRAM 0x10000000 is the starting address of flash device After RedBoot is progra
17. ad onlu list that gives notifications of changes made to the eCos source code repository The detailed information can be found at http ecos sourceware org intouch html 3 2 CubeSat The Cubesat computer is a single board computer that fits inside a 10 cm cube satellite 3 2 1 Processor The processor of the Cubesat Computer is an Atmel AT91R40807 which is in fact a small system with a CPU internal memory and controllers for interfacing with peripherals The CPU is an ARM7TDMI ARM Thumb Processor Core 3 2 2 Memory Map The Cubesat Computer has internal memory embedded in the Atmel processor and external memory on the Cubesat Computer board see Figure 1 Memory banks are not contiguous but this is rather immaterial to the eCos programmer Ox12000000 oo NAND Flash 0x10000000 External 32M 0x01020000 128KB bootrom 0x01000000 External 0x780000 512 KB SRAM External 0x700000 0x680000 512 KB SRAM 0x600000 External 0x580000 512 KB SRAM External 0x500000 0x480000 512 KB SRAM 0x400000 External 0x120000 128 KB SRAM Internal 0x 100000 0x2000 8 KB SRAM 0 Internal Figure 1 Memory Map 3 2 2 1 Internal Memory The internal memory is embedded inside the processor There are an internal primary SRAM bank and an internal secondary SRAM bank The primary bank is of size 8 KB and starts at address 0x300000 This memory is remapped programmatically to address 0x0 after completion of
18. b Ox400060 OxeS801030 OxeS9f0414 Oxe3a01040 Oxes5801020 qiuping gdb 0x400070 Oxe3a010Dc Oxe5801000 Oxe3a01d23 OxeS801004 qiuping gdb 0x400080 Oxe3a01050 Oxe5801000 Oxe3a01001 Oxes5801008 qiuping gdb Ox400090 OxeS9f03ec Oxe3a01007 Oxes580100c Oxe3a01008 qiuping gdb Ox4000a0 OxeS801120 OxeS9fa3dc OxeSbalbff Oxe8ab03ff qiuping gdb Ox4000b0 Oxela fic 0x01003235 0x0050382d 0x0040382d qiuping gdb i Figure 11 Memory Checking 5 5 Build eCos Application 5 5 1 Hello Example 5 5 1 1 Build eCos The main goal of this stage is to generate the eCos library file according to our configuration setting start with the source tree as shown in the Figure 12 After setting up our configuration according to our specification using the Configuration Tool save the file as ecos ecc Next the Configuration Tool generates the appropriate files for our build The GNU cross development tools are used to compile the source code files and produce our final output file the eCos library libtarget a Other necessary files which include additional libraries and a linker script file are also produced by the Configuration Tool Source Tree Local Repository Development Tools and Make Utility ARM GCC AS LD AR Build Tree CcOs ecc Figure 12 eCos build procedure flow diagram 5 5 1 2 Building Hello Source code of the Hello World and make file are located in the ecos examples Make sure PKG_INSTALL_DIR
19. data or error correction codes Loading the required data into an internal buffer one byte at a time then issuing a write command write NAND flash While NOR flash allows bits to be cleared individually until there is none left to be cleared NAND ash allows only ten such write cycles to each page before leakage causes the contents to become undefined until the next erase of the block in which the page resides The TC5826A is a single 3 3 V 256 Mbit 276 824 064 bit NAND Electrically Erasable and Programmable Read Only Memory NAND EEPROM organized as 528 bytes X 32 pages X 2048 blocks The device has a 528 byte static register which allows program and read data to be transferred between the register and the memory cell array in 528 byte increments The Erase operations is implemented in a single block unit 16 Kbytes 512 bytes 528 bytes X 32 pages The TC58256A is a serial type memory device which utilizes the I O pins for both address and data input output as well as for command inputs The eraser and program operations are automatically executed making the device most suitable for applications such as a solid state file storage voice recording image file memory for still cameras and other system which require high density non volatile memory data storage TC58256AFT is supported by eCos but only for Power PC 4 2 5 File System JFFS2 eCos provides three different file system implementations ROM RAM and JFFS2 A ROM file system is b
20. e eCos kernel RedBoot Contain package for the RedBoot standalone debug ROM monitor 4 2 3 3 eCos terminology Component framework The collection of tools that allow users to configure the eCos system and manage different packages in the repository Component is a configuration option that encapsulation more detailed options within it Package a type of component that is ready for distribution Target a piece of hardware on which the application will be executed Template a template is a partial configuration that gives us a valid starting point CDL Component Definition Language It is used to describe a package or a component Configuration Tool can read write the package information from to the CDL file 4 2 3 4eCos configuration options The flowing terminologies are often used in this project The configuration option is the fundamental unit of configuability in the eCos system Typically a configuration option corresponding to a single choice you can make This choice might be enable disable or to set a value for the option Configuration options have a macro associated with them The macro is used in the source level configuration control The configuration optioned selected can affect which files are built into the eCos library or cause certain values to be set in a particular file The component frameworks use a Component Definition Language CDL to describe the package 4 2 4 Flash device Flash memory is an incr
21. easingly common storage medium in embedded devices because it provides solid state storage with high reliability and high density at a relatively low cost Flash is a form of Electrically Erasable Read Only Memory EEPROM available in two major types the traditional NOR flash which is directly accessible and the newer cheaper NAND flash which is addressable only through a single 8 bit bus used for both data and addresses with separate control lines These types of flash share their most important characteristics each bit in a clean flash chip will be set to a logical one and can be set to zero by a write operation Flash chips are arranged into blocks which are typically 128KiB on NOR flash and 8KiB on NAND flash Resetting bits from zero to one cannot be done individually but only by resetting or erasing a complete block The lifetime of a flash chip is measured in such erase cycles with the typical lifetime being 100 000 erases per block To ensure that no one erase block reaches this limit before the rest of the chip most users of flash chips attempt to ensure that erase cycles are evenly distributed around the ash a process known as wear leveling Aside from the difference in erase block sizes NAND flash chips also have other differences from NOR chips They are further divided into pages which are typically 512 bytes in size each of which has an extra 16 bytes of out of band storage space intended to be used for meta
22. ectories needed to build the image we have configured The Configuration Tool appends _ build and _ install to the filename when generating the build and install tree directories redboot_build subdirectory contains the build tree and is used by the Configuration Tool to store the files used and created in the build process such as make files and object files The redboot install subdirectory contains the install tree and includes the final output binary images as well as the header files which are needed by the application The redboot_mlt subdirectory contains the memory layout files used by the Configuration Tool Memory Layout Tool Step 4 To start the build Select Build gt Library When the RedBoot build is complete the output window displays build finished The file built is located under redboot_install bin use the redboot elf file 5 4 3 Load RAM version RedBoot to RAM using JTAG emulator 1 double click cygwin icon 2 cd to working directory 3 arm elf gdb nw 4 load redboot_ram elf The results are shown on Figure 6 88 fusr local arm bin SUN sun usr local arm bin farm elf gdb nw GNU gdb 20000823 Copyright 2000 Free Software Foundation Inc GDB is free software covered by the GNU General Public License and you are welcome to change it and or distribute copies of it under certain conditions Type show copying to see the conditions There is absolutely no warranty for GDB Type show
23. el configuration Using Configuration Tool can build the RedBoot and eCos application The Configuration source code is in the eCos repository 4 2 2 RedBoot RedBoot is a complete bootstrap environment for embedded systems Based on the eCos Hardware Abstraction Layer RedBoot inherits the eCos qualities of reliability compactness configurability and portability RedBoot allows download and execution of embedded applications via serial or Ethernet including embedded Linux and eCos applications It can be used for both product development debug support and in deployed products in the field flash update and network booting Ethernet download and debug support is included allowing RedBoot to retrieve its IP parameters via BOOTP or DHCP and program images to be downloaded using TFTP Images can also be downloaded over serial using X or Y modem RedBoot can be used to communicate with GDB the GNU Debugger to debug applications via serial or Ethernet including the ability to interrupt a running application started by GDB An interactive command line interface is provided to allow management of the Flash images image download RedBoot configuration etc accessible via serial or Ethernet For unattended or automated startup boot scripts can be stored in Flash allowing for example loading of images from Flash or a TFTP server 4 2 3 eCos Section 3 1 Briefly introduced the eCos In this section we ll have more detailed expla
24. low prio thread runnable gt not runnable 96 96 Kill runnable thread 96 60 Destroy dead thread 96 96 Destroy runnable thread 92 92 Resume high priority thread No 97 97 Thread switch 60 60 Scheduler lock 99 99 Scheduler unlock 0 99 99 Scheduler unlock 1 threads suspended 99 99 Scheduler unlock many suspended 99 99 Scheduler unlock many low prio 62 37 Init mutex 68 31 Lock unlocked mu 84 12 Unlock locked mu 56 43 Trylock unlocked 81 18 Destroy mutex 68 31 Unlock Lock mutex 68 31 Create mbox 81 81 Peek empty mbox 100 100 Put irirasti mooz 81 81 Peek 1 msg mbox 87 12 Put second mbox 81 81 Peek 2 msgs mbox 100 100 Get first mbox 100 50 Get second mbox TOX LESS mutex 100 100 Trylock locked mutex 68 68 Tryput first mbox 56 56 Peek item non empty mbox 685 68 Tryget non empty mbox 75 25 Peek item empty mbox 75 25 Tryget empty mbox 93 93 Waiting to get mbox See 180 48 403 83 46 54 105 116 103597 89 42 Oi Sil LiL 70 SOS MAS oo SUIS 13 84 15 94 121 02 Za 45 42 L285 VE 39 93 LOS 5 70 155 63 154 30 LSO 52 LOS 519 ORO SORAS 13 51 365 17 L325 56 105 60 LOS 557 W725 1A 300 70 6731 48 LOO 593 342 82 S99 OF Sa Ss 35 00 0 09 93a 93 Waiting to put mbox 179 86 1690 08 0 31 75 25 Delete mbox 403 68 404 4
25. made then need to start to build the RedBoot In this project used Graphic Configuration Tool to configure and build RedBoot on the Linux platform Step1 On the Linux Console type configtool then need to set the Tool gt path for user tool and build tools The build tools path are where the cross development GNU tools like arm elf gcc are stored User path is where general user commands are stored Use a template the template dialog box is lunched by selecting Build gt Templates In the template dialog box select EB40 from the hardware drop down list From the packages drop down list select the redboot packages Then click the OK button The resolve Conflict dialog box might pop up because am changing to a new template with different configuration option settings Using the configuration Tool can resolve these conflicts automatically Step 2 Next want to setup the configuration options for our RedBoot build Don t change the configuration if you are not sure what you are doing The configurations you did here will be saved in a configuration file in cdl Note Correspondent configuration files have been included in load build packages which have been put on the web page Step 3 Next save my configuration file For this select File gt Save As and browse the to my working directory and save the file to be redboot ecc The Configuration Tool takes the redboot ecc file name selected and creates the dir
26. mmed into the Bootrom we could verify it by doing power cycle of target After power on from the hyper terminal window we should get the following results Cubsat POL SS i FO MEE EEV BAC EDO EO ff UUUUU UU UU BE RE RedBoot tm bootstrap and debug environment ROM Non certified release version 2 built 12 10 17 Aug 6 2004 Platform Atmel AT91 redStar ARM TDMI Julie honor project redStar Copyright C 2000 2001 2002 Red Hat Inc RAM 0x00100000 0x00120000 0x001069a0 0x00120000 available FLASH 0x01000000 0x01020000 512 blocks of 0x00000100 bytes each RedBoot gt Bee 0 00 50 Babi8WW 38400 e n 1 SCROLL CAPS nm ATEO Fig ure 16 Rom RedBoot on Hyper Terminal Window 5 7 Benchmark Test Benchmark test is run using gdb The tool is built as a kernel test The name of tool is tm_basic Result provided from Board Atmel AT91 EB40 Board Atmel AT91 EB40 CPU AT91R40807 ARM7TDMI core 32MHz 512KB RAM 64K Flash Startup main stack stack used 420 size 2400 Startup Interrupt stack used 144 size 4096 Startup Idlethread stack used 84 size 2048 eCos Kernel Timings Notes all times are in microseconds 000001 unless otherwise stated Reading the hardware clock takes 3 ticks overhead this value will be factored out of all other measurements Clock interrupt took 127 53 microseconds 130 raw clock ticks Testing parameters Clock samples 32 Threads 25 Thread switches
27. ms including 16 32 and 64 bit architectures MPUs MCUs and DSPs The eCos kernel libraries and runtime components are layered on the Hardware Abstraction Layer HAL and thus will run on any target once the HAL and relevant device drivers have been ported to the target s processor architecture and board Currently eCos supports ten different target architectures ARM Hitachi H8300 Intel x86 MIPS Matsushita AM3x Motorola 68k PowerPC SuperH SPARC and NEC V8xx including many of the popular variants of these architectures and evaluation IN boards Many new ports are in development and will be released as they become available 3 1 4 eCos Support There are six different mailing lists available for the eCos projects o Discussion List Contains support and technical assistance on various topic about the eCos project from developers used this list several times o Patches List used for submitting eCos patches for approval by the maintainers before they are committed to the source code repository o Development List include discussion about current enhancements being developed such as new ports and new features o Announcement List a low volume list for significant news about eCos that is also used to announce new eCos release or major feature enhancements o CVS Web Pages List contains notifications of changes to the eCos web pages that are maintained in Concurrent Version System CVS o CVS List a re
28. nations 4 2 3 1 Architecture Overview eCos is designed as a configurable component architecture consisting of several key software components such as the Kernel and HAL The architecture overview can be viewed in Figure4 Libraries Compatibility z Web e Server a gt Networking File System Stack Hardware Abstraction Layer Device Driver Interrupts Virtual Vectors Exceptions Ethernet Target Hardware Figure 4 Example embedded software system showing layering of eCos packages 4 2 3 2 eCos Repository The Component repository is a directory structure containing all packages from an eCos installation A typical eCos repository would include directories bin cvs doc examples host and packages In the packages directory there are compat cygmon devs error fs hal infra io isoinfra kernel language net redboot and services For important directories for this project are explained as the following Devs Include all device driver hardware specific components such as serial Ethernet flash device and PCMCIA Fs Include the ROM and RAM file system packages Hal Incorporate all HAL target hardware packages IO Packages for all generic hardware independent Input output I O System support such as Ethernet flash and serial which is the basic for system device drivers Kernel Includes the Packages that provide support for ISO C libraries Such as the scheduler semaphores and thread for th
29. no other thread 36 Resume suspended low prio thread 48 Resume runnable low prio thread 4 Suspend runnable thread 80 Yield only low prio thread 36 Suspend runnable gt not runnable 40 Kill runnable thread 20 Destroy dead thread 4 Destroy runnable thread 96 Resume high priority thread 99 Thread switch 15 Scheduler lock 90 Scheduler unlock 0 threads 90 Scheduler unlock 1 suspended 90 Scheduler unlock many suspended 90 Scheduler unlock many low prio 37 Init mutex 31 Lock unlocked mutex 96 Unlock locked mutex 31 Trylock unlocked mutex 50 Trylock locked mutex 0 37 75 75 Destroy mutex 0 30 81 0 49 100 81 Unlock Lock mutex 50 Create mbox 0 00 100 100 Peek empty mbox 0 21 0 49 0 21 0 49 0 37 0 37 0 42 0 48 87 100 87 100 75 75 68 56 87 Put first mbox 50 Peek 1 msg mbox 87 Put second mbox 50 Peek 2 msgs mbox 75 Get first mbox 75 Get second mbox 31 Tryput first mbox 56 Peek item non empty mbox 22 46 18 31 19 53 2 69 2 93 23 86 67 60 Si 16 97 18 98 15 81 15 29 5 62 6 35 72 36 7 08 all 7 3 05 24 11 5 49 10 92 31 46 3 05 31 49 7 02 31 16 309 26 44 83 781 68 324 16 114 26 126 91 127 11 196 49 23 50 40 31 22 46 17 58 19 53 1 95 2 93 23 44 67 38 4 88 16 60 18 55 15 63 14 65 4 88 5 86 TAA 6 84 2 93 2 93 23 44 4 88 10 74 31 25 2
30. nt tools include Cygwin Ocdemon JTAG GNU tools communication with JTAG GNU tools on both Windows and Linux platform GDB or Insight on Windows is used to communicate with RedBoot GDB stub for debugging GNU tools on the Linux platform combined with eCos configuration tools on Linux are for building the eCos RedBoot or eCos application Also GDB or Insight can communicate with RedBoot stub on the Cubesat computer CVS and source navigator are also need to install for developing Target platform software includes RedBoot eCos application In this section omit the detailed building process of RedBoot and eCos application and they will be addressed in the porting section The flash device and file system used for this project will be introduced too 4 2 1 Host development platform 4 2 1 1 Cygwin Cygwin is a Linux like environment for Windows It consists of two parts o A DLL cygwin1 dll which acts as a Linux emulation layer providing substantial Linux API functionality o A collection of tools which provide Linux look and feel o The Cygwin DLL works with all non beta non release candidate ix86 32 bit versions of Windows since Windows 95 with the exception of Windows CE o Cygwin is not a way to run native Linux apps on Windows You have to rebuild your application from source if you want to get it running on Windows Cygwin is not a way to magically make native Windows apps aware of UNIX functionality like signals ptys etc
31. onfigured to start respectively at addresses 0x480 000 and 0x680 000 The FLASH memory for long term storage is of size 32 MB and is located at address 0x10000000 An access to the FLASH memory requires multiple clock cycle The communication protocol is not directly supported by the EBI 3 2 3 Peripherals Peripherals include serial port and parallel port 3 2 3 1 Serial Communications The Atmel processor has two internal Universal Synchronous Asynchronous Receiver Transmitters USARTs namely USARTO and USART1 They are memory mapped to the respective addresses OxFFFDOO00 and OxFFFCOOO For the eCos programmer they also appear as the dev ttyO and dev tty1 serial device abstractions The USARTO has a half duplex FSK modem connected to it The USART1 is connected to a multiplexer circuitry The circuitry multiplexes three serial lines available for communication with peripherals Port 0 1 and 2 and a Dallas 1 chip providing environmental data Port 3 The port number 0 3 is selected by writing the corresponding binary value 00 11 on the PIO output lines number 19 and 20 it is Port 0 by default 4 Development setup The development setup is pictured in figure 3 1 Figure 2 Development Setup The first serial line of USART1 called Port 0 is used to provide a eCos console Port 0 is available using transmit line stxdO Pin 17 on the P100 connector and receive line srxdO Pin 18 on the P100 connector The console i
32. ource network transparent version control system CVS is useful for everyone from individual developers to large distributed teams o dts client server access method lets developers access the latest code from anywhere there s an Internet connection o lts unreserved check out model to version control avoids artificial conflicts common with the exclusive check out model o lts client tools are available on most platforms Using CVS in this project downloaded the most recent version of eCos The source code of CVS and installing instruction can be found on http www gnu org software cvs 4 2 1 5 Source Navigator Source Navigator is a source code analysis tool With it you can edit your source code display relationships between classes and functions and members and display call trees You can also build your projects either with your own makefile or by using Source Navigator s build system to automatically generate a makefile e Analyze how a change will affect external source modules e Find every place in your code where a given function is called e Find each file that includes a given header file e Use the grep tool to search for a given string in all your source files The source code and installing instruction can be found at http sourcenav sourceforge net 4 2 1 6 Configuration Tool The Configuration Tool provides the ability to customize the eCos library to meet the specific application needs through source lev
33. ponents that satisfy basic application needs and configure that particular component for the specific implementation requirements for the application The configurability minimizes the code size minimize the memory use and therefore reduce the error There are several eCos configuration methods Run time No up front configuration of component is done Typically run time control is through Dynamic Link Library Link time GNU provide the link time control or selective linking With the selective linking unreferenced functions and data are removed from the application image Compile time Gives the developer control of the component behavior at the earliest stage allow the implementation of the component itself to be built for specific application for which it is intended Compile time control gives the best results in terms of the code size because the control is at the individual statement level in the source code rather than at the function or object level Using compile time or source level configuration is achieved by using C preprocessor eCos uses compile time control methods for its software components along with the selective linking provided by the GNU linker The Configuration Tool provided with the eCos release ease the selection and configuration of the software components 3 1 3 Processor and Evaluation Platform Support eCos is designed to be portable to a wide range of target architectures and target platfor
34. rted on CC7 And that has been tested Some more works need to be done to make JFFS2 to support NAND device on CC7 Currently a bunch of JFFS2 for NAND interfaces haven t implemented you need to figure out how to write those interfaces looking at the Linux s JFFS2 might help but apparently more work need to be done to make them work 6 Reference 1 Michel Barbeau eCos Programmer s Guide for the Cubesat Computer 2 AnthonyJ Massa Embedded Software Development with eCos 3 AT91EB40 Evaluation Board User Guide 4JTOSHIBA TC58256AFT specification 5 ATMEL specification 6 JeCOS Reference Manual 7 eCos User Manual 8 The eCos Component Writer s Guide
35. s Sil toysuasi 1840 97 2219 42 100 42 81 81 Tick amp fire counters gt 1 separately S40 sO 572 15 orog 99 99 Alarm latency 0 threads 377 63 526 57 12 522 52 29 Alarm latency 2 threads AOQIL O5 3771 03 824 95 13 05 55 30 Alarm latency many threads 26 34 TOIA Wass 22 9 48 98 0 Alarm gt thread resume latency 416 368 420 main stack 1176 Thread stack used 1120 total All done main stack stack used 1176 size 2400 All done Interrupt stack used 356 size 4096 All done Idlethread stack used 304 size 2048 Timing complete 31080 ms total PASS lt Basic timing OK gt EXIT lt done gt From above result we noticed that the CC7 s benchmark result is much worse than EB40 s One thing should mention here is that the external SRAM interface was configured with extra waiting time to avoid potential timing issues during porting That is probably the major reason why our platform result is worse than the sample provided So the timer setting needs to be checked and modified in order to improve the results There are other things we may consider to tuning software and hardware configuration 5 8 Build File System The latest eCos has JFFS2 included already but it seems only available for NOR flash device from what know there has not been support of NAND device On Linux the NAND support is available already As in section 5 5 4 explained the changes have been made to make the NAND device suppo
36. s eDemon box target ocd netdemon 204 69 209 10 Reset the chip to get to a known state ocd reset Remap Command Switch between the boot memory and internal primary SRAM set long Oxffe00020 0x1 Enable writing in Secondary Internal SRAM set long Oxfff0000c 0x01 Configure EBI to use external SRAM set long Oxffe00000 0x01003235 set long Oxffe00004 0x0050382d set long Oxffe00008 0x0040382d set long Oxffe0000c 0x100021a2 set long Oxffe00010 0x00603001 set long 0Oxffe00014 0x00703001 set long 0xffe00018 0x60000000 set long Oxffe0001c 0x70000000 set long Oxffe00020 0x00000001 set long 0xffe00024 0x00000006 Load the program load redboot elf He The screen shot of this step is shown in the Figure 5 88 fusr local arm bin SUN sun usr local arm bin farm elf qdb nw GNU gdb 20000823 Copyright Z000 Free Software Foundation Inc GDE is free software covered by the GNU General Public License and you are welcome to change it and or distribute copies of it under certain conditions Type show copying to see the conditions There is absolutely no warranty for GDB Type show warranty for details This GDB was configured as host i586 pe cygwin target arm elf Setting up the environment for debugging gdb Macraigor Systems OCDemon version 20 7 capability 0x10027 0x0 in Cubesat gdb Figure 5 JTAG Initialization 5 4 Build RedBoot 5
37. seline and then make modifications for the new platform The changes include HAL modifications drivers changes and cdl file changes 5 2 Setup 1 Desktop s parallel port is connected with the JTAG 2 Desktop s serial port is connected with the board s serial port 3 The host development tools are installed 5 3 JTAG Communication The following steps are for JTAG connection with host GDB 1 double click the Cygwin icon 2 change to working directory in my case cd usr local arm bin 3 arm elf gdb nw arm elf gdb would execute the gdb ini file automatically The gdb ini file is shown as the following Set a GDB environment for the Cubesat Computer 7 0 and load redboot Author Michel Barbeau barbeau scs carleton ca Carleton University School of Computer Science echo Setting up the environment for debugging gdb n set complaints 1 set output radix 16 10 set input radix 16 1 2 3 4 5 6 7 8 9 11 set demangle style gnu 13 dir 14 Set prompt Cubesat gdb This sets the JTAG communication speed If there are problems the speed can be slowed The valid range is fastest to 8 slowest ocd speed 4 This connects to a Wiggler by way of wiggler dll via LPT1 target ocd wiggler 0 This connects to a Raven by way of wiggler dll via LPT1 target ocd raven 0 This connects to a eDemon ethernet box at TCP IP address 204 69 209 10 You will need to change this to reflect the addres
38. the boot process The actual addresses of the memory banks and the remapping done during the boot process are in general immaterial to the eCos programmer The secondary bank is of size 128 KB and starts at address 0x100000 This memory bank is used to load a temporary RAM version of eCos which in turns loads a permanent version of the eCos using a serial port in the bootrom FLASH The RAM No version of eCos is also useful during debugging 3 2 2 2 External Memory The external memory is provided by memory chips connected to the Atmel processor The processor communicates with the external memory using the External Bus Interface EBI There are three kinds of external memory the bootrom SRAM and FLASH for long term storage The bootrom is of size 128 KB and starts at address 0x0 if no remap has been done When the Cubesat Computer is booted or a reset is done execution starts at address 0x0 in the bootrom It is normally a jump instruction to another location in the bootrom The bootrom is visible at address 0x1000000 after the remap The bootrom is provided by a FLASH memory chip which can be loaded and re loaded with code The FLASH memory chip can also be substituted by an EPROM chip which cannot be loaded The external SRAM is of size 2 MB and is divided in two banks of 1 MB The start addresses of the external memory are all above 0x400 000 and are reconfigurable programmatically The start addresses of the banks are c
39. tself is provided a by terminal emulation program on a PC The serial port of the PC e g COM1 is connected to Port 0 of the Cubesat Computer with a serial communication cable i e RS 232 The Cubesat Computer does not include the interface circuit needed for the conversion of the TTL signals of Port 0 binary 1 is a positive voltage level between 2 V to 5 V binary 0 is positive voltage between 0 volts to 0 8 volts to the RS 232 signals binary 1 mark is a voltage between minus 3 volts and minus 15 volts binary 0 space is a voltage between plus 3 volts to 15 volts An interface circuit based on the Maxim MAX233A RS 232 Drivers Receivers chip is proposed see Figure 3 2 The advantage of this circuit is that it does not require an additional supply of 5 volts nor external capacitance The MAX233A needs to be supplied with plus 5 volts Pin 7 This voltage is taken from the DTR line of the PC and regulated by the 78L05 Uwe Aa ELeTr Ie HA Bats a Sy Goon Figure 3 RS 232 adapter 4 1 Hardware Setup A desktop computer running both Windows and Linux and a JTAG connector Wiggler ARM 20 are required The JTAG connector must be connected on the parallel port of the desktop computer The PC serial port is connected with the Cubesat computer serial port 4 2 Software Setup In this project software setting up includes tools installing for host development platform and software building for target platform Host Developme
40. uilt on the host development system This file system is read only and is stored in the target memory exactly as it was constructed on the host The eCos RAM file system purely uses RAM to store file data Therefore it does not permanently store the file system data because the content are lost when the system is reset Both the ROM and RAM file system use the POSIX File I O Compatibility Layer packages JFFS2 is journaling file system based on JFFS version 1 JEFFS was designed to use embedded flash memory devices more efficiently JEFFS and JFFS2 take into account the characteristics of flash technology when dealing with the typical situation in an embedded system where the system is not cleanly shut down JFFS2 is long structured file system whereas a typical embedded file system emulates a traditional file system that use block based storage and keeps track of the files in these blocks JFFS2 builds on the version 1 technology The JFFS2 package is contained in the jffs2 directory under the file system s package directory fs Currently JFFS2 supports the NOR flash device on eCos For the NAND flash device the development is still in the progress Additional details about JFFS2 can be found online at http source redhat com jffs2 5 Porting 5 1 Target Platform In order to port the eCos to the new hardware platform Atmel AT91R40807 select AT91EB40 Evaluation Board which is similar to the new hardware platform as the ba

Download Pdf Manuals

image

Related Search

Related Contents

Archival Accessioning Manual - UCI Libraries Staff Intranet  Samsung GT-C3750 Korisničko uputstvo  ATTENTION:  Design House 154088 Instructions / Assembly  Dicota D31035  Samsung GT-I9003/M4 Manual de utilizare(Froyo ver.)  Vacuum Gun-Adapter for C.R. Bard Vacora  Model 5340V User`s Manual - English: Low Res  Wizard Extreme  Manual del Usuario Arquetipo Activos Fijos 2.0  

Copyright © All rights reserved.
Failed to retrieve file