Allocation of "NVRAM" in on-board flash

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am attempting to allocate the last row of on-board flash (start address: 0x0001FF80) to store non-volatile data (data that survives re-boot). Unfortunately, the bootloader over-writes ALL of on-board flash (0x00000000 - 0x0001FFFF). when loading the application!

   

Is there an easy way to instruct the bootloader NOT to overwrite the last row of on-board flash?

   

 

   

David Perkins

   

Cratus Technology

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, David!

   

The area of flash you used is already in use by the bootloader. See the memory map in Bootloader datasheet page 13. You may declare your area just below the metadata and exclude it from checksum generation.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks, Bob.

   

 

   

Could you direct me where to set these values?

0 Likes
Anonymous
Not applicable

I search for 'metadata' in entire workspace. Only shows up in files in 'Generated_Source' folder. I assume these regions are declared in the GUI. The only variables I see are 'heap size' and 'stack size' under the 'System' tab in 'Firmware.cydwr'

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Wrong place to search. Look into Bootloader datasheet and search for "metadata".

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Still no help. Where do I find out EXACTLY where metadata is located in my application?

0 Likes
Anonymous
Not applicable

I'm using row 1022 - the row just below metadata (assuming metadata takes up one 128-byte row).

0 Likes