Is there a Flash memory map for the Clue similar to this one:
https://learn.adafruit.com/bluefruit-nr ... memory-map
I assume first 152k of Flash are reserved for the Nordic SoftDevice on all nrf52 boards, including the Clue. But are the last 48k reserved for the bootloader? And what about the 28k shown as "user data" for the bluefruit-nrf52-feather? It sounds like it is used for a Little Filesystem by the mbed system but I am using the Arduino platform so maybe that's not needed?
MicroBlocks stores user code in Flash memory, so I want to be sure it doesn't overwrite an area that's reserved for something critical, such as the AdaFruit bootloader. At the same time, I'd like to maximize the amount of Flash memory available for MicroBlocks user code.
Last question: Assuming part of Flash is reserved for the AdaFruit bootloader, is that area of Flash write-protected as it is on some other microcontrollers?
Thank you!
Flash memory map for Clue?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Flash memory map for Clue?
Hello jmaloney,
The memory map for the Clue would is shown below (left side). I believe the same image is included in your original link.
https://learn.adafruit.com/introducing- ... memory-map
The CLUE includes an additional 2MB of SPI accessible flash storage where you can safely store logfiles, images, fonts and code. You do not have to use the 1MB of flash on the nRF52840.
There are some excellent suggestions for tracking memory storage and register usage along with using SPI flash with Arduino code here:
https://learn.adafruit.com/adafruit-fea ... s?view=all
The memory map for the Clue would is shown below (left side). I believe the same image is included in your original link.
https://learn.adafruit.com/introducing- ... memory-map
The CLUE includes an additional 2MB of SPI accessible flash storage where you can safely store logfiles, images, fonts and code. You do not have to use the 1MB of flash on the nRF52840.
There are some excellent suggestions for tracking memory storage and register usage along with using SPI flash with Arduino code here:
https://learn.adafruit.com/adafruit-fea ... s?view=all
- jmaloney
- Posts: 49
- Joined: Fri Apr 27, 2018 8:33 am
Re: Flash memory map for Clue?
Thanks!
I'm still wondering if that 28k user data is actually used for anything in the context of Arduino sketches, since it sounds like an mbed OS thing.
Also, 48k seems like a huge amount of space for a bootloader. I had the impression that Adafruit's bootloader was much smaller than that, at least on SAM D21 boards. So I'm wondering if that memory map picture actually applies to the Clue. It may have come from some Nordic documentation that assumes that you're using mbed. I'm hoping someone from Adafruit can provide a definitive answer.
We plan to use the external Flash chip for a file system as CircuitPython does -- maybe even with the same format so you can switch between MicroBlocks and CircuitPython without losing files.
MicroBlocks executes user code directly out of Flash memory, so that code has to be in the on-chip Flash. MicroBlocks also does wear-leveling and we want to spread the wear out over as many pages as possible to maximize the lifetime of the Flash.
I'm still wondering if that 28k user data is actually used for anything in the context of Arduino sketches, since it sounds like an mbed OS thing.
Also, 48k seems like a huge amount of space for a bootloader. I had the impression that Adafruit's bootloader was much smaller than that, at least on SAM D21 boards. So I'm wondering if that memory map picture actually applies to the Clue. It may have come from some Nordic documentation that assumes that you're using mbed. I'm hoping someone from Adafruit can provide a definitive answer.
We plan to use the external Flash chip for a file system as CircuitPython does -- maybe even with the same format so you can switch between MicroBlocks and CircuitPython without losing files.
MicroBlocks executes user code directly out of Flash memory, so that code has to be in the on-chip Flash. MicroBlocks also does wear-leveling and we want to spread the wear out over as many pages as possible to maximize the lifetime of the Flash.
Please be positive and constructive with your questions and comments.