Other Parts Discussed in Thread: SYSBIOS, TIMAC, CC2650
I am writing for an existing (deployed) hardware product that has been running a non TI RTOS solution. Due to the nature of the flash on the CC2630 I cannot write to flash addresses below 0x1000 from software, thus any update I can apply remotely must only work with code at 0x1000 and after.
I've done the following to my ICF file
- define symbol FLASH_SIZE = 0x00020000; // 128K + define symbol FLASH_SIZE = 0x0001F000; // 124K .. -define region FLASH = mem:[from FLASH_START to FLASH_END]; +define region FLASH = mem:[from FLASH_SLOT_1 to FLASH_END]; .. -place at address mem:FLASH_START { readonly section .intvec }; -keep { readonly section .intvec }; +place at address mem:FLASH_SLOT_1 { readonly section .intvec }; +keep { readonly section .intvec }; ... (cc26xx_rtos_rom.icf, done with every item below 0x1000) -place at address mem:0x00000538 {readonly section .const_xdc_runtime_IModule_Interface__BASE__C}; +place at address mem:0x00001538 {readonly section .const_xdc_runtime_IModule_Interface__BASE__C};
The result compiles but fails shortly after jumping to __iar_program_start. It always ends at ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomLink__E. I attempted removing USE_SYSBIOS_IN_ROM=1 but it didn't change the result. The following code is still automatically generated in configPkg/package/cfg/app_prm3.c
Void ti_sysbios_rom_cortexm_cc26xx_CC26xx_checkRevision__E() { if (*((UInt32 *)(REVISION_WORD)) != 0x20284770) { ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomRevision__E(); } if (&ti_sysbios_rom_ROM_AONRTCChannelEnable != (Void *)(0x590)) { ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomLink__E(); } }
This code appears generated by CC26xx.xdt conditional on if it's an IAR build, nothing to do with sysbios being in ROM or where it might be located
%if (Program.build.target.$name.match(/iar/)) { #pragma inline=never Void ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomLink__E() { /* Loop here forever if application is built without the ROM section placements in the .icf file */ while(1) { ; } } %} Void ti_sysbios_rom_cortexm_cc26xx_CC26xx_checkRevision__E() { if (*((UInt32 *)(REVISION_WORD)) != 0x20284770) { ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomRevision__E(); } %if (Program.build.target.$name.match(/iar/)) { if (&ti_sysbios_rom_ROM_AONRTCChannelEnable != (Void *)(0x590)) { ti_sysbios_rom_cortexm_cc26xx_CC26xx_badRomLink__E(); } %} }
I'm not sure where to go from here. I either need a way to properly move the ROM references above 0x1000 or to work without them.