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
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
In your makefile add on these compiler flag(ex:4K heap & stack):
CFLAGS += -D__HEAP_SIZE=4096
CFLAGS += -D__STACK_SIZE=4096
ASMFLAGS += -D__HEAP_SIZE=4096
ASMFLAGS += -D__STACK_SIZE=4096
Where can I find the makefile kindly guide me.
Thanks &Regards
Pspavi
Yes I changed same error
What's kind of error? You may attach your error message.....If it's the memory allocated problem, you have to free memory. And I doubt that the nRF52832 allocated the memory with 492kB? How do you think the memory space could be larger than 64KB?
I am getting the .bss is too large to fit in RAM memory . After I am changing the heap size and stack size in makefile . Even i am sharing my code too . please have a look
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.
no I am getting the error while compiling , .bss is too large to fit in RAM memory and .heap stack overflows stack . you didn't get this
no I am getting the error while compiling , .bss is too large to fit in RAM memory and .heap stack overflows stack . you didn't get this
ok....Because it's the resource problems. You have to reduce the memory size first. The NRF52832 RAM size is only 64K Bytes.
how to resolve this ? please guide me
Woops....Change the sensor data structure. If the timestamp data is needed. Maybe store the data in external flash or so on. In your project , the sensor is mpu6050 it's the gyro sensor I had done. You may not record all of the time-line data. Finally, You just need the x,y,z, pitch,roll,yaw . So I don't think that you need so huge array.
Actually I want to store the data for the 5minutes and send over BLE . I am thought of using the flash fds example ,but I don't know how to push the timestamp and accelerometer data in fds example . If you can help with this please . I referred many post even though i am not getting any idea
\nRF5_SDK_17.0.2_d674dde\examples\peripheral\flash_fds
You may take for reference. 5 minutes report. Why not 5 seconds char. notify data?
If the long times report, the nus rx package will be very large. It's must be some trouble-shooting over package large than 256 bytes.