--------------------------------------------- LINKERS BELOW ---------------------------------------------------- /* //########################################################################### // // FILE: 2837x_FLASH_Bootloader.cmd // TITLE: Linker Command File for F28379D Bootloader (SECTORS A + B) // //########################################################################### */ MEMORY { PAGE 0 : BEGIN : origin = 0x080000, length = 0x000002 FLASH_BOOT : origin = 0x080002, length = 0x003FFE /* Bootloader gets LS0 and LS1 for running Flash API */ RAMLS0 : origin = 0x008000, length = 0x000800 RAMLS1 : origin = 0x008800, length = 0x000800 RESET : origin = 0x3FFFC0, length = 0x000002 PAGE 1 : BOOT_RSVD : origin = 0x000002, length = 0x000121 /* Bootloader gets M1 for its Stack */ RAMM1 : origin = 0x000400, length = 0x0003F8 /* Bootloader gets LS2 and G01 for its massive Global Variables buffers */ RAMLS2 : origin = 0x009000, length = 0x000800 G01 : origin = 0x00C000, length = 0x002000 } SECTIONS { codestart : > BEGIN, PAGE = 0, ALIGN(4) .text : > FLASH_BOOT, PAGE = 0, ALIGN(4) .cinit : > FLASH_BOOT, PAGE = 0, ALIGN(4) .pinit : > FLASH_BOOT, PAGE = 0, ALIGN(4) .switch : > FLASH_BOOT, PAGE = 0, ALIGN(4) .reset : > RESET, PAGE = 0, TYPE = DSECT #if defined(__TI_EABI__) .const : > FLASH_BOOT, PAGE = 0, ALIGN(4) .init_array : > FLASH_BOOT, PAGE = 0, ALIGN(4) .bss : >> RAMLS2 | G01, PAGE = 1 .data : >> RAMLS2 | G01, PAGE = 1 .sysmem : >> RAMLS2 | G01, PAGE = 1 #else .econst : > FLASH_BOOT, PAGE = 0, ALIGN(4) .ebss : >> RAMLS2 | G01, PAGE = 1 .esysmem : >> RAMLS2 | G01, PAGE = 1 .cio : >> RAMLS2 | G01, PAGE = 1 #endif .stack : > RAMM1, PAGE = 1 /* Bootloader Flash Functions run in LS0 and LS1 */ .TI.ramfunc : {} LOAD = FLASH_BOOT, RUN = RAMLS0 | RAMLS1, LOAD_START(RamfuncsLoadStart), LOAD_SIZE(RamfuncsLoadSize), LOAD_END(RamfuncsLoadEnd), RUN_START(RamfuncsRunStart), RUN_SIZE(RamfuncsRunSize), RUN_END(RamfuncsRunEnd), PAGE = 0, ALIGN(4) Flash28_API: { ../F021_API_F2837xD_FPU32_EABI.lib(.text) } LOAD = FLASH_BOOT, RUN = RAMLS0 | RAMLS1, LOAD_START(Flash28_API_LoadStart), LOAD_SIZE(Flash28_API_LoadSize), RUN_START(Flash28_API_RunStart), PAGE = 0, ALIGN(4) } /****************************************************************************** * * 2837x_FLASH_Application.cmd - Application Linker for FOTA Bootloader * * APPLICATION STARTS AT 0x084000 (Sectors C-N) * BOOTLOADER USES 0x080000-0x083FFF (Sectors A-B) * ******************************************************************************/ MEMORY { PAGE 0 : /* Program Memory */ /* ═══════════════════════════════════════════════════════════════════════ * APPLICATION FLASH - Starts at 0x084000 * ═══════════════════════════════════════════════════════════════════════ */ BEGIN : origin = 0x084000, length = 0x000002 /* codestart */ /* Combined application flash: Sectors C through N */ /* C=0x84000(8K), D=0x86000(8K), E=0x88000(32K), F=0x90000(32K), */ /* G=0x98000(32K), H=0xA0000(32K), I=0xA8000(32K), J=0xB0000(32K), */ /* K=0xB8000(8K), L=0xBA000(8K), M=0xBC000(8K), N=0xBE000(8K) */ FLASH_APP : origin = 0x084002, length = 0x03BFFE /* ~240KB for app */ /* ═══════════════════════════════════════════════════════════════════════ * RAM for Program Execution * ═══════════════════════════════════════════════════════════════════════ */ /* Stack - use RAMM0 (safe area after boot reserved) */ RAMM0 : origin = 0x000123, length = 0x0002DD /* RAM functions - use RAMLS3 and RAMLS4 (bootloader uses RAMLS0) */ RAMLS3 : origin = 0x009800, length = 0x000800 RAMLS4 : origin = 0x00A000, length = 0x000800 RESET : origin = 0x3FFFC0, length = 0x000002 PAGE 1 : /* Data Memory */ BOOT_RSVD : origin = 0x000002, length = 0x000121 /* Boot ROM stack */ RAMM1 : origin = 0x000400, length = 0x0003F8 RAMD0 : origin = 0x00B000, length = 0x000800 RAMD1 : origin = 0x00B800, length = 0x000800 /* Local shared RAM for data */ RAMLS0 : origin = 0x008000, length = 0x000800 /* Available for app */ RAMLS1 : origin = 0x008800, length = 0x000800 RAMLS2 : origin = 0x009000, length = 0x000800 RAMLS5 : origin = 0x00A800, length = 0x000800 /* Global shared RAM - combined regions */ G01 : origin = 0x00C000, length = 0x002000 /* GS0 + GS1 */ G234 : origin = 0x00E000, length = 0x003000 /* GS2 + GS3 + GS4 */ G510 : origin = 0x011000, length = 0x006000 /* GS5 - GS10 */ RAMGS11 : origin = 0x017000, length = 0x000FF8 } SECTIONS { /* ═══════════════════════════════════════════════════════════════════════ * Code Sections - All in FLASH_APP * ═══════════════════════════════════════════════════════════════════════ */ codestart : > BEGIN, PAGE = 0, ALIGN(8) .text : > FLASH_APP, PAGE = 0, ALIGN(8) .cinit : > FLASH_APP, PAGE = 0, ALIGN(8) .pinit : > FLASH_APP, PAGE = 0, ALIGN(8) .switch : > FLASH_APP, PAGE = 0, ALIGN(8) .reset : > RESET, PAGE = 0, TYPE = DSECT /* Not used */ #if defined(__TI_EABI__) .init_array : > FLASH_APP, PAGE = 0, ALIGN(8) .const : > FLASH_APP, PAGE = 0, ALIGN(8) #else .econst : > FLASH_APP, PAGE = 0, ALIGN(8) #endif /* ═══════════════════════════════════════════════════════════════════════ * Stack - CRITICAL: Must be in lower 64K for C28x * ═══════════════════════════════════════════════════════════════════════ */ .stack : > RAMM0, PAGE = 0 /* ═══════════════════════════════════════════════════════════════════════ * RAM Functions - Run from RAMLS3/LS4 (Bootloader uses LS0) * ═══════════════════════════════════════════════════════════════════════ */ #ifdef __TI_COMPILER_VERSION__ #if __TI_COMPILER_VERSION__ >= 15009000 #if defined(__TI_EABI__) .TI.ramfunc : {} LOAD = FLASH_APP, RUN = RAMLS3 | RAMLS4, LOAD_START(RamfuncsLoadStart), LOAD_SIZE(RamfuncsLoadSize), LOAD_END(RamfuncsLoadEnd), RUN_START(RamfuncsRunStart), RUN_SIZE(RamfuncsRunSize), RUN_END(RamfuncsRunEnd), PAGE = 0, ALIGN(8) #else .TI.ramfunc : {} LOAD = FLASH_APP, RUN = RAMLS3 | RAMLS4, LOAD_START(_RamfuncsLoadStart), LOAD_SIZE(_RamfuncsLoadSize), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), RUN_SIZE(_RamfuncsRunSize), RUN_END(_RamfuncsRunEnd), PAGE = 0, ALIGN(8) #endif #else ramfuncs : LOAD = FLASH_APP, RUN = RAMLS3 | RAMLS4, LOAD_START(_RamfuncsLoadStart), LOAD_SIZE(_RamfuncsLoadSize), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), RUN_SIZE(_RamfuncsRunSize), RUN_END(_RamfuncsRunEnd), PAGE = 0, ALIGN(8) #endif #endif /* ═══════════════════════════════════════════════════════════════════════ * Data Sections * ═══════════════════════════════════════════════════════════════════════ */ #if defined(__TI_EABI__) .bss : >> RAMLS5 | RAMLS1 | RAMLS2 | G510, PAGE = 1 .bss:output : > RAMLS0, PAGE = 1 .bss:cio : > RAMLS5, PAGE = 1 .data : >> G510, PAGE = 1 .sysmem : > RAMLS1, PAGE = 1 #else .ebss : >> RAMLS5 | G01, PAGE = 1 .esysmem : > RAMLS5, PAGE = 1 .cio : > RAMLS5, PAGE = 1 #endif /* ═══════════════════════════════════════════════════════════════════════ * FreeRTOS Sections * ═══════════════════════════════════════════════════════════════════════ */ .freertosStaticStack : >> G01 | G234, PAGE = 1 .freertosHeap : >> G234 | G510, PAGE = 1 } /* //=========================================================================== // End of file. //=========================================================================== */