09202024

Last update2016/05/28 14:38

Back 現在地: Home パートナー Strategic Test パートナー Atollic 18.コンパイラーにchecksumを作成させる

18.コンパイラーにchecksumを作成させる

 18.コンパイラーにchecksumを作成させる

TrueSTUDIO® don't supply any checksum programs to create the checksum itself.
However, user could write their own checksum program, and then run it as a post-build step on the generated binary image.

This is how that is done in more detail:
•    Right-click on the project in the project explorer, and select Properties.
•    Expand the C/C++ Build node and select the Settings node.

Now activate a generation of a binary image at build time.
•    Select the Tool Settings tab to the right.
•    Expand the Other tool and select Output format
•    Choose to generate Binary.

If the application elf file was called myProgram.elf, the binary will be called myProgram.elf.binary.
This is the raw image that will be downloaded to the target and the one that user should calculate the checksum on.

To automatically calculate the checksum user can add the checksum program as a post-build step:
•    Choose the Build Steps tab to the right.
•    On the Command field for the Post-build steps user should add the written checksum program.

Building the program, when the build is done user will receive a binary file, and the checksum program will run and generate the checksum.

User should patch the generated binary image with the checksum to a known location that the program later will read.

As for how far to read when application is download in the microcontroller, user can use the &_edata marker as a stopping marker when calculating your checksum.