Keil Logo

How to link the binary file into HEX?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
Oleg Tren
Posted
10-Apr-2007 11:20 GMT
Toolset
C166
New! How to link the binary file into HEX?

Please help me!

I want to place the binary files into flash memory as constants.
How can I do it?

Thank you.

Read-Only
Author
Alex Ruiz
Posted
12-Apr-2007 00:56 GMT
Toolset
C166
New! RE: How to link the binary file into HEX?

Did you try a search in this forum? I have the impression that this was attempted several times in the past.

Read-Only
Author
Oleg Tren
Posted
12-Apr-2007 12:23 GMT
Toolset
C166
New! RE: How to link the binary file into HEX?

I beg your pardon!

Now I've learned the several ways to solve this problem:

1 - convert BIN file into *.c file and then compile it with project
2 - convert BIN file into HEX file at the specify location and then split this HEX with program HEX.
3 - The other way is LOAD Data HEX during Debug session into RAM use 'LOAD' keyword. Then I can program RAM contents into Flash.

all correct?
Do anobody know the other way to resolve this issue?

Read-Only
Author
Alex Ruiz
Posted
12-Apr-2007 16:10 GMT
Toolset
C166
New! RE: How to link the binary file into HEX?

It sounds correct. The one to use depends on what, how and when you need to update those constants.

I think more alternatives could be found, but it depends on what approach you are willing to use, I'm referring to compile-time or rum-time update of your Flash constants.

Options number 1, 2 and 3 are all compile-time ways to do it.

If you are looking for a compile-time solution, and options number 1, 2 and 3 cannot be used, you may be trying to solve a political problem :-)

Read-Only
Author
Reinhard Keil
Posted
12-Apr-2007 16:29 GMT
Toolset
C166
New! RE: How to link the binary file into HEX?

This may help http://www.keil.com/support/docs/2218.htm

Read-Only
Author
Oleg Tren
Posted
12-Apr-2007 17:34 GMT
Toolset
C166
New! RE: How to link the binary file into HEX?

Thanks to everyone who pitched in and helped.

Of course, I see the difference between run- and compile- time placing BIN DATA.
In a first time I want to compile-time place DATA file into ROM.

Read-Only
Author
Joost Leeuwesteijn
Posted
13-Apr-2007 10:33 GMT
Toolset
C166
New! RE: How to link the binary file into HEX?

See also: http://srecord.sourceforge.net/
which contains the "C Array" format. It's Open Source.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.