/* make sure below retain is there in your linker command file, it keeps the vector table in the final binary */ --retain="*(.vectors)" /* This is the stack that is used by code running within main() * In case of NORTOS, * - This means all the code outside of ISR uses this stack * In case of FreeRTOS * - This means all the code until vTaskStartScheduler() is called in main() * uses this stack. * - After vTaskStartScheduler() each task created in FreeRTOS has its own stack */ --stack_size=16384 /* This is the heap size for malloc() API in NORTOS and FreeRTOS * This is also the heap used by pvPortMalloc in FreeRTOS */ --heap_size=32768 SECTIONS { /* This has the M4F entry point and vector table, this MUST be at 0x0 */ .vectors:{} palign(8) > M4F_VECS .text: {} palign(8) > M4F_IRAM /* This is where code resides */ .bss: {} palign(8) > M4F_DRAM /* This is where uninitialized globals go */ RUN_START(__BSS_START) RUN_END(__BSS_END) .data: {} palign(8) > M4F_DRAM /* This is where initialized globals and static go */ .rodata: {} palign(8) > M4F_DRAM /* This is where const's go */ .sysmem: {} palign(8) > M4F_IRAM /* This is where the malloc heap goes */ .stack: {} palign(8) > M4F_IRAM /* This is where the main() stack goes */ /* add the resource table */ GROUP { /* This is the resource table used by linux to know where the IPC "VRINGs" are located */ .resource_table: {} palign(4096) } > DDR_0 /* Sections needed for C++ projects */ .ARM.exidx: {} palign(8) > M4F_IRAM /* Needed for C++ exception handling */ .init_array: {} palign(8) > M4F_IRAM /* Contains function pointers called before main */ .fini_array: {} palign(8) > M4F_IRAM /* Contains function pointers called after main */ } MEMORY { M4F_VECS : ORIGIN = 0x00000000 , LENGTH = 0x00000200 M4F_IRAM : ORIGIN = 0x00000200 , LENGTH = 0x0002FE00 M4F_DRAM : ORIGIN = 0x00030000 , LENGTH = 0x00010000 /* Resource table must be placed at the start of the "external code/data mem" * section that Linux allocates for the core. * M4F default allocation is at 0x9cc00000 */ DDR_0 : ORIGIN = 0x9cc00000 , LENGTH = 0x1000 }