CodeWarrior and .bin File.

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

CodeWarrior and .bin File.

5,280 Views
Apumphrey
Contributor I

Hi,

 

I have been using CodeWarrior version 6.3 to compile for the MCF5208.  I had to upgrade to version 7.1.2 for a new processor, but am having trouble getting the same output for the MCF5208 project between the 2 versions.

 

In version 6.3 when I chose to create a binary image, I get a good file that works.

 

In version 7.1.2 when I chose to create a binary image, I get a file with some kind of address and length information in it like an .s19 file. 

 

The .s19 files look good for both versions, but I need to get a binary output.

 

Does anyone know why there might be address and length information in the binary image for version 7.1.2? 

 

Thanks.

Labels (1)
0 Kudos
6 Replies

1,399 Views
M_ttferrari
Contributor III

Hi, I seem that I have the same problem but i'm working with CW 7.1 and my ÇMCU is MCD5213. My problem is when I create the BIN file to attach it in anywhere that I need. Then, when the program jumps to this portion of FLASH where BIN file is, appear an address exception... So, I looked for this part of FLASH and I had seen what is in those address, and I found that the BIN file put there wasn't the same data than s19 file. For example in s19 at address 0x300 the data is 0000318D0, and when I put the BIN file of the same s19 file into 0x300 the data at this address is 200318D0. Note that tha data es very similar in each case except for the 2 at the MSB. This happend in others address too, for this reason when I jump to this address occur that address exception.

 

Matt 

 

 

0 Kudos

1,399 Views
M_ttferrari
Contributor III

I've found this on codewarrior help

 

Binary file format is address (4 bytes), byte count (4 bytes), and data bytes (variable length).

 

But I don't understand.

 

Matt 

0 Kudos

1,399 Views
M_ttferrari
Contributor III

Well, I've found a solution for this problem. Istead of create BIN file from linker panel, I created BIN file from debuger. I do the debug of application that I need to convert into BIN and go to >> debug menu >> ColdFire >> Load/Save memory. Then select the part of memory that you need to convert in BIN file (You could transform it in s19 or text too). With this manner the BIN file will be created fine. At least work well for me.

 

Matt  

0 Kudos

1,399 Views
FridgeFreezer
Senior Contributor I

Just thought I'd post up to thank Matt for his solution, it's saved me a lot of time with my current problem.

0 Kudos

1,399 Views
paulsky
Contributor II

Hi,

 

 

I have tried a command line utility which converts the files to .bin and does not suffer the 64k size restriction. It's called s-record. You can find it here: http://www.s-record.com . I have tested it with the output generated from codewarior 6.3.

 

Hope this helps for anyone who needs it.

 

 

 

 

0 Kudos

1,399 Views
gmnelson
Contributor III

This is a great solution to this issue!  Thanks for sharing!

 

Now if I can only find a tool to append a 2-byte Modbus CRC, I'd be set.

0 Kudos