My main program starts at 0x5000 so my linker file is
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00005000, LENGTH = 0x000001E8
m_text (RX) : ORIGIN = 0x00005410, LENGTH = 0x000FABF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
/*m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010*/
}
But a bin file generated at the offset 0x5000 not at 0. Even if I feed the file to a bootloader starting at 0x5000 in the bin file - main program doesn't run after exit from a bootloader.