ehm, ASCII text file don't contain any address, HEX file records needs addresses; may be that the tool objcopy will make the good job starting with default address 0x00 ; else you should --set-start Set the start address to to match eeprom starting address.
under windows i feed filein.cod to obsend.exe (st7 tools). obsend filein.cod,f,fileout.hex,i
The --set-start option doesn't do what you think it does. It sets the "entry point". It sets the address to which one is supposed to jump in order to start execution of the resulting image. The start address is sent using record type 0x03 and is typically located at the end of the hex file:
thank you Grant , this seems to be a quite right answer to the original question from Dohzer. please explain me how to obtain these two .hex records ( "qwerty" at address 0x22 ) from ascii .txt , under windows, avoiding record type
You can put the objcopy and sed commands in a shell script so they can be used as a "single command" if you want. If you're crippled by Windows, you can install Cygwin to get a usable shell and set of command-line utilities.
You can do the same thing with srecord, but since objcopy "comes with" the Gnu toolchain and can also manipulate ELF files, I tend to use it more often.
Grant Edwards grante Yow! Sometime in 1993
at NANCY SINATRA will lead a
Run it through an assembler, presumably a cross assembler for your target architecture or the same byte ordering as your target (to create a .o file), a linker with a linker script to set the rodata section origin to 0x22 (to create an .elf file) and run objdump using the -Oihex option (to create the .hex file).
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?