Definitely a linker bug in Coldfire 10.1 INCLUDE - corrupts 0x0a characters!

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

Definitely a linker bug in Coldfire 10.1 INCLUDE - corrupts 0x0a characters!

413 Views
DrTune
Contributor I

https://community.freescale.com/message/96116#96116

 

Hi this is trivially reproduced; 

 

 Codewarrior 10.1 on Windows

 

1) set up a project (I'm on coldfire V1+) that compiles and you can debug or can print somehting out of.

2) make a binary file containing for example the four bytes  0x00 , 0x0a , 0x00, 0x0a   

3) Make a folder in your project, put it in there, edit the project directories so the folder is on the "library" path and the linker can find it

4) in your .LCF linker file, add a section at the end of your code to include it , e.g.

 

__MY_TEST = .;

INCLUDE "testfile.bin"

 

within the section that ends with

} >> code

 

5) Compile code

6) In code, or with debugger, look at contents of your "testfile.bin" in memory

7) Enjoy that your 0x0a is silenty turned into 0x0d

8) If it took you hours of debugging to find this, you may lean back and give a little sigh at this point.

Labels (1)
0 Kudos
1 Reply

218 Views
BlackNight
NXP Employee
NXP Employee

this is definitely bad. I have contacted engineering and logged it as a bug.

 

BK

0 Kudos