搭建rt-thread开发环境(makefile + cubemax)

 

 

编译器问题:

topeet@ubuntu:~/rtthread-test$ make
mkdir build		
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb   -DUSE_HAL_DRIVER -DSTM32G0B1xx -IRT-Thread -ICore/Inc -IDrivers/STM32G0xx_HAL_Driver/Inc -IDrivers/STM32G0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32G0xx/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 -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst Core/Src/main.c -o build/main.o
/bin/sh: 1: arm-none-eabi-gcc: not found
Makefile:196: recipe for target 'build/main.o' failed
make: *** [build/main.o] Error 127

解决:

​​​​​​​sudo apt install gcc-arm-none-eabi

参考:software installation - Installing arm-none-eabi-gcc - Unix & Linux Stack Exchange

 

make编译报错问题:

board.c里面报了很多关于串口的变量没定义问题,如下:

97e3e012e8ea464c8016dac64a7dddf3.png

解决:看样子是没有包含串口头文件

#include "stm32g030xx.h"
#include "stm32g0xx_hal.h"
#include "stm32g0xx_hal_uart.h"

 

4c919cd4da4744a99b04829f37d72dba.png

 

 

edade96c9636459c8c490693c0f0c175.png

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

不知道起个啥名“”

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

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

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

打赏作者

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

抵扣说明:

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

余额充值