Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1.Introduction 2.Real-Time System Design Considerations 3.Hardware Interrupts (HWI) 4.Software Interrupts (SWI) 5.Task Authoring (TSK) 6.Data Streaming (SIO) 7.Multi-Threading (CLK, PRD) 8.BIOS Instrumentation (LOG, STS, SYS, TRC) 9.Static Systems (GCONF, TCONF) 10.Cache (BCACHE) 11.Dynamic Systems (MEM, BUF) 12.Flash Programming (HexAIS, Flashburn) 13.Inter-Thread Communication (MSGQ,...) 14.DSP Algorithm Standard (XDAIS) 15.Input Output Mini-Drivers (IOM) 16.Direct Memory Access (DMA) 17.Review DSP/BIOS System Integration Workshop 1 T TO Technical Training Organization
Booting From Flash System Startup Initialization Files Build Process Hex AIS Flashburn Lab 2 T TO Technical Training Organization
System Startup – CCS Load vs Flash Boot 1. RESET goes high 2. Sample boot pins 3. Peripheral, CPU registers reset 4. Load demo from FLASH - IRAM / Cache setup 5. CCS halts CPU 6. Initialization GEL file sets up: - Interrupts - EMIF 7. CCS loads code & data to test 8. CCS releases target on ‘run’ cmd - Reset routine (_c_int00) - BIOS_init() - main() - init - BIOS_start() - BIOS scheduler begins 1. RESET goes high 2. Sample boot pins 3. Peripheral, CPU registers reset 4. AIS.INI code sets up: - Interrupts - EMIF 5. Load code from FLASH to RAM 6. Program begins from 0x Reset routine (_c_int00) - BIOS_init() - main() - init - IRAM/Cache setup - BIOS_start() - BIOS scheduler begins 3 T TO Technical Training Organization
Booting From Flash System Startup Initialization Files Build Process Hex AIS Flashburn Lab 4 T TO Technical Training Organization
CCS GEL File Provided by TI Puts DSP in mode good for most users Can be modified as desired Runs on CCS connect to target 5 T TO Technical Training Organization
hexAIS Conversion.ini File Provided by TI Puts DSP in mode good for most users Can be modified as desired Runs on boot from flash Specifies behavior of Boot Mode PLL DDR EMIF PinMux Pwr Domains 6 T TO Technical Training Organization
Cache Setup via BCACHE API #include // headers for BIOS Cache functions setCache() { char *DDR2BASE = (char *) 0x ;// Pointer to DDR2 base addr struct int DDR2SZ = 0x07D00000;// size of DDR2 area on DM6437 EVM BCACHE_Size cachesize;// L1 and L2 cache size struct BCACHE_setMode(BCACHE_L1D, BCACHE_NORMAL);// set L1D cache mode to normal BCACHE_setMode(BCACHE_L1P, BCACHE_NORMAL);// set L1P cache mode to normal BCACHE_setMode(BCACHE_L2, BCACHE_NORMAL);// set L2 cache mode to normal cachesize.l1dsize = BCACHE_L1_32K;// L1D cache size 32k bytes cachesize.l1psize = BCACHE_L1_32K;// L1P cache size 32k bytes cachesize.l2size = BCACHE_L2_0K;// L2 cache size ZERO bytes BCACHE_setSize(&cachesize);// set the cache sizes BCACHE_inv(DDR2BASE, DDR2SZ, TRUE);// invalidate DDR2 cache region BCACHE_setMar(DDR2BASE,DDR2SZ,BCACHE_MAR_ENABLE); // all DDR2 is now cacheable } 7 T TO Technical Training Organization
Cache Setup via Config Tool 8 T TO Technical Training Organization
Booting From Flash System Startup Initialization Files Build Process Hex AIS Flashburn Lab 9 T TO Technical Training Organization
CCS: Project / Build Build Steps : CCS/Debug vs Flash file.out CCS: File / Ld Pgm CCS: Project / Build file.out Flashburn DDR DVEVM Hex AIS file.hex DM643x.ini FbConfig1.cdd Cx: L1, L2 Flash DDR DVEVM Cx: L1, L2 Flash evmdm6437.gel 10 T TO Technical Training Organization
Booting From Flash System Startup Initialization Files Build Process Hex AIS Flashburn Lab 11 T TO Technical Training Organization
Hex Conversion Utility (hex6x.exe) hex.ini app.out hex6x app.hex ASCII-hex Tektronix Intel MCS-86 Motorola-S TI-tagged Converts an “.out” file into one of several hex formats suitable for loading into an EPROM programmer Boot-loader copies code/data from FLASH to IRAM/SDRAM When using the hardware boot, you do not have to relink your program with run/load addresses - HEX6x takes care of this for you If desired, code/data can still be accessed from flash at run-time 12 T TO Technical Training Organization
Map file representation of COPY_TABLE CONTENTS: f.boot_load ff FILL = af13 BOOT TABLE.hwi_vec : btad= dest= size= sysinit : btad= c dest= size= trcdata : btad= dest=00002d68 size= c.gblinit : btad= dest=00002d74 size= cinit : btad=640009c4 dest= size= pinit : btad=64001e20 dest=00002da8 size= c.const : btad=64001e34 dest=00002db4 size=000000cf.text : btad=64001f0c dest=00004ce0 size= bios : btad= dest= size=00003ee0.stack : btad= c dest=0000c520 size= trace : btad=64009b64 dest=0000c920 size= rtdx_text : btad=64009d6c dest=0000cf60 size=00000ee0.args : btad=6400ac54 dest=00002fc0 size= log : btad=6400ac60 dest=00002fc4 size= LOG_system$buf : btad=6400ac98 dest=0000e300 size= logTrace$buf : btad=6400ada0 dest=0000e400 size= sts : btad=6400aea8 dest=0000e2a0 size= af ffff FILL = Example-hex.map By default, HEX AIS adds all “initialized” sections to the bootloader table 13 T TO Technical Training Organization
CCS GEL Menu 14
CCS Project View 15
Booting From Flash System Startup Initialization Files Build Process Hex AIS Flashburn Lab 16 T TO Technical Training Organization
Launching FlashBurn 17
FlashBurn Configuration NOTE 18
Getting the FlashBurn Tool 19
Booting From Flash System Startup Initialization Files Build Process Hex AIS Flashburn Lab 20 T TO Technical Training Organization
ti Technical Training Organization 21
Booting From Flash Current Milestone Other Milestones 22 T TO Technical Training Organization