I have a question on the RAM usage of MSP430F47176 (8KB RAM).
Attached at the bottom of this post is the sample code, I used for the check.
When I set "char g_zbuf[5000]", the memory usage info obtained from the IAR
is as follows.
----
176 bytes of CODE memory
5,080 bytes of DATA memory (+19 absolute)
5 bytes of CONST memory
----
When I execute the program, the program does not reach to the 1st line
of the main() "WDTCTL = WDTPW +WDTHOLD;". It seems that there is something
wrong with the memory usage (overflow?).
I guess that the rest of the RAM (8000 - 5080 bytes) is not enough to execute
the code properly. However, how can I find how much memory should I keep
except for the RAM used in the code (e.g., 5080 in this case)?
====================
#include <msp430x471x6.h>
#include <string.h>
char g_zbuf[5000];
void main(void)
{
WDTCTL = WDTPW +WDTHOLD; // Stop WDT
strcpy(g_zbuf, "TEST");
_NOP();
_BIS_SR(LPM0_bits); // Enter LPM0
}