Dave McGuire wrote:
> On 12/23/2013 04:55 AM, Ben Shi wrote:
>> The sdcc generates .ihx by default, but how to convert the .ihx to a
>> binary image, which is more common?
>    "More common"?  Hardly.  They are different file formats with
> different capabilities which are intended and used for different purposes.

I fully agree. And there are different scenarios, devices and setups 
with different needs of binary files.
>> Though there are many tools on the internet, is there a built-in tool
>> inside SDCC?
>    There isn't that I'm aware of.  On a UNIX system with GNU binutils
> installed, you can do this:
>
> $ objcopy -Iihex -Obinary in.hex out.bin

There is also Hex2bin from http://sourceforge.net/projects/hex2bin/ .

Heres on' example that makes sdcc's makebin different from hex2bin.

It seems that sdcc's makebin would always generate a file meant to start 
at address 0, and pad with zeroes if the ihx started at a different address.

By default hex2bin would just make a binary file where the first byte 
corresponds to the lowest adress mentioned in the ihx.

Dave's command line "objcopy -Iihex -Obinary in.hex out.bin" performs 
like hex2bin, though it might be tuned to perform like makebin in this 
respect.

Both hex2bin and GNU objcopy allow to specify an output padding byte 
value for "holes" in IHX, which makebin does not.

Ben Shi wrote:

 > The sdcc generates .ihx by default, but how to convert the .ihx to a 
binary image, which is more common?
 >
 > Though there are many tools on the internet, is there a built-in tool 
inside SDCC?

What other tools were you thinking of ? How do they compare with the 
three mentioned here ?

Regards,

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to