??? 06/08/06 09:14 Read: times |
#118006 - solved Responding to: ???'s previous message |
Thanks to all for the ideas, you are really great.
I (ab)used srec_cat from the abovementioned srecord package. The result is perhaps not too neat, but works as required. Jan Waclawek inc_ser.bat-increments serial number (run with no parameters for help): @echo off if "%1"=="" goto errorxx if not exist %1 goto errorxx srec_cat %1 -i -crop 0x3ffe 0x4000 -fill 0x01 0x3ffc 0x3ffd -fill 0x00 0x3ffd 0x3ffe -l_e_c_p 0x3ffe 2 2 -crop 0x3ffe 0x4000 -multiple -o tmp.hex -i srec_cat %1 -i tmp.hex -i -multiple -o %1 -i del tmp.hex goto end :errorxx @echo increments (word) checksum in intelhex file at address 0x3ffe-0x3fff @echo Usage: %0 filename goto end :end ------------------------- set_ser.bat-sets serial number (run with no parameters for help): @echo off if "%1"=="" goto errorxx if "%2"=="" goto errorxx if "%3"=="" goto errorxx if not exist %1 goto errorxx srec_cat %1 -i -excl 0x3ffe 0x4000 -fill 0x%3 0x3ffe 0x3fff -fill 0x%2 0x3fff 0x4000 -multiple -o %1 -i goto end :errorxx echo sets checksum in intelhex file at address 0x3ffe-0x3fff echo Usage: %0 filename highhex lowhex echo example: %0 gnsas.obj f2 4c goto end :end |
Topic | Author | Date |
serial number into intelhex file | 01/01/70 00:00 | |
I know of none, but | 01/01/70 00:00 | |
I don't need it to be so "hard"... | 01/01/70 00:00 | |
Rolling your own will be faster | 01/01/70 00:00 | |
File manglers | 01/01/70 00:00 | |
avoid duplicate effort - add to srecord? | 01/01/70 00:00 | |
hexmate | 01/01/70 00:00 | |
won't work for me | 01/01/70 00:00 | |
Shell script or 010Editor | 01/01/70 00:00 | |
Yadda-yadda-yadda | 01/01/70 00:00 | |
Resd the specs | 01/01/70 00:00 | |
Overwrite it | 01/01/70 00:00 | |
hmm | 01/01/70 00:00 | |
Serializing | 01/01/70 00:00 | |
Here is something to try | 01/01/70 00:00 | |
my thoughts | 01/01/70 00:00 | |
solved![]() | 01/01/70 00:00 |