Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: h28daniel on February 21, 2011, 11:49:36 pm

Title: Intel 8031 - Hex file output
Post by: h28daniel on February 21, 2011, 11:49:36 pm

 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
Title: Re: Intel 8031 - Hex file output
Post by: scarphin on February 22, 2011, 09:39:32 am
Some instructions here:
http://www.mail-archive.com/sdcc-user@lists.sourceforge.net/msg01856.html (http://www.mail-archive.com/sdcc-user@lists.sourceforge.net/msg01856.html)
Title: Re: Intel 8031 - Hex file output
Post by: h28daniel on February 22, 2011, 04:56:00 pm


  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
Title: Re: Intel 8031 - Hex file output
Post by: stahta01 on February 22, 2011, 05:09:43 pm
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)
Title: Re: Intel 8031 - Hex file output FIXED!!!
Post by: h28daniel on February 22, 2011, 05:19:17 pm

 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
Title: Re: Intel 8031 - Hex file output
Post by: scarphin on February 22, 2011, 07:21:01 pm
Don't forget to write a template for a 8051 project when u get expert enough and post it here. ;)
Title: Re: Intel 8031 - Hex file output
Post by: h28daniel on February 22, 2011, 09:53:11 pm

  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
Title: Re: Intel 8031 - Hex file output
Post by: frithjofh on February 23, 2011, 02:39:43 pm
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