Debugging tutorials with Stlink breakpoints under Keil uvision (RVMDK)

Source: Internet
Author: User

Lou Pig is used to download and debug Stm32 program, because JTAG is the D version (you understand), the official upgrade when the hands of the cheap upgrade, JTAG changed brick. Later found used for STM8 download debugging with the Stlink can also be used to debug Stm32, Lou Pig bought is more than 20 yuan Stlink,x Bao bought, claiming to be able to use the official firmware, so there is this article:

First of all, the building pig with win 10 64, Keil uvision is 4.74 version

1, of course, is installed Stlink driver, Lou Pig Stlink although claimed to be V2 version, but in fact should not be V2 version, because can not use JTAG mode to debug, only use the SW mode

Device Manager will have stlink display after inserting hardware

2, Keil uvision in the settings

4.7 version has no need to overwrite the Tools.ini, set as can be, the download list has two St link, choose one of the more set options; the other one is said to be special for the D edition.

3, Stlink How to access the Jtag interface description:

Stlink access to the Stm32 as long as the access to three wires.

SWCLK  Swdat  GND
The wiring is as follows:

The left side of the J1 in the figure is where there is a gap in the JTAG hardware interface.

4, if finished the above steps can not be debugged (for example, can download, but the program cannot debug breakpoints, can not run into the main function, etc.), you should pay attention to stm32 Boot0 and Boot1 pin

There are two pins BOOT0 and BOOT1 on each STM32 chip,
The level state of the two pins at the time of the chip reset determines the region from which the program is executed after the chip is reset, as shown in the following table:
Boot1=x boot0=0 boot from user flash, this is normal mode of operation.
Boot1=0 boot0=1 boot from the system memory, this mode starts the program function is set by the factory.

The Boot1=1 Boot0=1 starts from the built-in SRAM, which can be used for debugging.

In other words, if you want to debug, to the BOOT1 grounding, BOOT0 pull up, but the situation of the building pig test is as long as the BOOT0 pull on the line, such as:

If the above steps are done or not, it may be the hardware used in the building, or Keil uvision generated settings and your inconsistency caused, please continue to delve.

Debugging tutorials with Stlink breakpoints under Keil uvision (RVMDK)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.