工具/软件:Code Composer Studio
您好!
实际上、我一直在努力在 CCS 中运行 msp430f2232、我遇到了以下错误、请告诉我原因是什么
说明资源路径位置类型
#10010链接期间遇到错误;"lcdinterface.cpp.out"未生成 lcdinterface.cpp C/C++问题
"="">processors.wiki.ti.com/.../10234"> 未解析的符号仍然存在 lcdinterface.cpp C/C++问题
gmake:***[All]错误2 lcdinterface.cpp C/C++问题
gmake[1]:***[lcdinterface.cpp.out]错误1 lcdinterface.cpp C/C++问题
未解析的符号 P4DIR、首先在./main.obj lcdinterface.cpp C/C++ problem 中引用
未解析的符号 P4OUT、首先在./main.obj lcdinterface.cpp C/C++ problem 中引用
#include
#define RS BIT1
#define RW BIT2
#define E BIT3
#define LINe1 PIN_SEQUEST_COMMAND (0x80)
#define line2 pin_sequence_command (0XC0)
void pin_seque_command (unsigned char cmd)
{
P4OUT &=~Ω(RS);
P4OUT &=~(RW);
P4OUT |=(E);
P4OUT =cmd;
_delay_cycles (1);
P4OUT &=~(E);
_delay_cycles (10);
}
void pin_seque_data (无符号字符数据)
{
P4OUT |=(RS);
P4OUT &=~(RW);
P4OUT |=(E);
P4OUT =数据;
_delay_cycles (1);
P4OUT &=~(E);
_delay_cycles (10);
}
void lcd_string (char *str)
{
unsigned char i=0;
while (str[i]!=0)
{
PIN_SEQUEST_DATA (str[i]);
i++;
}
}
void LCD_int (void)
{
P4DIR |=0x08;
P4DIR |=0x08;
P4OUT &=~(E);
_delay_cycles (1500);
PIN_SEQUEST_COMMAND (0x38);
PIN_SEQUEST_COMMAND (0x0E);
PIN_SEQUEST_COMMAND (0x01);
PIN_SEQUEST_COMMAND (0x02);
_delay_cycles (2000);
PIN_SEQUEST_COMMAND (0x06);
}
/**
* main.c
*
void main (void)
{
WDTCTL = WDTPW | WDTHOLD;//停止看门狗计时器
lcd_int();
第1行;
_delay_cycles (10);
LCD_string ("LCD 项目");
_delay_cycles (100);
线性2;
_delay_cycles (10);
LCD_string ("Prashant");
while (1);
}