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.

[参考译文] CCS/msp430fr2311:可以'不使用printf();

Guru**** 2548030 points
Other Parts Discussed in Thread: MSP430FR2311

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/590985/ccs-msp430fr2311-can-t-not-use-printf

部件号:MSP430FR2311

工具/软件:Code Composer Studio

我想在 msp430fr2311 lauchpad中使用printf(),但无法成功工作。

如果我想查看我的变量(现在我想使用printf),是否有任何方法可以使用?  如果有任何问题,请告诉我。

 以下是我的代码,错误已超出范围  

#include "stdio.h"
#include <MSP4S.h>
#include <string.h>

int main (void){
WDTCTL = WDTPW | WDTHOLD;//停止看门狗计时器
PM5CTL0 &=~LCKLPM5;//禁用GPIO开机默认高阻抗模式

P1DIR = 0x01;
P2DIR = 0x00;

printf ("测试");

返回0;
}