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

do I have RAM overflow

I'm using nrf51, I noticed that when I disable some functions calling (in the file flash_memory_management.c ), the behavior or the function in the file (fatigue.c) is correct. this last function has many static data on it, its size is shown in the map file. but when I enable those functions of the file flash_memory_management.c, I noticed that the data on function (in the file fatigue.c) are corrupted.

my question is,

1 by viewing the map file, can this be caused by RAM overlow? does the RAM and the stack overlap?. in the map file : Total RW Size 7176 ( 7.01kB)

2 - would increasing stack size fix the issue??

I already set the heap size to 0 : Heap_Size EQU 0

map file

Parents
  • Hi,

    I am not sure if you have a stack overflow issue runtime, but according to your map-file, everything is in order, and the initial stack pointer is located in a valid area:

     __initial_sp                             0x20003c10
    

    If you are getting a stack overflow runtime, you can view the core registers while debugging. The "SP" register shall then not go lower than address "&__initial_sp - 0x800"

    Have you enabled assertions in your code? (add "DEBUG" to your preprocessor defines) Do you check the return error-codes from function calls?

    Cheers, Håkon

Reply
  • Hi,

    I am not sure if you have a stack overflow issue runtime, but according to your map-file, everything is in order, and the initial stack pointer is located in a valid area:

     __initial_sp                             0x20003c10
    

    If you are getting a stack overflow runtime, you can view the core registers while debugging. The "SP" register shall then not go lower than address "&__initial_sp - 0x800"

    Have you enabled assertions in your code? (add "DEBUG" to your preprocessor defines) Do you check the return error-codes from function calls?

    Cheers, Håkon

Children
No Data
Related