We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How to burn a large volume of bytes (>40k) into the eprom? I read the previous discussion on creating data-only hex file, http://www.keil.com/support/docs/2070.htm. The problem is that I cannot hard-code the bytes in an array, like,
const code my_bytes[] = { _byte1, _byte2, _byte3 };
One more question. For the starting address, can someone clarify the the /O starting offset, and the address field of the first record of the output?
$ bin2hex /O0010 Act.bin Action.hex Action.hex start with :20000800 $ bin2hex /O0030 Act.bin Action.hex Action.hex start with :20001800 $ bin2hex /O0050 Act.bin Action.hex Action.hex start with :20002800 $ bin2hex /O0009 Act.bin Action.hex Action.hex start with :20000000
At at guess, risky because I haven't bothered to check the manual: I'd say the /O option accepts C-format integers, in which case a leading 0 indicates octal format. The number in the .HEX file is in, well, hex. 0010 == 0x0008 (one eight equals eight ones) 0030 == 0x0018 (three eights equals one sixteen and eight ones) 0050 == 0x0028 (five eights equals two sixteens and eight ones) 0009 == 0x0000 (the digit '9' does not exist in base eight)
Yes, /O leads an octal address, not hex, not decimal. Only one problem remained,
$ bin2hex /O0000 foot.jpg BIN2HEX Version 1.06 Copyright (c) 1993-1995 BITWARE. All rights reserved. Status: Creating Intel HEX file. Status: Address 0x00000000 exceeds 64K. Status: Writing 15 bytes at address 0x00003E80. Status: Writing EOF record. Status: BIN to HEX conversion was successful.
"Notice that Status: Address 0x00000000 exceeds 64K.. What does this mean?" What size is the JPEG file?
It always happens. Even for a Java class generated on this code, it still gives this warning.
class Act { public static void doMathForever() { int i = 0; while (true) { i += 1; i *= 2; } } }
I think it may work out better if you take up the hints provided and avoid writing your number in octal format. Did you try writing /O0 or /O0x00 instead of /O0000?
It always gives this warning, no matter what address is assigned to /0. Following is an example. Many thanks anyway. Kan
$ bin2hex /O0x00 Act.bin Act_3.hex BIN2HEX Version 1.06 Copyright (c) 1993-1995 BITWARE. All rights reserved. Status: Creating Intel HEX file. Status: Address 0x00000000 exceeds 64K. Status: Writing 9 bytes at address 0x00000100. Status: Writing EOF record. Status: BIN to HEX conversion was successful.
For what it's worth, here's a link to a program that can handle a wide variety of record formats for memory image files, as well as manipulate the files. http://srecord.sourceforge.net/srecord.html
Thanks for the information. cheers, Kan