Checksum calculation with IAR ILINK Linker and IELFTOOL

Technical Note 11927

Arkitekturer:

Arm, RH850, RL78, RX, STM8

Komponent:

general

Uppdaterad:

2023-10-06 15:18

Introduction

This Technical Note is the 'Main Technical Note' for the set of Technical Notes that covers different aspects of CRC checksum calculations in these IAR Embedded Workbench toolchains.

The set of Technical Notes apply to...

...these versions of IAR Embedded Workbench (uses ELF/DWARF as file format in the toolchain). The Technical Note applies to:

  • IAR Embedded Workbench for ARM 5.11 (and later)
  • IAR Embedded Workbench for RX 2.10 (and later)
  • IAR Embedded Workbench for SH 2.10 (and later)
  • IAR Embedded Workbench for STM8 1.10 (and later)
  • IAR Embedded Workbench for RH850 1.10 (and later)

Background information on IEFLTOOL

In IAR toolchains with IAR ILINK Linker, the checksum calculation is done with a tool called ielftool.exe. So if a checksum is to be calculated, IAR ILINK Linker links the application, passes on (to ielftool.exe) the commands for filling and checksum calculation, and ielftool.exe does the calculation.

Overview - These are the steps that has to be done in order to get a checksum in the output of the project 

  • You need to include checksum calculation source in your application.
  • You need to turn on checksum calculation in the options for the linker.
  • You must select for which memory range IELFTOOL will calculate the checksum.
  • You must decide where the checksum will reside in the memory.

Details of the checksum calculation

The details (of checksum) are placed in these sub-Technical Notes:

  • IELFTOOL Checksum - Basic actions - Tech note 65473 - The steps needed to set it up.
  • IELFTOOL Checksum - Placing the checksum - Tech note 62709 - The locations where the checksum can be placed.
  • IELFTOOL Checksum - over several ranges - Tech note 53274.
  • The details (for specific devices) are placed in these sub tech notes:
    • Calculate CRC32 as in STM32 hardware (v.5.50 and later) - Tech note 64424 - (using the built-in hardware CRC32 calculator in STM32 devices from ST).
    • Calculate CRC32 as in K60 hardware - Tech note 85753 - (using the built-in hardware CRC32 calculator in K60-device from Freescale).
    • IELFTOOL Checksum - When using LPC device - Tech note 52619 - (Extra considerations for LPC devices from NXP.)
    • Calculating CRC32 as commonly calculated online - Tech Note 191210 - (very useful to sort out settings for ielftool, compared to what is calculated online.)

More information

There is more information about the checksum in the .htm read-me-file for IAR ILINK Linker and in the .pdf DevelopmentGuide file. These files are found in your IAR Embedded Workbench installation.

Mr. Ross N. Williams at Rocksoft in Australia have written, what he calls: A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS. This document can be downloaded from the link CRC explained by Mr. Ross N. Williams.

Finally, there is also the tecnical note '26457 Checksum generation' in which our Senior linker developer goes into the details of checksums.


All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.