Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.
We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.
Thank you for your understanding.
Hi,
I working on a project and I need to split my module into sections in the scatter file to easily update any of these sections with only the module bin file.
And I was able to allocate my modules into specific addresses with their ro-data.
But still facing an issue for adding (.data) data to these sections.
I want to add the module (.data) load base to the module section.
But when I do that and run the code, I got a hard fault.
I assumed that the hard fault I got, from trying to assign a value to any of the global variables.
Here Scatter file.
LR_IROM1 (_MEMORY_FLASH_BEGIN_+MEMORY_FLASH_APP_OFFSET) _MEMORY_FLASH_SIZE_ { ; load region size_region REGION_FLASH (_MEMORY_FLASH_BEGIN_ + MEMORY_FLASH_APP_OFFSET) (MEMORY_FLASH_APP_SIZE) { ; load address = execution address *.o (.intvec, +First) *(InRoot$$Sections) .ANY (+RO) } MODULE_A_SECTION 0x10078800 FIXED 2048{ module1.o (+RO +RW) module1.o (.rodata) } MODULE_B_SECTION 0x10079000 FIXED 2048{ module2.o (+RO +RW) module2.o (.rodata) } END_SECTION 0x10079800 FIXED EMPTY 0{} REGION_RAM2 (_MEMORY_RAM_BEGIN_ + MEMORY_RAM_APP_OFFSET) (_MEMORY_RAM_SIZE_ - MEMORY_RAM_APP_OFFSET) { ; RW data .ANY (+RW, +BSS) } REGION_RAM3 +0 UNINIT (_MEMORY_RAM_SIZE_ - MEMORY_RAM_APP_OFFSET) { ; RW data not initialized *.o (.noinit.data) } REGION_ROM _MEMORY_ROM_BEGIN_ EMPTY _MEMORY_ROM_SIZE_ { } ARM_LIB_STACKHEAP (_MEMORY_RAM_END_+1) EMPTY -_STACK_MEM_SIZE_ { } }