News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Intel 8031 - Hex file output

Started by h28daniel, February 21, 2011, 11:49:36 PM

Previous topic - Next topic

h28daniel


Hi,

I hope you can help, I'm new to C programming and came to C::B for a good recommendation.

So I've created my first project "empty project" and a simple code, it all compiles find (with SDCC) but it wont output a hex file, I made sure the option on the compiler settings " Output intel hex (default)" is ticked.

After reading around the forum I found some suggestion to use the post_build option which I try to do with 2 codes, these were: --out-fmt-ihx and intel-elf-objcopy -O ihex executable hexfile, neither one worked.

Could any body please help me out? any help would be much appreciated, thank you in advanced,

Regards
Daniel


h28daniel



  Hi,

Great, thank you for replying, I've followed the intructions and I've getting now my .hex file  :D but, when sending the hex to my board it gives me some error "187 bytes unable to write" this is using Hyper-Terminal. Thus I think this is to do with my starting address parameters, as by default the university software we use (M-IDE - www.opcube.com) has under Compiler - Parameters the code "--code-loc 0x8000 --stack-auto --vc --xram-loc 0xf000", thus where in CB can i put this line?

Thank you very much!
Daniel

stahta01

First try the normal way under Compiler Options
Project -> Build Options
Tab: Compiler Flags

If not there try under
Project -> Build Options
Tab: Other Options

Note: If the option is an linker settings try the below
Project -> Build Options
Tab: Linker Settings (Other Linker Options)
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

h28daniel


Hi,

YES all working now, I put the line of code in Compiler settins -> Other options as you suggested and all great now, thank you!!!  :D :D :D

scarphin

Don't forget to write a template for a 8051 project when u get expert enough and post it here. ;)

h28daniel


  Of course not problem, I will be working with this 8031 for a least 3 weeks so hopefully then if you let me know how to make a template, I will do it,

Regards
Daniel

frithjofh

Hello Daniel,

to make a template, set up a basic working project and save it as user template with "File -> Save Project as template ...".

Regards
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100