This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI C/C++ Compiler
Hi ,I'm using msp430f5529 with MSP430-GCC-OPENSOURCE on linux,when I try to memset a buf[4096] to 0,like this
#define BUFSIZE 2048 uint8_t buf[BUFSIZE]; int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT memset(buf,0x00,sizeof(uint8_t) * BUFSIZE);
the program will stuck before main function.when I debug I found the compiler will automatic memset before main,and if the BUFSIZE is too large(2048 is fine ,but 4096 can't work).
Why?
The startup code sets all uninitialized variables, like buf, to 0 before main starts. My guess is the watchdog timer is going off during startup. I know how to disable the watchdog during the startup code used by the TI MSP430 compiler. I don't know how to do it with the GCC MSP430 compiler. I'll get back to you on that.
Thanks and regards,
-George