Hi,
I downloaded MQX4.0, CW10.3, and I'm trying to build the hello_twrk60f120m and gpio_twrk60f120m project. They are failing to link:
Overflow in segment: rom from section: .main_application Segment reserved size is: 0x0000fbe0 -- Overflow of: 0x000004e4
Overflow in segment: rom from section: .main_application Segment reserved size is: 0x0000fbe0 -- Overflow of: 0x000009b0
Seems to be a problem with the memory space allocated in the linker file. Any ideas?
PMT
Solved! Go to Solution.
Hello pmt,
The error hints the clue, overflow in segment. This is copied from intram linker command file:
vectorram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00000420 # SRAM - Vector table
rom (RX): ORIGIN = 0x1FFF0420, LENGTH = 0x0000FBE0 # SRAM - Code + Const data
ram (RW): ORIGIN = 0x20000000, LENGTH = 0x00010000 # SRAM - RW data
Rom segment size is 0xfbe0. Demos you built were bigger in size than available space in that segment therefore they don't fit.If this case happens, use FLASH target.
Regards,
MartinK
Hello pmt,
The error hints the clue, overflow in segment. This is copied from intram linker command file:
vectorram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00000420 # SRAM - Vector table
rom (RX): ORIGIN = 0x1FFF0420, LENGTH = 0x0000FBE0 # SRAM - Code + Const data
ram (RW): ORIGIN = 0x20000000, LENGTH = 0x00010000 # SRAM - RW data
Rom segment size is 0xfbe0. Demos you built were bigger in size than available space in that segment therefore they don't fit.If this case happens, use FLASH target.
Regards,
MartinK
Gotcha, use the FLASH target. I'm new to CW and it wasn't clear I was building a RAM only target. Please note, I'm following the June 2012 'CW for Microcontrolles v10.2 and MQX3.8' guide step by step, so there seems to be a step missing.
Thanks Martin!
PMT
MQX4.0 is a little bigger than MQX3.8 if both use the default configuration to build. Your error indicated that the code size is larger than the code region. So you can fix this issue by either switching to FLASH target or increasing the code region size.
Shenwei