Difference between revisions of "STM32 development and debugging using VSCode"

From Stm32World Wiki
Jump to navigation Jump to search
Line 12: Line 12:
 
<pre>
 
<pre>
 
$ sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
 
$ sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
 +
</pre>
 +
 +
=== GNU Debugger (GDB) ===
 +
 +
The GNU Debugger (GDB) is also available:
 +
 +
<pre>
 +
$ sudo apt install gdb-multiarch
 +
</pre>
 +
 +
=== OpenOCD ===
 +
 +
To communicate with the actual [[STM32]] [[MCU]] a [[JTAG]]/[[SWD]] tool is necessary.  Fortunately the standard OpenOCD in Debian support STM32/ST-Link:
 +
 +
<pre>
 +
$ sudo apt install openocd
 
</pre>
 
</pre>
  

Revision as of 03:40, 31 March 2022

ST provide an IDE (Integrated Development Environment) for STM32 development. As a beginner's environment to learn embedded programming on STM32 MCUs this IDE is not half bad.

Prerequisites

This example is developed on a standard Debian desktop system. On an Ubuntu system it should be almost the same.

Toolchain

The toolchain refers to the compiler and the tools to manipulate binary images. On Debian those are available in the standard repository:

$ sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi

GNU Debugger (GDB)

The GNU Debugger (GDB) is also available:

$ sudo apt install gdb-multiarch

OpenOCD

To communicate with the actual STM32 MCU a JTAG/SWD tool is necessary. Fortunately the standard OpenOCD in Debian support STM32/ST-Link:

$ sudo apt install openocd

Miscellaneous Links