CRC or Watermark for application

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CRC or Watermark for application

660 Views
dorin_petre
Contributor I

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?

Tags (2)
0 Kudos
2 Replies

544 Views
soledad
NXP Employee
NXP Employee

Hi, 

Please check the following thread,

address in flash 

Have a great day,
Sol

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

544 Views
dorin_petre
Contributor I

Thank you for your replay, but this one dose not help me, I all ready did it this way and it dose not help me.

I did place the variables at a specific address, there 2 different questions I have:

1) is there a macro for __atribute__ or a pragma for telling the compiler to write the variables to the flash without using them?

2) does MCUXpresso have a built in option for generating a CRC for a specific area from flash, for example the flash has addresses from 0x0000 to 0x8000 and I am asking if the IDE can generate a CRC from 0x0000 to 0x5FFC and  write it from 0x5FFC to 0x6000

0 Kudos