STM32IDE 中的 CMSIS 问题

问题描述 投票:0回答:2

我对微控制器编程完全陌生,我面临着第一个问题。 我正在按照教程和网络文档开始使用 STM32 库,我尝试将 CMSIS 和 HAL 驱动程序添加到我的 stm32IDE 中,但每次我尝试构建时都会发生大量错误。有人可以向我解释一下出了什么问题吗?

../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:399: Error: bad instruction `section .text:CODE:REORDER:NOROOT(1)'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:400: Error: bad instruction `i2c2_ev_irqhandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:403: Error: bad instruction `pubweak I2C2_ER_IRQHandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:404: Error: bad instruction `section .text:CODE:REORDER:NOROOT(1)'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:405: Error: bad instruction `i2c2_er_irqhandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:408: Error: bad instruction `pubweak SPI1_IRQHandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:409: 
.
.
.
.
make: *** [Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/subdir.mk:91: Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f407xx.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.

00:32:15 Build Failed. 5895 errors, 0 warnings. (took 2s.475ms)
stm32 hal m4 cmsis
2个回答
0
投票

您正在尝试使用 GCC 编译器编译 IAR 启动文件。 您想要的启动汇编程序文件位于目录

gcc
下。 两个汇编器具有不同的语法。


0
投票

我做了同样的事情 - 删除了设备> ST> STM32G0xx> Include中除“include”文件夹之外的所有文件夹,并且错误消失了

© www.soinside.com 2019 - 2024. All rights reserved.