AnsweredAssumed Answered

CRC or Watermark for application

Question asked by Dorin Petre on Nov 6, 2018
Latest reply on Nov 7, 2018 by Dorin Petre

Hi,

 

I am using a LPC804 and developing in the MCUXpressoIDE.

I have a divided the flash in several sections, the last 2 ones of 24bytes and 8 bytes.

I want to write 2 constant variables in the last 2 sections with information about the version of the application and a watermark.

 

I have tried with the #include <cr_section_macros.h>  to write it like this:

 

__RODATA(APP_VS) static const char app_vs[] __attribute__((used)) = "APP VS 1.00\n\r";

__RODATA(APP_WM) static const char app_wm[] __attribute__((used)) = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};

 but if I don't print them they are not stored in the hex file.

 

1) Is there another way to write them to the hex file without using them?

2) The IDE has a way to calculate a CRC for the program from a start to an end address and store it at an specific address?

Outcomes