Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4601

SDK • SDK2 - No example of reserving flash blocks?

$
0
0
Hi,

I am new to the forum, and I apologize if I have missed something. I got the new SDK 2.1.0 and the pico 2 w just a few weeks back. I got started quickly programming it in C and I generally find it a joy to use.

However, when looking for examples I find no working example online or in the SDK for reserving a flash memory area for storing data (such as wifi ssids etc.). I find many obsolete examples. I guess the closest I get is the flash_program.c and pt.json example. However, it seems it will merrily write in flash at 256k from start and there is nothing which prevents the loader to overwrite what it programmed. I am missing the .ld file example to go with it, or the pt.json example which addresses the problem. The same example would be good if it could be augmented as to solve this problem:

I am looking to reserve say 2 * 4K blocks at end of flash (whatever the size of the devices flash) and use them to erase/store my data. Adding a full .ld file seems quite unsafe (and actually I do not get that to work, with a range of ld errors).

I am not new to flash programming at low level, I am just new to this SDK.

Kind regards, Lars

Statistics: Posted by larsmats — Tue Mar 04, 2025 10:32 pm — Replies 0 — Views 25



Viewing all articles
Browse latest Browse all 4601

Trending Articles