MQX4.0 CW 10.3 twrk60f120m 'hello world' example project build fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX4.0 CW 10.3 twrk60f120m 'hello world' example project build fails

Jump to solution
1,055 Views
pmt
Contributor V

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

0 Kudos
1 Solution
433 Views
c0170
Senior Contributor III

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

View solution in original post

0 Kudos
3 Replies
434 Views
c0170
Senior Contributor III

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

0 Kudos
433 Views
pmt
Contributor V

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 

0 Kudos
433 Views
ShenweiWang
NXP Employee
NXP Employee

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

0 Kudos