导入一个工程后,下载完,程序不运行,咋办呢?板子用的时nucleo_l476rg
也无法进入调试模式:
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 66]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:04.454
------ Switching context -----
Target connection mode: Default
Hardware watchpoint supported by the target
COM frequency = 4000 kHz
ST-LINK Firmware version : V2J27M15
Device ID: 0x415
PC: 0xb9337822
ST-LINK detects target voltage = 3.25 V
ST-LINK device status: HALT_MODE
ST-LINK device initialization OK
Enter STM32_AppReset() function
NVIC_DFSR_REG = 0x00000008
NVIC_CFGFSR_REG = 0x00000000
TraceCaptureStart and SWV event set to APP_TRUE
ST-LINK device status: LOCKUP
Enter STM32_AppReset() function
NVIC_DFSR_REG = 0x00000008
NVIC_CFGFSR_REG = 0x00000000
Error! Failed to read target status
Debugger connection lost.
Shutting down...
添加 启动文件后 ,编译报错:
HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:1: Error: junk at end of line, first unrecognized character is `*'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:2: Error: junk at end of line, first unrecognized character is `*'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:3: Error: junk at end of line, first unrecognized character is `*'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:4: Error: junk at end of line, first unrecognized character is `*'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:5: Error: junk at end of line, first unrecognized character is `*'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:6: Error: junk at end of line, first unrecognized character is `*'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:95: Error: bad instruction `dcd DMA1_Channel7_IRQHandler'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:299: Error: bad instruction `export SAI1_IRQHandler [WEAK]'
I:/custom/stm32l476-st-nucleo/libraries/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s:300: Error: bad instruction `export SAI2_IRQHandler [WEAK]'
...