请教两个问题:
1. 程序有时候编译能通过,运行(reset go) 时会弹出出现Progam counter is odd的错误,请问
是怎么回事,如何消除这个错误。
2. 还有一个是HEw里面用emum 的问题:
例如定义如下:
enum T_ANGLES
{
DEG350 = 63715,
DEG10 = 1820,
DEG50 = 9102,
DEG70 = 12743,
DEG110 = 20024,
DEG130 = 23665,
DEG170 = 30947,
DEG190 = 34588,
DEG230 = 41870,
DEG250 = 45511,
DEG290 = 52793,
DEG310 = 56434,
DEG22 = 4005,
DEG90 = 16384,
DEG285 = 51883
};
有的值超过了Int 的界限,会报错,请问有什么好的解决方案。一定要用
#define DEG350 63715
吗?
共6条
1/1 1 跳转至页
Progam Counter is odd

关键词: Progam Counter

第一个问题没遇到过,只能Google一下。
有两条信息相关。查查PC和SP指针吧。尤其是程序中用汇编改过什么的话。
Program counter is odd Since the program counter holds an odd value, execution of
the program is not possible.
If a PC or SP value is illegally set (e.g., an odd value) and the user program is
executed, an error message such as ‘Program counter is odd’ may be displayed
twice.
有两条信息相关。查查PC和SP指针吧。尤其是程序中用汇编改过什么的话。
Program counter is odd Since the program counter holds an odd value, execution of
the program is not possible.
If a PC or SP value is illegally set (e.g., an odd value) and the user program is
executed, an error message such as ‘Program counter is odd’ may be displayed
twice.
共6条
1/1 1 跳转至页
回复
打赏帖 | |
---|---|
C语言函数宏的三种封装方式被打赏50分 | |
嵌入式LinuxC语言程序调试和宏使用技巧被打赏50分 | |
让代码中包含最新的编译时间信息被打赏50分 | |
【分享开发笔记,赚取电动螺丝刀】STM32F769LVGL优化显示被打赏26分 | |
rtthread硬件加密--2crc加密分析被打赏10分 | |
【分享开发笔记,赚取电动螺丝刀】STM32F769驱动ST7789以及显示优化被打赏36分 | |
【分享开发笔记,赚取电动螺丝刀】S32K146 PAL模拟I2C驱动适配被打赏23分 | |
我想要一部加热台+电源硬件设计规范被打赏16分 | |
我想要一部加热台+LED背光驱动芯片RT9293知识被打赏18分 | |
【分享开发笔记,赚取电动螺丝刀】S32K146 ADC 模块配置使用被打赏24分 |