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.
工具/软件:TI C/C++编译器
大家好、我在 Linux 上将 msp430f5529与 MSP430-GCC-opensource 一起使用、当我尝试将 buf[4096]设置为0时、就像这样
#define BUFSIZE 2048 uint8_t buf[BUFSIZE]; int main (void) { WDTCTL = WDTPW + WDTHOLD; //停止 WDT memset (buf、0x00、sizeof (uint8_t)* BUFSIZE);
程序将停留在 main 函数之前。当我调试时、我发现编译器将在 main 之前自动生成 memset、如果 BUFSIZE 太大(2048正常、但4096无法正常工作)。
为什么?
启动代码会在 main 开始之前将所有未初始化的变量(如 buf)设置为0。 我猜看门狗计时器在启动期间会关闭。 我知道如何在 TI MSP430编译器使用的启动代码期间禁用看门狗。 我不知道如何使用 GCC MSP430编译器来实现它。 我将就此向您回复。
谢谢、此致、
乔治