嵌入式技术论坛
直播中

建立建利12

8年用户 1390经验值
擅长:可编程逻辑 嵌入式技术
私信 关注
[问答]

Platformio+CubeMX+RTThreadNano应该怎么正确配置编译环境?

基本按照这篇blog来配置环境的。但是在platformio build的时候出现如下错误,似乎是汇编器无法识别RT-Thread库里的汇编语句。请问大家知道应该怎么正确配置编译环境吗?

板子是野火的STM32F103VE指南者。platformio.ini内容如下:
[platformio]
include_dir = ./Inc
src_dir = ./
[env:genericSTM32F103VE]
platform = ststm32
board = genericSTM32F103VE
; framework = stm32cube
debug_tool = cmsis-dap
upload_protocol = cmsis-dap
monitor_speed = 115200
build_flags =
    -DUSE_HAL_DRIVER
    -DSTM32F103xE
    -IInc
    -IDrivers/STM32F1xx_HAL_Driver/Inc
    -IDrivers/STM32F1xx_HAL_Driver/Inc/Legacy
    -IDrivers/CMSIS/Device/ST/STM32F1xx/Include
    -IDrivers/CMSIS/Include
    -IMiddlewares/Third_Party/RealThread_RTOS/include/
    -IMiddlewares/Third_Party/RealThread_RTOS/bsp/_template/cubemx_config
    -IMiddlewares/Third_Party/RealThread_RTOS/finsh/
    -IMiddlewares/Third_Party/RealThread_RTOS/components/finsh
src_filter = +<./Src/> +<./startup_stm32f103xe.s> +<./Drivers/> +<./Middlewares/>
board_build.ldscript = ./STM32F103VETx_FLASH.ld
extra_scripts = pre:add_newlibnano.py

回帖(2)

大红枣

2022-4-21 09:14:48
报错的文件是IAR的,这里编译应该是GCC吧,这个文件不应该参与编译。
举报

jinyi7016

2022-4-21 14:01:18
你用gcc进行编译,那启动谁的,ld文件,都要是gcc的,不能用iar或是keil的
举报

更多回帖

发帖
×
20
完善资料,
赚取积分