How to use Jlink to check where the program died after the GD32 chip ran away?
I believe that everyone will encounter such a scenario: the chip program becomes abnormal while it is running, and it cannot be simulated at this time, because once the simulation program is downloaded again, the abnormality disappears. Now I will teach you how to use the Jlink emulator to check where the program died after the GD32 chip ran away.
First, we need to connect the target board to Jlink. We only need to connect three wires: SWDIO (PA13), SWCLK (PA14) and GND. Remember, you must not connect the NRST pin, otherwise the chip may be reset when connecting. Of course , and be sure to ensure that the chip does not lose power during the connection process.
Then find Jlink.exe in the Jlink driver installation directory and double-click to open:
After opening, this interface will appear:
Keyboard input: usb, click Enter:
Prompt to connect to Jlink, then enter: s and press Enter
There will be a default chip model here. If it is inconsistent with the model on the target board, you can enter:? , and press Enter. If they are consistent, press Enter directly.
Because the editor is using GD32F303ZGT6, so after entering "?", a list of chip selections will pop up. Find the target chip and double-click:
Return to the Jlink.exe interface:
Because we are using the SWD interface, enter: s and press Enter:
Here you will be asked to choose the communication speed of Jlink. The default is 4000KHz. If the line between your target board and Jlink is relatively long, you can reduce the speed appropriately. For example, if you need 1000KHz, enter: 1000 on the keyboard and press Enter. It will The following interface appears:
We see that the chip ID has been found in the red frame. At this time, enter: h and press Enter. You will see the following interface:
The PC value in the red box represents the current execution position of the program. We can find out which function the program is running by looking at the map file in the program project. For example, the PC value here is 0x08000AAA, in the map file What fits this address is the delay_1ms function.
Isn't it very simple?
In the future, the editor will also teach you how to debug the chip through Jlink.exe, so stay tuned.
#Jlink #check #program #died #GD32 #chip #ran
- Can igbt directly replace thyristor? What will be the impact of IGBT directly replacing thyristor?
- Easily understand the avalanche effect of power MOSFETs
- Google’s AI isn’t too ‘woke.’ It’s too rushed
- Comprehensive, flexible and reliable! NGI's high-performance power supply testing solution helps a top electronics institute conduct full-scenario testing
- What happens if the fast recovery diode of the switching power supply is damaged?
- How to solve the EMI problem of automotive power chips?
- Research on the basic characteristics of flexible PCB materials
- Solve the technical problems of multi-channel output power supply! PI launches InnoMux-2, improving efficiency by 10%
- Tailored for small devices, NFC wireless charging has full potential
- Apple’s EV cancelled