Available RAM to user on boron? getting more memory?

boron
Tags: #<Tag:0x00007fe228e8d7a0>

#1

Hi all and thx in advance for any advice. Again it seems that I need more bits, I’d like to sto some largeish buffers in RAM and am trying to figure a way to claim more of it. I assumed that most of the 256k of ram was available so I’d planned on using about 2/3 of it to be safe. I started leaking memory and whatnot… so I wrote this program to test how much I had:

void setup() {
Serial.begin(115200);
}
void loop() {
    delay(1000);
    uint32_t freemem = System.freeMemory();
    Serial.print("free memory: ");
    Serial.println(freemem);
}

the return is:

10:38:41.014 -> free memory: 71424

so 71kb of free ram available to the user with nothing really happening. That seems like a lot to be used by just the idle system. Is there some way I can adjust the memory footprint of the OS? Is there something hogging this memory that I can turn off?

thx-cc


#2

This is not quite right. All Particle devices run a DeviceOS (FreeRTOS, Nordic SoftDevice, Particle code) which requires flash and RAM. The 71KB reported is effectively the RAM remaining to the user. There is currently no mechanism for reducing the DeviceOS RAM footprint.


#3

Several of us here have added FRAM chips via I2C for storing larger data structures. Not as fast as onboard RAM, and you can’t use it to extend the amount of system RAM available to your program, but it’s quick nonvolatile storage with no write wear.