wolfBoot/IDE/VSCode
gojimmypi 1ad66e9a6b
Improve docs, add targets and tests per https://github.com/wolfSSL/wolfBoot/pull/598#pullrequestreview-3492319645
2025-11-21 17:54:14 -08:00
..
README.md Improve docs, add targets and tests per https://github.com/wolfSSL/wolfBoot/pull/598#pullrequestreview-3492319645 2025-11-21 17:54:14 -08:00
install.sh Improve docs, add targets and tests per https://github.com/wolfSSL/wolfBoot/pull/598#pullrequestreview-3492319645 2025-11-21 17:54:14 -08:00
wolfBoot.code-workspace CMake Improvements 2025-11-18 17:44:43 -08:00

README.md

VS Code wolfBoot Project

CMake presets are support in VS Code. See also details in the cmake/README.md.

Open the WOLFBOOT_ROOTwolfBoot.code-workspace in VSCode.

For example, select STM32L4 wait for CMake to finish, then click build. The output pane might be not visible. Grab frame to expand up:

image


Quick Start

If all of the prerequisites (see below) are already installed:

git clone https://github.com/wolfssl/wolfBoot.git
cd wolfBoot/IDE/VSCode
git submodule update --init

code wolfBoot.code-workspace

If all of the prerequisites are NOT installed, see the install.sh script.

Windows

Windows users may need one of these:

The MSVC kit may be needed if VS 2022 is not installed.

Select View - Command Palette, search for CMake: Select a Compiler

See also: CMake: Delete Cache and Reconfigure

Launch VS Code from VS 2022 Command prompt.

Delete any existing build or build-[target] directories as needed.

Open a VS 2022 Developer command prompt.

From the command prompt, open the wolfBoot.code-workspace VS Code workspace:

cd c:\workspace\wolfboot-%USERNAME%
code ./IDE/VSCode/wolfBoot.code-workspace

Additional Settings

See the cmake/config_defaults.cmake file. Of particular interest are some environment configuration settings:

# Environments are detected in this order:
set(DETECT_VISUALGDB true)
set(DETECT_CUBEIDE true)
set(DETECT_VS2022 true)

# Enable HAL download only implemented for TMS devices at this time.
# See [WOLFBOOT_ROOT]/cmake/stm32_hal_download.cmake
# and [WOLFBOOT_ROOT]/cmake/downloads/stm32_hal_download.cmake
set(ENABLE_HAL_DOWNLOAD true)
set(FOUND_HAL_BASE false)

# optionally use .config files; See CMakePresets.json instead
set(USE_DOT_CONFIG false)

Requirements

VS Code extensions

Build tools

WSL path:

cmake, ninja-build, gcc-arm-none-eabi, openocd

Windows path:

Windows path: CMake, Ninja, Arm GNU Toolchain, OpenOCD (or ST’s OpenOCD)

Install via PowerShell (will need to restart VSCode):

winget install --id Ninja-build.Ninja -e


# winget install -e --id Arm.GnuArmEmbeddedToolchain

winget install -e --id Arm.GnuArmEmbeddedToolchain --override "/S /D=C:\Tools\arm-gnu-toolchain-14.2.rel1"
# reopen VS / terminal so PATH refreshes

# Confirm
ninja --version

Get-Command arm-none-eabi-gcc

If already installed, uninstall:

winget uninstall -e --id Arm.GnuArmEmbeddedToolchain