Not applicable
Mar 27, 2017
02:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 27, 2017
02:06 PM
Is there a way to calculate the checksum or CRC of an image and embed the value into the image so it can be checked by a bootloader when it is downloaded and each time it is executed? I've done this previously with IAR but I cannot find any reference to doing this with DAVE 4.
4 Replies
Attachments are accessible only for community members.
Mar 28, 2017
11:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 28, 2017
11:59 PM
Not applicable
Mar 29, 2017
06:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 29, 2017
06:07 AM
I hoped there was something included with the tools that would handle this, but the method you propose should work. Thanks for the information.
Not applicable
Jun 20, 2017
05:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 20, 2017
05:27 AM
Hi Jesus,
I have a problem on the XMC concerning CRC calculation. I have a bootloader which is in the first 32 kByte of my XMC4500 and after that I use the EEPROM emulation so my App starts at: 0x0c020000.
The last 32 Bytes of my flash is reserved for a header which is added on compile time. The first entry is the CRC which I calculate and add on compile time via srec_cat. I use srecord to calculate the checksum from 0x0c020000 to 0x0c0fffe0.
My problem is i am not able to get the same CRC on the device. I think the problem is that the infineon uses 0x00 for empty flash and i do not know what srecord uses.
Do you have any idea what's wrong here?
I have a problem on the XMC concerning CRC calculation. I have a bootloader which is in the first 32 kByte of my XMC4500 and after that I use the EEPROM emulation so my App starts at: 0x0c020000.
The last 32 Bytes of my flash is reserved for a header which is added on compile time. The first entry is the CRC which I calculate and add on compile time via srec_cat. I use srecord to calculate the checksum from 0x0c020000 to 0x0c0fffe0.
My problem is i am not able to get the same CRC on the device. I think the problem is that the infineon uses 0x00 for empty flash and i do not know what srecord uses.
Do you have any idea what's wrong here?
Not applicable
Jun 20, 2017
05:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 20, 2017
05:34 AM
I mean you use
uint32_t *end_of_flash = (uint32_t *)&eText;
uint32_t firmware_crc = *(end_of_flash);
and eText is not the end off the whole flash - so it is only the end of the use flash from the app. So but that does not work for a bootloader. Because the loader should have the possibility to use the whole flash if needed.
uint32_t *end_of_flash = (uint32_t *)&eText;
uint32_t firmware_crc = *(end_of_flash);
and eText is not the end off the whole flash - so it is only the end of the use flash from the app. So but that does not work for a bootloader. Because the loader should have the possibility to use the whole flash if needed.