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
gcc with make file.....
SES you may check your project file *.emProject confiuration
Here.....
arm_linker_heap_size="4096"
arm_linker_process_stack_size="0"
arm_linker_stack_size="4096"
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?
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
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