This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can I change the heap to flash instead of RAM in segger

Hi. 

I am working on nRF52832. I want to store a structure with 492kb I am getting heap is too large error. So how can I tell the complier to store my variable in flash instead of RAM by changing the settings in segger  please let me kindly 

Parents Reply
  • Sorry for slow download. I had checked your heap & stack size 8192. I think that it's working in your zip package. And the map file is no error. Are you fixed your problems?

    struct sensor_data
    {
    char timestamp[41];
    int sensor_value;
    };

    struct sensor_data sensordata_array[12000];

    Why do you need so large memory?

    Can you use the malloc() function and release memory with free() ,if the structure is processed..

    Or use the spi nor-flash interface to storage the data .if it real need to keep. 

Children
Related