MCU User Forum
  Silabs IDE - HEX file creation

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Silabs IDE - HEX file creation
Shyam
New Member
posted June 11, 2010 12:50 AM     Click Here to See the Profile for Shyam   Click Here to Email Shyam     Edit/Delete Message
Hello,
Can we create a HEX file in Silabs IDE, as we do in Keil IDE?

regards
Shyam

IP: Logged

classics
Member
posted June 11, 2010 03:42 AM     Click Here to See the Profile for classics   Click Here to Email classics     Edit/Delete Message
Sure as long as 'hex file' means a bunch of ascii hex values separated by carriage returns. (not kidding, gotta love outsourced software)

Otherwise you should use the Keil tools to create a hex file from the OMF output.

IP: Logged

erikm
Member
posted June 11, 2010 04:05 AM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
Otherwise you should use the Keil tools to create a hex file from the OMF output.

I do not use the IDE Keil or SILabs or anyone else (the shortcomings are too many), so I would not know, but it sounds ridiculous that the IDE can not generate a .hex file directly.

Erik

IP: Logged

Shyam
New Member
posted June 11, 2010 05:41 AM     Click Here to See the Profile for Shyam   Click Here to Email Shyam     Edit/Delete Message
Hi Classics,
I can't figure out how to generate a HEX file in SiLabs IDE, from your reply. Could you please explain it?

Hi Erik, unlike the Keil IDE, the Silabs does not create any HEX file (to my knowledge). It just compiles, then when we connect the hardware, it gives option to download the HEX file to the hardware. It does not allow the user to save the HEX file,somewhere in the folder.

Shaym

[This message has been edited by Shyam (edited June 11, 2010).]

IP: Logged

Scotty
Member
posted June 11, 2010 06:11 AM     Click Here to See the Profile for Scotty     Edit/Delete Message
Hi Shyam,

maybe you can use the SiLabs flash tools to read out the code memory and save it as a hex file.

Regards,

Scotty

IP: Logged

worknhard9062
Member
posted June 11, 2010 07:07 AM     Click Here to See the Profile for worknhard9062   Click Here to Email worknhard9062     Edit/Delete Message
It's best for these discussions to keep in mind that the IDE isn't doing any of the things you mention. The IDE (whether Keil uVision or Silabs) is merely a launch pad for the command line compiler/ assembler/ linker and, to your question, the Object to HEX converter tool, OH51.exe.

In Silabs IDE there is a check box the Project Menu, Target Build Configuration item, dialog box called "Generate hex file", with an edit box to file in the name of the command line tool that will get launched to do the job.

Hope that helps.

------------------
Regards,
Steve C.

IP: Logged

Shyam
New Member
posted June 11, 2010 08:20 AM     Click Here to See the Profile for Shyam   Click Here to Email Shyam     Edit/Delete Message
Hi Scotty,
thanks for your suggestion. I read and saved the code memory in a notepad file, but its not in Intel HEX file format (obviously), seems we need to convert the pure HEX code into Intel-HEX file format. I dont know how to do it.

Hi Steve,
Thank you, so much. It works!
I get back my words that we can't create a HEX file from Silabs IDE. I apologize!

Thanks to everyone whoever tried to help me .

regards
Shyam.


[This message has been edited by Shyam (edited June 11, 2010).]

[This message has been edited by Shyam (edited June 11, 2010).]

IP: Logged

worknhard9062
Member
posted June 11, 2010 10:08 AM     Click Here to See the Profile for worknhard9062   Click Here to Email worknhard9062     Edit/Delete Message
Happy to help

There are two things being discussed in this thread.
1) How to convert compiled/linked OBJECT code into Intel HEX format.
2) How to convert already downloaded code in FLASH to HEX file on PC.

For 2) you need to use the IDE Tools menu and the Upload Memory to File. However you'll be disappointed because that function doesn't create a nicely formatted Intel HEX file. It's just a stream of ASCII codes corresponding to binary values from FLASH, with each code separated by CRLF. That format is not very useful. I think that is what Scotty was suggesting and what classics was referring to.

Too bad, maybe someday Silabs will improve this feature. By the way, you don't need a HEX file to download to FLASH, right? You can just use OMF output.
Good luck!


------------------
Regards,
Steve C.

[This message has been edited by worknhard9062 (edited June 11, 2010).]

IP: Logged

twystron78
New Member
posted June 14, 2010 03:25 AM     Click Here to See the Profile for twystron78   Click Here to Email twystron78     Edit/Delete Message
Hi

The hex file is in the root project directory. Im using the Silabs IDE and it generates it for me just fine !

Regards

IP: Logged

erikm
Member
posted June 14, 2010 06:46 AM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
I thought so

IP: Logged

andrei
New Member
posted July 01, 2010 03:13 PM     Click Here to See the Profile for andrei     Edit/Delete Message
This is a good question. I get an error when trying do generate hex file like UNKNOWN OH51-CONTROL 'AND', What is exactly the difference beetween the OMF and the HEX file? What file is downloaded into the MCU exactly??

IP: Logged

erikm
Member
posted July 01, 2010 03:30 PM     Click Here to See the Profile for erikm   Click Here to Email erikm     Edit/Delete Message
commandline or IDE?

Erik

IP: Logged

Tsuneo
Member
posted July 01, 2010 03:54 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
It may be too late comment,

worknhard9062

2) How to convert already downloaded code in FLASH to HEX file on PC.

For 2) you need to use the IDE Tools menu and the Upload Memory to File. However you'll be disappointed because that function doesn't create a nicely formatted Intel HEX file. It's just a stream of ASCII codes corresponding to binary values from FLASH, with each code separated by CRLF. That format is not very useful.

SiLabs offer a utility (ASC2HEX_v1.1.zip) as an attachment file of this KB
This utility converts the IDE readout into HEX file.

SiLabs MCU KB 174726: "Copying firmware from one MCU to another"
http://cp-siliconlabs.kb.net/article.aspx?article=174726&p=4120

Tsuneo

IP: Logged

worknhard9062
Member
posted July 06, 2010 09:27 AM     Click Here to See the Profile for worknhard9062   Click Here to Email worknhard9062     Edit/Delete Message
Tsuneo,
It's never too late for your helpful advice. Thank you for drawing my attention to that Knowledge Base article and associated utility.

andrei,
I get an error when trying do generate hex file like UNKNOWN OH51-CONTROL 'AND',
If you are using the Silabs IDE to generate HEX file (per above discussion using Target Build Configuration, Generate HEX file) then examine the Output window in the IDE for something like:
Generating hex file...
C:\Keil\C51\BIN\oh51.exe "C:\Projects\Test.OMF"

The text shown in your Output window will be the exact line that the IDE emits to the OH51.exe program to perform the HEX conversion. Perhaps the command line has an error in it involving the word "AND" (per your question).

HEX file is file format originally created by Intel and adopted by many. It displays the binary values of the program in ASCII form, appending record framing information (start of record, count, checksum, etc.)

The OMF file format information can be found here.


------------------
Regards,
Steve C.

IP: Logged

massart
New Member
posted August 15, 2010 07:51 AM     Click Here to See the Profile for massart   Click Here to Email massart     Edit/Delete Message
Hi worknhard9062 !
I just find on your post the answer I am looking for : how to generate HEX file ?
But I don't find option "generate hex file" in my IDE Build Configuration window. Is my IDE version too old (Silabbs IDE v. 2.91)? or is there anything bad configured ?
My goal is to use application AN112 to download firmware in a C8051F005 via UART. Example is given in AN112 for C8051F020 : is there impossibilities to adapt it for C8051F005 ?
Best regards and thanks for your help

------------------

IP: Logged

massart
New Member
posted August 16, 2010 05:20 AM     Click Here to See the Profile for massart   Click Here to Email massart     Edit/Delete Message
An update of my IDE to v4.02 solved my problem.
I'm trying now to adapt AN112 soft for my C8051F005 !
Thanks to all contibutors, even if I find a bit of solution by myself !

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b