打印
[开发工具]

cubemx 生成的freertos代码 在keil ac6下不能编译,有什么解决的方法吗

[复制链接]
273|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
onlycook|  楼主 | 2024-11-14 16:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
./Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(167): error: unknown type name '__forceinline'
167 | static portFORCE_INLINE void vPortSetBASEPRI( uint32_t ulBASEPRI )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(170): error: expected 'volatile', 'inline', 'goto', or '('
170 |         {
|         ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(178): error: unknown type name '__forceinline'
178 | static portFORCE_INLINE void vPortRaiseBASEPRI( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(183): error: expected 'volatile', 'inline', 'goto', or '('
183 |         {
|         ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(193): error: unknown type name '__forceinline'
193 | static portFORCE_INLINE void vPortClearBASEPRIFromISR( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(196): error: expected 'volatile', 'inline', 'goto', or '('
196 |         {
|         ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(205): error: unknown type name '__forceinline'
205 | static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(205): error: expected ';' after top level declarator
205 | static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI( void )
|                                 ^
|                                 ;
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(223): error: unknown type name '__forceinline'
223 | static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(223): error: expected ';' after top level declarator
223 | static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt( void )
|                                   ^
|                                   ;
10 errors generated.
compiling freertos.c...
../Core/Src/main.c(21): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2\cmsis_os.h(126): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/include\FreeRTOS.h(62): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h(52): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(167): error: unknown type name '__forceinline'
167 | static portFORCE_INLINE void vPortSetBASEPRI( uint32_t ulBASEPRI )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(170): error: expected 'volatile', 'inline', 'goto', or '('
170 |         {
|         ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(178): error: unknown type name '__forceinline'
178 | static portFORCE_INLINE void vPortRaiseBASEPRI( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(183): error: expected 'volatile', 'inline', 'goto', or '('
183 |         {
|         ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(193): error: unknown type name '__forceinline'
193 | static portFORCE_INLINE void vPortClearBASEPRIFromISR( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(196): error: expected 'volatile', 'inline', 'goto', or '('
196 |         {
|         ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(205): error: unknown type name '__forceinline'
205 | static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(205): error: expected ';' after top level declarator
205 | static portFORCE_INLINE uint32_t ulPortRaiseBASEPRI( void )
|                                 ^
|                                 ;
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(223): error: unknown type name '__forceinline'
223 | static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt( void )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(223): error: expected ';' after top level declarator
223 | static portFORCE_INLINE BaseType_t xPortIsInsideInterrupt( void )
|                                   ^
|                                   ;
10 errors generated.
compiling main.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_rcc.c...
assembling startup_stm32f103xb.s...
compiling stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_flash.c...
compiling system_stm32f1xx.c...
compiling stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_exti.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_tim_ex.c...
../Middlewares/Third_Party/FreeRTOS/Source/croutine.c(28): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/include\FreeRTOS.h(62): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/include/portable.h(52): warning: In file included from...
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(167): error: unknown type name '__forceinline'
167 | static portFORCE_INLINE void vPortSetBASEPRI( uint32_t ulBASEPRI )
|        ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(162): note: expanded from macro 'portFORCE_INLINE'
162 |         #define portFORCE_INLINE __forceinline
|                                  ^
../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM3\portmacro.h(170): error: expected 'volatile', 'inline', 'goto', or '('
170 |         {
|         ^

使用特权

评论回复
沙发
yangjiaxu| | 2024-12-11 10:52 | 只看该作者
那你换成ac5试试呢?一般情况使用cubemx是可以用ac6的 但是你要是编译不过,可以试试ac5

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

438

主题

1657

帖子

3

粉丝