調試遇到這個問題Break at address "" with no debug information available, or outside of program code.

I encountered the same issue when using j-link to debug my Board(STM32F407ZG), after changing the startup_stm32f407xx.s into startup_stm32f407xx.S(with uppercase 's' ), the problem disappeared. The reason might be gcc handles .s and .S in different ways

Change your startup_xx.s file suffix to uppercase.

 

Although the assembler can be invoked directly, assembly files are more typically passed through gcc. The case of the assembly
file’s suffix (.s versus .S) is important. If gcc is invoked with an uppercase assembly file suffix (.S) it is passed first to the
preprocessor whereas a lowercase file suffix (.s) passes goes directly to the assembler.

---



Please note that GCC treats files with the suffixes ".s" and ".S"
differently: the preprocessor is run on files with the ".S" (capital s)
suffix, not on the ones with the ".s" suffix.



---
 

file.s


Assembler code. Apple's version of GCC runs the preprocessor
on these files as well as those ending in `.S'. 


 

file.S

Assembler code which must be preprocessed.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章