I'm building off of the keyfob demo application and have run into a memory issue.
I've gotten to the point where adding more code causes undesirable effects to happen. The device will stop responding or wont even startup properly. I have a decent amount of strings used for debugging purposes via UART but my code size is not extreme.
I'm using the cc2540f128, how much of that memory is taken up by the bt stack and keyfob example code?
Can someone explain or point to a reference about how DATA, XDATA and IDATA work? To my understanding:
- DATA (core RAM) is for high speed variable access and is limited to 256 bytes
- IDATA is next
- XDATA is the largest (64Kbytes)
Could it be possible that my XDATA is already filled? Does the compiler determine where to put variables?
I'm also a bit baffled when it comes to monitoring these memory spaces. Using the Stack View in IAR, i can monitor the XDATA size. When a function is called that initializes a 100 byte buffer, I see XDATA jump up. When the function is finished, I would have expected the XDATA size to drop back down, but it doesn't. Isn't this the point of function scope and the stack? Is there a more accurate way to measure stack usage
Also, does the CC2540f256 add more program space and XDATA space or heap size?
Thanks for helping out