标题:
error reading hex file at line 1:colon expected at start of line
[打印本页]
作者:
2841413637
时间:
2023-4-10 20:42
标题:
error reading hex file at line 1:colon expected at start of line
error reading hex file at line 1:colon expected at start of line代码:
#include <msp430x24x.h>
#define LED8PORT P2OUT //P2接8个LED灯
#define LED8SEL P2SEL //P2接8个LED灯
#define LED8DIR P2DIR //P2接8个LED灯
//IAR软件的延时函数
#define CPU_F ((double)8000000)//8M
#define delay_us(x) __delay_cycles((long)(CPU_F*(double)x/1000000.0)) //us延时
#define delay_ms(x) __delay_cycles((long)(CPU_F*(double)x/1000.0)) //ms延时
void Port_Init()
{
LED8SEL = 0x00; //设置IO口为普通I/O模式
LED8DIR = 0x01; //设置IO口P20的方向为输出
LED8PORT = 0x01; //P20口初始设置为高电平
}
void main()
{
WDTCTL = WDTPW + WDTHOLD;//关闭看门狗
Port_Init();
while(1)
{
LED8PORT = 0x01;//输出高电平
delay_ms(100);
LED8PORT =0x00;//输出低电平
delay_ms(100);
}
}
PS:csdn上的msp430的,无法调试
https://blog.csdn.net/qq_51454236/article/details/125836157
作者:
Hephaestus
时间:
2023-4-10 23:02
生成hex的选项你选的是Motorola,应该选Intel。
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1