Hi
Version of the compiler is 7.2 CPU type mcf52277
Since my last post I reduced the project to a header table (similar to vetors) and a simple single line of C code. Looking in the binary file produced, preceding the header there are two longs the first is the start address and the second in the size of the header. We want to make a executable binary and having these longs in the code will obviously cause issues. The S Record produced fails as well as it has the wanted code and then the two longs listed below at the same address. How do we produce a pure binary to run without the debugger?
We de-selected "Generate symbolic Info" but the output binary and S record still include these longs.
Thanks
Tony
Hi all.
I've been wanting to find a solution for this as well.
Having the load address & # bytes in the binary file is a bit of a headache.
A simple solution would be to prepend a bit of code to the binary which copies each section based on the load address & number of bytes,
however, I found another solution which is even easier.
Although I've not tried it yet, I did see a solution in another post, so thought I would relay it here.
There are a set of free tools from uTasker - one of which will convert the binary output from CodeWarrior to a flat binary suitable for executing.
Here is the link to the uTasker Forum: http://www.utasker.com/forum/index.php?topic=1445.0
Under ' uTaskerConvert ' I see details of this function :
Added capability to convert Motorola binary to raw binary output. This is useful for CodeWarrior binary output
which can otherwise not be used directly as a code image - after the conversion the content is in raw binary format
and so suitable for general binary program use.
User "uTaskerConvert uTasker_BM.bin raw.bin -b"
I hope that helps.
Ewan J. Wordsworth
Microbee Technology Pty Ltd.
We also have a need for a pure binary file!
We were under the false impression that "Generate Binary Image" in CodeWarrior produced a pure binary image file. But this binary file seems to be a binary version of the .s19 file which means we still have to parse it. First 4 bytes are address, next 4 are number of data bytes, and then the data bytes follow. This is repeated for each unique section.
Freescale - how can we get the tools to generate a pure binary image that can be directly downloaded and programmed in flash without having to go through the extra task of parsing it.
Thanks.
objcopy for sure should be usable to create a binary, either from the S19 file or from the .elf/.afx file.
I used it like in this post: Converting S19 Files into Binary Files with GNU objcopy | MCU on Eclipse
You can use a post-build step to call objcopy:
http://mcuoneclipse.com/2013/10/29/s-record-manipulation-with-gnu-objcopy-and-burner-utility/
Erich