STVD弹出"Line number 50 is out of range for "main.c"."的原因及解决办法

正在用STVD+Cosmic 32K的免费编译器调试代码,结果弹出这么一个窗口,入下图:


STVD Visual Develop : Line number 50 is out of range for "main.c".

其实就是无法设置断点。

检查了一下,发现是第 48行代码有问题,B_UART3_Rx_OK 是个位变量,我直接让它与 5 做比较是不对的,于是凡是在这个错误下方设置断点,均会弹出这个窗口,把这条语句改为:if(B_UART3_Rx_OK  == 1) 就木有问题了。

#error cpstm8 main.c:1 can't open stm8s.h #error cpstm8 main.c:11(0+7) missing ; #error cpstm8 main.c:12(0+4) missing ; #error cpstm8 main.c:13(0+7) missing ; #error cpstm8 main.c:18(14) missing prototype #error cpstm8 main.c:19(26) missing prototype #error cpstm8 main.c:22(13) missing prototype #error cpstm8 main.c:23(13) missing prototype #error cpstm8 main.c:26(14) missing prototype #error cpstm8 main.c:36(18) missing prototype #error cpstm8 main.c:37(20) missing prototype #error cpstm8 main.c:22(14+5) GPIOD undefined #error cpstm8 main.c:18(15+6) ENABLE undefined #error cpstm8 main.c:36(19+13) UART1_IT_RXNE undefined #error cpstm8 main.c:32(8+22) UART1_MODE_TXRX_ENABLE undefined #error cpstm8 main.c:31(8+28) UART1_SYNCMODE_CLOCK_DISABLE undefined #error cpstm8 main.c:30(8+15) UART1_PARITY_NO undefined #error cpstm8 main.c:29(8+16) UART1_STOPBITS_1 undefined #error cpstm8 main.c:28(8+19) UART1_WORDLENGTH_8D undefined #error cpstm8 main.c:23(33+21) GPIO_MODE_IN_FL_NO_IT undefined #error cpstm8 main.c:23(21+10) GPIO_PIN_6 undefined #error cpstm8 main.c:22(33+26) GPIO_MODE_OUT_PP_HIGH_FAST undefined #error cpstm8 main.c:22(21+10) GPIO_PIN_5 undefined #error cpstm8 main.c:19(27+21) CLK_PRESCALER_HSIDIV1 undefined #error cpstm8 main.c:42(8+7) missing ; #error cpstm8 main.c:43(23) missing prototype #error cpstm8 main.c:44(33) missing prototype #error cpstm8 main.c:42(27) i undefined #error cpstm8 main.c:44(53+5) RESET undefined #error cpstm8 main.c:44(34+14) UART1_FLAG_TXE undefined #error cpstm8 main.c:50(11+8) missing ; in local declaration #error cpstm8 main.c:51(4+6) misplaced local declaration #error cpstm8 main.c:53(17) invalid function type #error cpstm8 main.c:53(33) missing prototype #error cpstm8 main.c:54(34) missing prototype #error cpstm8 main.c:60(8+4) misplaced local declaration #error cpstm8 main.c:61(15) missing prototype #error cpstm8 main.c:62(24+6) incompatible argument type #error cpstm8 main.c:50(20+8) lastSend undefined #error cpstm8 main.c:61(47+10) brightness undefined #error cpstm8 main.c:61(16+6) dynMsg undefined #error cpstm8 main.c:82(33) missing prototype #error cpstm8 main.c:82(16+10) brightness undefined #error cpstm8 main.c:90(37) missing ) #error cpstm8 main.c:90(41) old style argument declaration #error cpstm8 main.c:91(31) missing prototype #error cpstm8 main.c:99(14+7) rxIndex undefined #error cpstm8 main.c:94(11+7) rxIndex undefined #error cpstm8 main.c:96(22+4) true undefined #error cpstm8 main.c:96(12+7) newData undefined #error cpstm8 main.c:109(21) missing prototype #error cpstm8 main.c:110(12) missing prototype #error cpstm8 main.c:110(13+6) ENABLE undefined #error cpstm8 main.c:109(25+19) TIM1_COUNTERMODE_UP undefined #error cpstm8 main.c:115(11+7) newData undefined #error cpstm8 main.c:117(22+5) false undefined main.c: The command: "cxstm8 +debug -pxp -no -l +mods0 -pp -i"C:\Program Files (x86)\COSMIC\FSE_Compilers\CXSTM8\Hstm8" -clDebug\ -coDebug\ main.c " has failed, the returned value is: 1 exit code=1.
最新发布
07-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值