Hi,
I'm new to Segger Embedded Studio developmemt. And now I met a problem similar to Placing data at a specific memory address with Segger Embedded Studio.
I need to put constant firmware information in specify address(softdevice size + offset(0x2000)) to allow PC software readout fixed infomation,
#if defined (__CC_ARM )
const app_infor_t appl_info __attribute__((at((uint32_t)APP_FW_INFO_START_ADDRESS))) =
{
.magic = APP_FW_MAGIC_CODE,
.fw_version = FW_REVISION,
.fw_size = APP_FW_SIZE,
.hw_version = APP_FW_HW_VER,
.sd_version = APP_FW_SD_VERSION,
.sd_fw_id = APP_FW_SD_FW_ID,
.date = APP_FW_DATE,
.time = APP_FW_TIME,
};
#elif defined( __GNUC__ ) || defined ( __SES_ARM )
const app_infor_t appl_info __attribute__((section(".firmware_info_page"))) =
{
.magic = APP_FW_MAGIC_CODE,
.fw_version = FW_REVISION,
.fw_size = APP_FW_SIZE,
.hw_version = APP_FW_HW_VER,
.sd_version = APP_FW_SD_VERSION,
.sd_fw_id = APP_FW_SD_FW_ID,
.date = APP_FW_DATE,
.time = APP_FW_TIME,
};
#else
#endif
As I follow the answer of Placing data at a specific memory address with Segger Embedded Studio . AfterAdding description to flash_placement.xml
<!DOCTYPE Linker_Placement_File>
<Root name="Flash Section Placement">
<MemorySegment name="FLASH" start="$(FLASH_PH_START)" size="$(FLASH_PH_SIZE)">
[...]
</MemorySegment>
<MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">
[..]
</MemorySegment>
<MemorySegment name="firmware_info_page" start="0x00028000" size="0x100">
<ProgramSection alignment="4" keep="Yes" load="Yes" name=".firmware_info_page" address_symbol="__start_firmware_info_page" end_symbol="__stop_firmware_info_page" start = "0x00028000" size="0x100" />
</MemorySegment>
</Root>
Rebuild project, but I can't see the fixed information contain in HEX files.
So the question is how to realise the function in Segger Embedded Studio ? Any help that is appreciate!