Linux under Arm-none-eabi-gdb debug STM32

Source: Internet
Author: User
Tags jlink

I. Description of the Environment

Hardware Development Board: Wildfire STM32 Development Board

Downloader and Debug Interface: Jlink + JTAG

Operating system: Virtual machine VMware6.5 + Ubuntu12.0.4

Debugging Tools: Arm-none-eabi-gdb

Debug server: Jlink GDB Server

Debug Project target file: led_test.elf

Second, step

1, install Jlink Drive

Refer to the construction of STM32 development environment under Linux

2, install cross-compilation chain ARM-NONE-EABI-GCC

Refer to the construction of STM32 development environment under Linux

3. Compile the project to generate elf files

Refer to the construction of STM32 development environment under Linux

4. Create the. Gdbinit initialization file in the root directory

The contents are:

set auto-load safe-path/

5. Create the. gdbinit file in the Debug directory of the project

The contents are:

 target Remote: 2331  set  Mem Inaccessible-by-default   Offmonitor speed Automonitor endian littlemonitor resetmonitor flash device  = Stm32f103zemonitor Flash breakpoints  = 1  monitor Flash Download  = 1  loadmonitor reg SP  = ( Span style= "color: #800080;" >0x08000000   = (0x08000004   )  break   break   main  continue  

6. Open a terminal to start Jlinkgdbserver

[Email protected]:~# jlinkgdbserver

7, start debugging in the Debug directory of the project

Debug interface

References: GNU ARM Eclipse (for STM32)

      STM32 Discovery Development on Linux

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.