CRC checksum in Atollic

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

Posts: 0
Joined: Fri Nov 27, 2015 12:29 pm

CRC checksum in Atollic

Postby gajendra » Fri Nov 27, 2015 1:52 pm

I need to know how the CRC 16bit can be generated in atollic.

Thanks in Advance.

Posts: 0
Joined: Fri Apr 29, 2016 9:16 am

TrueSTUDIO® don't supply any checksum

Postby AAA_PreviousContributors » Mon Nov 30, 2015 1:31 pm

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.

Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 2 guests