Data alignment issue while changing "Linking order" in "Codewarrior for MPC55xx"

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

Data alignment issue while changing "Linking order" in "Codewarrior for MPC55xx"

499 Views
vitra_hk
Contributor I

Hello Team,

I am using MPC5534 controller for our application. I use code warrior as IDE. The IDE has been compiling the source code well and is being used since 4 years.

There is a strange behavior observed and is described below:

One of the C file has been rearranged in "Linking order", followed by successful compilation. I downloaded the MOT file to target board. The software runs fine without any RESETS or exceptions. However I see that CAN messages are coming out from board normally but the contents are changing randomly unlike normal case. When MAP files are compared between working / non-working conditions, there are absolutely no extra RAM or FLASH memory usage, only difference is order of memory addressed used for variable and functions in memory layout.

 

What could be the problem?

 

-Hk

 

Message was edited by: Hk

Labels (1)
0 Kudos
1 Reply

329 Views
trytohelp
NXP Employee
NXP Employee

Hi HK,

The link order defined the list order of modules integration in the application.

Best example explaining the behavior is with the printf example.

If your application contains your own printf code in a souce file as my_printf.c file for instance.

If the file is listed before the library in the link order, your own printf code will be used.

Else if the lib is listed before the my_printf.c file, the application will use the printf code defined in lib.

So the link order could have a big impact on your application.

May be you've experienced a similar problem.

hope this will help you.

regards

Pascal