FreeRTOS STM32CubeMX port.c(483): error: A1586E: Bad operand types (UnDefOT, Constant) ...

  1. 找这个定义 configMAX_SYSCALL_INTERRUPT_PRIORITY
    再找 configPRIO_BITS
    再找 __NVIC_PRIO_BITS
    发现定为4U , 去掉U改成4就可以了
    一般在 Drivers\CMSIS\Device\ST\STM32FXxx\Include\stm32xxx.h
    如下图
    去掉U

或者


  1. 在__asm void xPortPendSVHandler( void )之前加上
#undef configPRIO_BITS
#define configPRIO_BITS         4

如下图
在port.c中


文章参考连接http://www.stm32cube.com/question/716


  • 14
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
这个错误是由于在port.c文件的第407行使用了错误的操作数类型(UnDefOT, Constant)导致的。根据引用中提到的错误信息,最后发现是main.h中的#include &quot;stm32f1xx_hal.h&quot;的问题。根据引用中提供的解决方法,问题可能出现在中断中使用了不正确的函数。应该将xTimerReset替换为xTimerResetFromISR。此外,引用中提到的问题可能是由于中断优先级的设置不正确导致的。需要检查FreeRTOSConfig.h文件中配置的宏configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY,确保串口中断的优先级低于该宏定义的优先级。如果不是,则需要进行修改。<span class=&quot;em&quot;>1</span><span class=&quot;em&quot;>2</span><span class=&quot;em&quot;>3</span> #### 引用[.reference_title] - *1* [STM32CubeMX的main.h文件生成脚本](https://download.csdn.net/download/mickey35/10120997)[target=&quot;_blank&quot; data-report-click={&quot;spm&quot;:&quot;1018.2226.3001.9630&quot;,&quot;extra&quot;:{&quot;utm_source&quot;:&quot;vip_chatgpt_common_search_pc_result&quot;,&quot;utm_medium&quot;:&quot;distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2&quot;}}] [.reference_item style=&quot;max-width: 33.333333333333336%&quot;] - *2* [FreeRTOS学习遇到的问题:Error:..\..\FreeRTOS\portable\RVDS\ARM_CM3\port.c,374](https://blog.csdn.net/qq_51643989/article/details/130493989)[target=&quot;_blank&quot; data-report-click={&quot;spm&quot;:&quot;1018.2226.3001.9630&quot;,&quot;extra&quot;:{&quot;utm_source&quot;:&quot;vip_chatgpt_common_search_pc_result&quot;,&quot;utm_medium&quot;:&quot;distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2&quot;}}] [.reference_item style=&quot;max-width: 33.333333333333336%&quot;] - *3* [Error:..\FreeRTOS\portable\RVDS\ARM_CM3\port.c](https://blog.csdn.net/qq_37459242/article/details/122773520)[target=&quot;_blank&quot; data-report-click={&quot;spm&quot;:&quot;1018.2226.3001.9630&quot;,&quot;extra&quot;:{&quot;utm_source&quot;:&quot;vip_chatgpt_common_search_pc_result&quot;,&quot;utm_medium&quot;:&quot;distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2&quot;}}] [.reference_item style=&quot;max-width: 33.333333333333336%&quot;] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

EmbededCoder

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值