Hello,
I'm doin a proyect whit the micro MPC 5744P with GNU toolchain.
I'm triyin to define a variable that can write and read but not initialize in all the power on of.
I'm tray to define a variable in liker scrip but I dont get the espected results
My example is this:
Linker script
MEMORY
{
flash_rchw : org = 0x00F98000, len = 4
cpu0_reset_vec : org = 0x00F98004, len = 4
m_my_flash : org = 0x01000000, len = 4
m_text : org = 0x01000004, len = 2048K - 4
m_my_ram : org = 0x40000000, len = 4
m_data : org = 0x40000004, len = 384K - 4
local_dmem :org = 0x50800000, len = 64K
}
SECTIONS
{
...............
.startup_state_sect ORIGIN(m_my_ram) :
{
KEEP (*(.startup_state_sect))
} > m_my_ram AT > m_my_flash
......................
}
Code:
uint32_t __attribute__((__section__(".startup_state_sect"))) startup_state;