2015-05-25 05:22 AM
Hi,
We are preparing production now. Because we use Unique ID to protect the products, each time we need to key the 96 digit Unique ID into the original file, then run the compile(rebuild), then flash into MCU. There is any way to skip the compile(rebuild) step. It take too long to compile for each MCU.Thanks a lot2015-05-29 10:50 AM
I took the .HEX and try modify it , but I don't know where I should modify.
Doesn’t your compiler give you a .MAP file? It will tell you exactly where “Serial_String�? is located.
PowerShell script to convert generic file to device specific file and then run the compile(rebuild),
flash into MCU, cycle.Are you using encrypted code? If not, editing the raw file should be enough to do away with Compile Time. If you are, I can’t see away around re-compiling, so the signature is correct.
2015-05-29 12:30 PM
2015-06-02 02:31 AM
Because it's complicated for to maintain software that modifies each binary flashed in. Our binary is identical, and then when first programmed and run on the testbench, the product calculates it own crc and writes this to flash.
You can make such simple self-signing binary the same way, possibly by adding this into a higher flash page that will get erased when done, if you're paranoid enough.No need for extra tooling. Just have the production crew press ''download'' and wait for the green blinky led.2015-06-02 03:03 AM
> the product calculates it own crc and writes this to flash.
That is a really dangerous practice. If the binary is not downloaded correctly, the CRC will reflect the incorrect data. This means you can have a chip with a valid CRC but bad binary. In order to provide full protection, the CRC has to be computed at compile/link time and downloaded to the processor with the binary.2015-06-02 03:12 AM
> Signing and encrypting a firmware image can get quite involved, so I'll stick here with just a small chip/board unique structure that can be filled in by a suitably coded programming station.
There is an easy way to improve the code posted above by clive1. Instead of declaring SIGNFOO as a static const at some unknown location in the middle of the text section, I would explicitly place it high in the Flash PROM and get a pointer to that address. This way you always know where this structure is located and do not have to change the programming software every time the code changes.
2015-06-03 12:32 PM
Thanks all you, I finally make it work.
I appreciate these help for your guys!