Instructions for the use of single-chip addr2line

1. When the MCU program hangs up and cannot be debugged with jlink, how do we usually locate it? We usually use the external tool addr2line tool to debug.

When the program hangs, we first choose c99 when compiling,

After compiling, burn the corresponding bin file/csf file to the MCU. After burning, it is found that the program hangs, and the following error message is printed. This message can be used to debug the MCU.

Bus fault is caused by imprecise data access violationShow more call stack info by run: 
addr21ine -etm4c1294-Dxe.axf -e  0000d9de 0000d9b8 00011386 000084ee

Copy the .csf file generated after compilation to the computer installed with addr2line, and run the following command on the computer to get the corresponding decompilation information.

C:\Users\wangdao\Desktop>.\addr2line.exe -e  tm4c1294-Dxe.axf 0000d9de 0000d9b8 00011386 000084ee
Z:\trunk_6000\linecard_ge\APP\project\1LTN4\project/..\src\module\/sfp.c:807

get_sfp_sta

Z:\trunk_6000\linecard_ge\APP\project\1LTN4\project/..\src\module\/task_manage.c:1123

pollstatTask

 In this way, it can be located that the MCU hangs in the get_sfp_sta and pollstatTask functions.

 

Guess you like

Origin blog.csdn.net/qq_40008325/article/details/130086028