keil stm32f207出现_sys_open 卡死问题

问题:程序运行不起来,仿真卡死 _sys_open函数

armv7架构 断点指令BKPT:

解决方法:

方法一:MicroLIB 勾选

反汇编文件没有_sys_open文件,因为MicroLIB 是 ARM 专门为了嵌入式优化的库,用于代替 C 的标准库

方法二:勾选该选项

生成的汇编:

方法三:添加代码

/* 告知连接器不从C库链接使用半主机的函数 */
#pragma import(__use_no_semihosting)
/* 定义 _sys_exit() 以避免使用半主机模式 */
void _sys_exit(int x)
{

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Keil5\ARM\ARMCC\Bin' Rebuild target 'OLED' compiling lcd.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\HARDWARE\LCD\lcd.c: 0 warnings, 1 error compiling main.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" main.c: 0 warnings, 1 error compiling stm32f4xx_it.c... stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" stm32f4xx_it.c: 0 warnings, 1 error compiling delay.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\SYSTEM\delay\delay.c: 0 warnings, 1 error compiling usart.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\SYSTEM\usart\usart.c: 0 warnings, 1 error compiling misc.c... ..\FWLIB\src\misc.c(76): error: #5: cannot open source input file "misc.h": No such file or directory #include "misc.h" ..\FWLIB\src\misc.c: 0 warnings, 1 error compiling stm32f4xx_syscfg.c... ..\FWLIB\src\stm32f4xx_syscfg.c(50): error: #5: cannot open source input file "stm32f4xx_syscfg.h": No such file or directory #include "stm32f4xx_syscfg.h" ..\FWLIB\src\stm32f4xx_syscfg.c: 0 warnings, 1 error compiling sys.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\SYSTEM\sys\sys.c: 0 warnings, 1 error compiling stm32f4xx_hal.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal.c: 0 warnings, 1 error compiling system_stm32f4xx.c... stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" system_stm32f4xx.c: 0 warnings, 1 error compiling lcd_init.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\HARDWARE\LCD\lcd_init.c: 0 warnings, 1 error compiling stm32f4xx_rcc.c... ..\FWLIB\src\stm32f4xx_rcc.c(59): error: #5: cannot open source input file "stm32f4xx_rcc.h": No such file or directory #include "stm32f4xx_rcc.h" ..\FWLIB\src\stm32f4xx_rcc.c: 0 warnings, 1 error assembling startup_stm32f40_41xxx.s... compiling stm32f4xx_gpio.c... ..\FWLIB\src\stm32f4xx_gpio.c(84): error: #5: cannot open source input file "stm32f4xx_gpio.h": No such file or directory #include "stm32f4xx_gpio.h" ..\FWLIB\src\stm32f4xx_gpio.c: 0 warnings, 1 error compiling stm32f4xx_hal_rcc.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc.c: 0 warnings, 1 error compiling stm32f4xx_hal_cortex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_cortex.c: 0 warnings, 1 error compiling key.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" key.c: 0 warnings, 1 error compiling stm32f4xx_usart.c... ..\FWLIB\src\stm32f4xx_usart.c(92): error: #5: cannot open source input file "stm32f4xx_usart.h": No such file or directory #include "stm32f4xx_usart.h" ..\FWLIB\src\stm32f4xx_usart.c: 0 warnings, 1 error compiling stm32f4xx_hal_dma.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma.c: 0 warnings, 1 error compiling stm32f4xx_hal_gpio.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_gpio.c: 0 warnings, 1 error compiling stm32f4xx_hal_dma_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_dma_ex.c: 0 warnings, 1 error compiling stm32f4xx_hal_rcc_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_rcc_ex.c: 0 warnings, 1 error assembling startup_stm32f407xx.s... compiling stm32f4xx_hal_uart.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_uart.c: 0 warnings, 1 error compiling stm32f4xx_hal_tim.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim.c: 0 warnings, 1 error compiling system_stm32f4xx.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" RTE\Device\STM32F407ZG\system_stm32f4xx.c: 0 warnings, 1 error compiling led.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" ..\HARDWARE\LED\led.c: 0 warnings, 1 error compiling stm32f4xx_hal_usart.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_usart.c: 0 warnings, 1 error compiling stm32f4xx_hal_tim_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_tim_ex.c: 0 warnings, 1 error compiling stm32f4xx_hal_pwr_ex.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr_ex.c: 0 warnings, 1 error compiling stm32f4xx_hal_pwr.c... ..\USER\stm32f4xx_conf.h(34): error: #5: cannot open source input file "stm32f4xx_adc.h": No such file or directory #include "stm32f4xx_adc.h" D:\Keil5\ARM\PACK\Keil\STM32F4xx_DFP\2.16.0\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_pwr.c: 0 warnings, 1 error "..\OBJ\LCD.axf" - 29 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:03 请帮我分析剩下的问题,刚才将fwlib\inc删去路径了
最新发布
07-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值