This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

About section placement of "SEGGER Embedded Studio"

I have a question about "SEGGER Embedded Studio for ARM V4.12".

I want to place the section of the FLASH area arbitrarily.
And, for example, I want to place the following constants in that section.
(For example, 0x77FF0 to 0x77FF2 section layout)

const uint8_t table_data [3] = {1, 2, 3};

Please tell me how.

Parents Reply Children
  • I changed "flash_placement.xml" as follows.

    <!DOCTYPE Linker_Placement_File>
    <Root name="Flash Section Placement">
      <MemorySegment name="FLASH" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
        <ProgramSection load="no" name=".reserved_flash" start="$(FLASH_PH_START)" size="$(FLASH_START)-$(FLASH_PH_START)" />
        [...]
    	<ProgramSection alignment="4" load="No" name=".sp_flash" start="0x00077FF6" size="0x00000006" />
      </MemorySegment>
      <MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
        [...]
      </MemorySegment>
    </Root>
    

    In addition, I added the following processing.

    const uint8_t flash_test[1] __attribute__((section (".sp_flash"))) __attribute__((used)) = {0xBC};

    I thought "0xBA" was written at the address 0x00077FF6.
    However, I confirmed that it was not written at that address.


    Please tell me the cause and countermeasures.

Related