From c36be1e1c556b7277652476e7149a1bd36567745 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Mon, 30 Oct 2023 12:18:02 +0100 Subject: [PATCH 01/11] feat: Initial update of probe-rs --- src/tooling/debugging/probe-rs.md | 133 +++++++++++++++++++++++++----- 1 file changed, 112 insertions(+), 21 deletions(-) diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index a09234b..341dfe5 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -6,36 +6,24 @@ The [`probe-rs`][probe-rs] project is a set of tools to interact with embedded M - GDB support. - CLI for interactive debugging. - VS Code extension. -- Real Time Transfer (RTT) - - Similar to app_trace component of IDF. +- [Real Time Transfer (RTT)][rtt] + - Similar to [app_trace component of IDF][app-trace-idf]. - Flashing algorithms -More info about probe-rs & how to set up a project can be found on the [probe-rs] website. +Follow the [installation][prober-rs-installation] and [setup][prober-rs-setup] instructions at the [probe-rs] website. [probe-rs]: https://probe.rs/ [openocd]: https://openocd.org/ [pyocd]: https://pyocd.io/ [segger-tools]: https://www.segger.com/ +[app-trace-idf]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html +[rtt]: https://wiki.segger.com/RTT +[prober-rs-installation]: https://probe.rs/docs/getting-started/installation/ +[prober-rs-setup]: https://probe.rs/docs/getting-started/probe-setup/ -## `USB-JTAG-SERIAL` Peripheral for ESP32-C3 -Starting from `probe-rs` v0.12, it is possible to flash and debug the ESP32-C3 with the built-in `USB-JTAG-SERIAL` peripheral, no need for any external hardware debugger. More info on configuring the interface can be found in the [official documentation][official-documentation]. - -[official-documentation]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/configure-builtin-jtag.html - -## Support for Espressif Chips - -`probe-rs` currently only supports `ARM` & `RISC-V`, therefore this limits the number of Espressif chips that can be used at the moment. - -| Chip | Flashing | Debugging | -| :------: | :------: | :-------: | -| ESP32-C3 | ✅ | ⚠️ | - -> ⚠️ **Note**: _Items marked with ⚠️ are currently work in progress, usable but expect bugs._ - -## Permissions - Linux - -On Linux, you may run into permission issues trying to interact with Espressif probes. Installing the following `udev` rules and reloading should fix that issue. +## Permissions - Linux (TO BE REMOVED (?)) +On Linux, you may run into permission issues trying to interact with Espressif probes. To avoid those: Installing the following `udev` rules and reloading should fix that issue. ```text # Espressif dev kit FTDI @@ -48,4 +36,107 @@ ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess" ``` + +## `USB-JTAG-SERIAL` Peripheral + +Some of our recent products contain the `USB-JTAG-SERIAL` peripheral that allows for debugging without any external hardware debugger. More info on configuring the interface can be found in the official documentation for the chips that support this peripheral: +- [ESP32-C3][esp32c3-docs] +- [ESP32-C6][esp32c6-docs] +- [ESP32-H2][esp32h2-docs] +- ESP32-S3 also has the `USB-JTAG-SERIAL` peripheral but since its `Xtensa` based, it isn't yet supported by `probe-rs`. + +[esp32c3-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/configure-builtin-jtag.html +[esp32c6-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-guides/jtag-debugging/configure-builtin-jtag.html +[esp32h2-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32h2/api-guides/jtag-debugging/configure-builtin-jtag.html + + +## Flashing with `probe-rs` + +`probe-rs` can be use to flash your applications to your target, there are 2 supported image formats: +- [ESP-IDF image format][idf-image]: This is the default format used by `espflash` and `cargo-espflash` and can be used in `probe-rs` using the `--format idf` argument + - Example command for flashing an ESP32-C3: `probe-rs run --chip esp32c3 --format idf` +- `direct-boot`: Only supported in some Espressif products. + - Example command for flashing an ESP32-C3: `probe-rs run --chip esp32c3` + +The flashing command can be set as a custom Cargo runner by adding the following to your project's `.cargo/config.toml` file: + +```toml +[target.'cfg(any(target_arch = "riscv32", target_arch = "xtensa"))'] +runner = "probe-rs run --chip esp32c3 --format idf" +``` + +With this configuration, you can flash and monitor your application using `cargo run`. + +[idf-image]: https://docs.espressif.com/projects/esptool/en/latest/esp32c3/advanced-topics/firmware-image-format.html + +## VS Code Extension + +There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentation][probe-rs-vscode] for details on how to install, configure and use it. + +### Example `launch.json` + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "type": "probe-rs-debug", + "request": "launch", + "name": "Launch", + "cwd": "${workspaceFolder}", + "chip": "esp32c3", //!MODIFY + "flashingConfig": { + "flashingEnabled": true, + "resetAfterFlashing": true, + "haltAfterReset": true, + "formatOptions": { + "format": "idf" //!MODIFY (or remove). Valid values are: 'elf'(default), 'idf' + } + }, + "coreConfigs": [ + { + "coreIndex": 0, + "programBinary": "./target/riscv32imc-unknown-none-elf/debug/${workspaceFolderBasename}", //!MODIFY + "rttEnabled": true, + "rttChannelFormats": [ + { + "channelNumer": "0", + "dataFormat": "String", + "showTimestamp": true, + } + ] + } + ] + }, + { + "type": "probe-rs-debug", + "request": "attach", + "name": "Attach", + "cwd": "${workspaceFolder}", + "chip": "esp32c3", //!MODIFY + "coreConfigs": [ + { + "coreIndex": 0, + "programBinary": "./target/riscv32imc-unknown-none-elf/debug/${workspaceFolderBasename}", //!MODIFY + "rttEnabled": true, + "rttChannelFormats": [ + { + "channelNumer": "0", + "dataFormat": "String", + "showTimestamp": true, + } + ] + } + ] + } + ] +} +``` + +> ⚠️ **Note**: The example `launch.json` uses `rtt`, which may require enabling such feature in some crates, like [`esp-println`][esp-println] and [`esp-backtrace`][esp-backtrace] + +[probe-rs-vscode]: https://probe.rs/docs/tools/vscode/ +[esp-println]: https://github.com/esp-rs/esp-println +[esp-backtrace]: https://github.com/esp-rs/esp-backtrace?tab=readme-ov-file#features + From fbe04d1980bf29744c5f693c782eec75666d989a Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Fri, 3 Nov 2023 16:21:49 +0100 Subject: [PATCH 02/11] feat: Add some small sections --- src/tooling/debugging/probe-rs.md | 37 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index 341dfe5..0c1985f 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -21,29 +21,13 @@ Follow the [installation][prober-rs-installation] and [setup][prober-rs-setup] i [prober-rs-installation]: https://probe.rs/docs/getting-started/installation/ [prober-rs-setup]: https://probe.rs/docs/getting-started/probe-setup/ - -## Permissions - Linux (TO BE REMOVED (?)) -On Linux, you may run into permission issues trying to interact with Espressif probes. To avoid those: Installing the following `udev` rules and reloading should fix that issue. - -```text -# Espressif dev kit FTDI -ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# Espressif USB JTAG/serial debug unit -ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev", TAG+="uaccess" - -# Espressif USB Bridge -ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess" -``` - - ## `USB-JTAG-SERIAL` Peripheral Some of our recent products contain the `USB-JTAG-SERIAL` peripheral that allows for debugging without any external hardware debugger. More info on configuring the interface can be found in the official documentation for the chips that support this peripheral: - [ESP32-C3][esp32c3-docs] - [ESP32-C6][esp32c6-docs] - [ESP32-H2][esp32h2-docs] -- ESP32-S3 also has the `USB-JTAG-SERIAL` peripheral but since its `Xtensa` based, it isn't yet supported by `probe-rs`. +- ESP32-S3 also has the `USB-JTAG-SERIAL` peripheral but since it's `Xtensa` based, it isn't yet supported by `probe-rs`. [esp32c3-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/configure-builtin-jtag.html [esp32c6-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-guides/jtag-debugging/configure-builtin-jtag.html @@ -52,7 +36,7 @@ Some of our recent products contain the `USB-JTAG-SERIAL` peripheral that allows ## Flashing with `probe-rs` -`probe-rs` can be use to flash your applications to your target, there are 2 supported image formats: +`probe-rs` can be used to flash your applications to your target, there are 2 supported image formats: - [ESP-IDF image format][idf-image]: This is the default format used by `espflash` and `cargo-espflash` and can be used in `probe-rs` using the `--format idf` argument - Example command for flashing an ESP32-C3: `probe-rs run --chip esp32c3 --format idf` - `direct-boot`: Only supported in some Espressif products. @@ -67,7 +51,10 @@ runner = "probe-rs run --chip esp32c3 --format idf" With this configuration, you can flash and monitor your application using `cargo run`. +[`esp-flash-loader`][esp-flash-loader] is home to the `probe-rs` flash loader for Espressif products. + [idf-image]: https://docs.espressif.com/projects/esptool/en/latest/esp32c3/advanced-topics/firmware-image-format.html +[esp-flash-loader]: https://github.com/esp-rs/esp-flash-loader ## VS Code Extension @@ -139,4 +126,16 @@ There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentatio [esp-println]: https://github.com/esp-rs/esp-println [esp-backtrace]: https://github.com/esp-rs/esp-backtrace?tab=readme-ov-file#features - +## `cargo-flash` and `cargo-embed` + +`probe-rs` comes with along with this two tools: +- [`cargo-flash`][cargo-flash]: A flash tool that downloads your binary to the target and runs it. +- [`cargo-embed`][cargo-embed]: Superset of `cargo-flash` that also allows opening a RTT terminal or a GDB server. A [configuration file][cargo-embed-config] can used to define the behavior. +- +[cargo-flash]: https://probe.rs/docs/tools/cargo-flash/ +[cargo-embed]: https://probe.rs/docs/tools/cargo-embed/ +[cargo-embed-config]: https://probe.rs/docs/tools/cargo-embed/#configuration + +## Using `probe-rs` as an OpenOCD Replacement + +`probe-rs` has a `gdb` command that runs a GDB server, by default in port, `1337` From 63069decf5ffa4142abde6745ab0145aef2f9f21 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Fri, 3 Nov 2023 16:48:53 +0100 Subject: [PATCH 03/11] feat: Update VS Code section --- src/tooling/debugging/index.md | 25 +++++++ src/tooling/debugging/probe-rs.md | 16 +---- src/tooling/debugging/vscode.md | 105 +++++------------------------- 3 files changed, 44 insertions(+), 102 deletions(-) diff --git a/src/tooling/debugging/index.md b/src/tooling/debugging/index.md index 4b4046c..48c8719 100644 --- a/src/tooling/debugging/index.md +++ b/src/tooling/debugging/index.md @@ -13,3 +13,28 @@ Refer to the table below to see which chip is supported in every debugging metho | **ESP32-H2** | ✅ | ✅ | ✅ | | **ESP32-S2** | ❌ | ✅ | ✅ | | **ESP32-S3** | ❌ | ✅ | ✅ | + +## `USB-JTAG-SERIAL` Peripheral + +Some of our recent products contain the `USB-JTAG-SERIAL` peripheral that allows for debugging without any external hardware debugger. More info on configuring the interface can be found in the official documentation for the chips that support this peripheral: +- [ESP32-C3][esp32c3-docs] + - The availability of built-in JTAG interface depends on the ESP32-C3 revision: + - Revisions older than 3 **don't** a have built-in JTAG interface. + - Revisions 3 (and newer) **do** have a built-in JTAG interface, and you don't have to connect an external device to be able to debug. + + To find your ESP32-C3 revision, run: + ```shell + cargo espflash board-info + # or + espflash board-info + ``` + +- [ESP32-C6][esp32c6-docs] +- [ESP32-H2][esp32h2-docs] +- [ESP32-S3][esp32s3-docs] + +[esp32c3-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/configure-builtin-jtag.html +[esp32c6-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-guides/jtag-debugging/configure-builtin-jtag.html +[esp32h2-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32h2/api-guides/jtag-debugging/configure-builtin-jtag.html +[esp32s3-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/jtag-debugging/configure-builtin-jtag.html + diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index 0c1985f..5ff8e45 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -12,6 +12,8 @@ The [`probe-rs`][probe-rs] project is a set of tools to interact with embedded M Follow the [installation][prober-rs-installation] and [setup][prober-rs-setup] instructions at the [probe-rs] website. +Espressif products containing the [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial] can use `probe-rs` without any external hardware. + [probe-rs]: https://probe.rs/ [openocd]: https://openocd.org/ [pyocd]: https://pyocd.io/ @@ -20,19 +22,7 @@ Follow the [installation][prober-rs-installation] and [setup][prober-rs-setup] i [rtt]: https://wiki.segger.com/RTT [prober-rs-installation]: https://probe.rs/docs/getting-started/installation/ [prober-rs-setup]: https://probe.rs/docs/getting-started/probe-setup/ - -## `USB-JTAG-SERIAL` Peripheral - -Some of our recent products contain the `USB-JTAG-SERIAL` peripheral that allows for debugging without any external hardware debugger. More info on configuring the interface can be found in the official documentation for the chips that support this peripheral: -- [ESP32-C3][esp32c3-docs] -- [ESP32-C6][esp32c6-docs] -- [ESP32-H2][esp32h2-docs] -- ESP32-S3 also has the `USB-JTAG-SERIAL` peripheral but since it's `Xtensa` based, it isn't yet supported by `probe-rs`. - -[esp32c3-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/configure-builtin-jtag.html -[esp32c6-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-guides/jtag-debugging/configure-builtin-jtag.html -[esp32h2-docs]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32h2/api-guides/jtag-debugging/configure-builtin-jtag.html - +[usb-jtag-serial]: index.md#usb-jtag-serial-peripheral ## Flashing with `probe-rs` diff --git a/src/tooling/debugging/vscode.md b/src/tooling/debugging/vscode.md index aeaef2d..b8749b7 100644 --- a/src/tooling/debugging/vscode.md +++ b/src/tooling/debugging/vscode.md @@ -1,24 +1,18 @@ -# Debugging in Visual Studio Code +# `cortex-debug` VS Code Extension -There is also a possibility to debug with graphical output directly in Visual Studio Code. +The [`cortex-debug`][cortex-debug] VS Code extension also allows debugging Espressif products. Products containing the [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial] do'nt require any external hardware, but other products +may use an external JTAG debugger, like [ESP-Prog][esp-prog]. -## ESP32 -### Configuration - -1. Connect an external JTAG adapter: [ESP-Prog][esp-prog] can be used. - -| ESP32 Pin | JTAG Signal | -| :---------: | :---------: | -| MTDO/GPIO15 | TDO | -| MTDI/GPIO12 | TDI | -| MTCK/GPIO13 | TCK | -| MTMS/GPIO14 | TMS | -| 3V3 | VJTAG | -| GND | GND | +[cortex-debug]: https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug +[usb-jtag-serial]: index.md#usb-jtag-serial-peripheral +[esp-prog]: https://docs.espressif.com/projects/espressif-esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html -> ⚠️ **Note**: On Windows `USB Serial Converter A 0403 6010 00` driver should be WinUSB. +### Configuration +1. If required, connect the external JTAG adapter. + 1. See Configure Other JTAG Interfaces section of ESP-IDF Programming Guide. Eg: [Section for ESP32][jtag-interfaces-esp32] +> ⚠️ **Note**: On Windows, `USB Serial Converter A 0403 6010 00` driver should be WinUSB. 2. Set up VSCode 1. Install [Cortex-Debug][cortex-debug] extension for VS Code. 2. Create the `.vscode/launch.json` file in the project tree you want to debug. @@ -35,16 +29,15 @@ There is also a possibility to debug with graphical output directly in Visual St // more info at: https://github.com/Marus/cortex-debug/blob/master/package.json "name": "Attach", "type": "cortex-debug", - "request": "attach", // attach instead of launch, because otherwise flash write is attempted, but fails + "request": "attach", // launch will fail when attempting to download the app into the target "cwd": "${workspaceRoot}", - "executable": "target/xtensa-esp32-none-elf/debug/.....", + "executable": "target/xtensa-esp32-none-elf/debug/.....", //!MODIFY "servertype": "openocd", "interface": "jtag", - "svdFile": "../../esp-pacs/esp32/svd/esp32.svd", - "toolchainPrefix": "xtensa-esp32-elf", + "toolchainPrefix": "xtensa-esp32-elf", //!MODIFY "openOCDPreConfigLaunchCommands": ["set ESP_RTOS none"], - "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", - "configFiles": ["board/esp32-wrover-kit-3.3v.cfg"], + "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", //!MODIFY + "configFiles": ["board/esp32-wrover-kit-3.3v.cfg"], //!MODIFY "overrideAttachCommands": [ "set remote hardware-watchpoint-limit 2", "mon halt", @@ -56,71 +49,5 @@ There is also a possibility to debug with graphical output directly in Visual St } ``` -[esp-prog]: https://docs.espressif.com/projects/espressif-esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html -[cortex-debug]: https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug - -## ESP32-C3 - -The availability of built-in JTAG interface depends on the ESP32-C3 revision: - -- Revisions older than 3 **don't** a have built-in JTAG interface. -- Revisions 3 (and newer) **do** have a built-in JTAG interface, and you don't have to connect an external device to be able to debug. - -To find your ESP32-C3 revision, run: - -```shell -cargo espflash board-info -# or -espflash board-info -``` - -### Configuration - -1. (**Only for revisions older than 3**) Connect an external JTAG adapter, [ESP-Prog][esp-prog] can be used. - -| ESP32-C3 Pin | JTAG Signal | -| :----------: | :---------: | -| MTDO/GPIO7 | TDO | -| MTDI/GPIO5 | TDI | -| MTCK/GPIO6 | TCK | -| MTMS/GPIO4 | TMS | -| 3V3 | VJTAG | -| GND | GND | +[jtag-interfaces-esp32]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/configure-other-jtag.html -> ⚠️**Note**: On Windows `USB Serial Converter A 0403 6010 00` driver should be WinUSB. - -2. Set up VSCode - 1. Install [Cortex-Debug][cortex-debug] extension for VS Code. - 2. Create the `.vscode/launch.json` file in the project tree you want to debug. - 3. Update `executable`, `svdFile`, `serverpath` paths, and `toolchainPrefix` fields. -```json -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - // more info at: https://github.com/Marus/cortex-debug/blob/master/package.json - "name": "Attach", - "type": "cortex-debug", - "request": "attach", // attach instead of launch, because otherwise flash write is attempted, but fails - "cwd": "${workspaceRoot}", - "executable": "target/riscv32imc-unknown-none-elf/debug/examples/usb_serial_jtag", // - "servertype": "openocd", - "interface": "jtag", - "svdFile": "../../esp-pacs/esp32c3/svd/esp32c3.svd", - "toolchainPrefix": "riscv32-esp-elf", - "openOCDPreConfigLaunchCommands": ["set ESP_RTOS none"], - "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", - "configFiles": ["board/esp32c3-builtin.cfg"], - "overrideAttachCommands": [ - "set remote hardware-watchpoint-limit 2", - "mon halt", - "flushregs" - ], - "overrideRestartCommands": ["mon reset halt", "flushregs", "c"] - } - ] -} -``` From 6669604ab39ccca17488222341b5dcb74c1b5648 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Fri, 3 Nov 2023 16:58:18 +0100 Subject: [PATCH 04/11] feat: Update openOCD section --- src/SUMMARY.md | 1 - src/tooling/debugging/index.md | 19 +++++---- src/tooling/debugging/openocd.md | 67 ++++++++++++++++++++++++++----- src/tooling/debugging/probe-rs.md | 4 +- src/tooling/debugging/vscode.md | 53 ------------------------ 5 files changed, 68 insertions(+), 76 deletions(-) delete mode 100644 src/tooling/debugging/vscode.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 06eb0a3..2bf6847 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -22,7 +22,6 @@ - [Debugging](./tooling/debugging/index.md) - [probe-rs](./tooling/debugging/probe-rs.md) - [OpenOCD](./tooling/debugging/openocd.md) - - [Debugging in Visual Studio Code](./tooling/debugging/vscode.md) - [Simulating](./tooling/simulating/index.md) - [Wokwi](./tooling/simulating/wokwi.md) - [QEMU](tooling/simulating/qemu.md) diff --git a/src/tooling/debugging/index.md b/src/tooling/debugging/index.md index 48c8719..895d0bb 100644 --- a/src/tooling/debugging/index.md +++ b/src/tooling/debugging/index.md @@ -4,15 +4,15 @@ Debugging Rust applications is also possible using different tools that will be Refer to the table below to see which chip is supported in every debugging method: -| | **probe-rs** | **OpenOCD** | **VS Code** | -| :----------: | :----------: | :---------: | :---------: | -| **ESP32** | ❌ | ✅ | ✅ | -| **ESP32-C2** | ✅ | ✅ | ✅ | -| **ESP32-C3** | ✅ | ✅ | ✅ | -| **ESP32-C6** | ✅ | ✅ | ✅ | -| **ESP32-H2** | ✅ | ✅ | ✅ | -| **ESP32-S2** | ❌ | ✅ | ✅ | -| **ESP32-S3** | ❌ | ✅ | ✅ | +| | **probe-rs** | **OpenOCD** | +| :----------: | :----------: | :---------: | +| **ESP32** | ❌ | ✅ | +| **ESP32-C2** | ✅ | ✅ | +| **ESP32-C3** | ✅ | ✅ | +| **ESP32-C6** | ✅ | ✅ | +| **ESP32-H2** | ✅ | ✅ | +| **ESP32-S2** | ❌ | ✅ | +| **ESP32-S3** | ❌ | ✅ | ## `USB-JTAG-SERIAL` Peripheral @@ -28,7 +28,6 @@ Some of our recent products contain the `USB-JTAG-SERIAL` peripheral that allows # or espflash board-info ``` - - [ESP32-C6][esp32c6-docs] - [ESP32-H2][esp32h2-docs] - [ESP32-S3][esp32s3-docs] diff --git a/src/tooling/debugging/openocd.md b/src/tooling/debugging/openocd.md index 1aef190..ad0aeaf 100644 --- a/src/tooling/debugging/openocd.md +++ b/src/tooling/debugging/openocd.md @@ -1,19 +1,11 @@ # OpenOCD -Similar to [`probe-rs`][probe-rs], OpenOCD doesn't have support for the `Xtensa` architecture. However, Espressif does maintain a fork of OpenOCD under [espressif/openocd-esp32][espressif-openocd-esp32] which has support for Espressif's chips. +Similar to [`probe-rs`][probe-rs], OpenOCD doesn't have support for the `Xtensa` architecture. However, Espressif does maintain a fork of OpenOCD under [`espressif/openocd-esp32`][espressif-openocd-esp32] which has support for Espressif's chips. Instructions on how to install `openocd-esp32` for your platform can be found in [the Espressif documentation][espressif-documentation]. -[probe-rs]: ./probe-rs.md -[espressif-openocd-esp32]: https://github.com/espressif/openocd-esp32 -[espressif-documentation]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html#setup-of-openocd - -## Setup for Espressif Chips - - - -Once installed, it's as simple as running `openocd` with the correct scripts. For chips with the built-in USB JTAG, there is normally a config that will work out of the box, for example on the ESP32-C3: +Once installed, it's as simple as running `openocd` with the correct arguments. For chips with the built-in [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial], there is normally a config file that will work out of the box, for example on the ESP32-C3: ```shell openocd -f board/esp32c3-builtin.cfg @@ -24,3 +16,58 @@ For other configurations it may require specifying the chip and the interface, f ```shell openocd -f interface/jlink.cfg -f target/esp32.cfg ``` + +[probe-rs]: ./probe-rs.md +[espressif-openocd-esp32]: https://github.com/espressif/openocd-esp32 +[espressif-documentation]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html#setup-of-openocd +[usb-jtag-serial]: index.md#usb-jtag-serial-peripheral + +## VS Code Extension + +OpenOCD can be used in VS Code via the [`cortex-debug`][cortex-debug] extension to debug Espressif products. + +[cortex-debug]: https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug + +### Configuration + +1. If required, connect the external JTAG adapter. + 1. See Configure Other JTAG Interfaces section of ESP-IDF Programming Guide. Eg: [Section for ESP32][jtag-interfaces-esp32] +> ⚠️ **Note**: On Windows, `USB Serial Converter A 0403 6010 00` driver should be WinUSB. +2. Set up VSCode + 1. Install [Cortex-Debug][cortex-debug] extension for VS Code. + 2. Create the `.vscode/launch.json` file in the project tree you want to debug. + 3. Update `executable`, `svdFile`, `serverpath` paths, and `toolchainPrefix` fields. + +```json +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + // more info at: https://github.com/Marus/cortex-debug/blob/master/package.json + "name": "Attach", + "type": "cortex-debug", + "request": "attach", // launch will fail when attempting to download the app into the target + "cwd": "${workspaceRoot}", + "executable": "target/xtensa-esp32-none-elf/debug/.....", //!MODIFY + "servertype": "openocd", + "interface": "jtag", + "toolchainPrefix": "xtensa-esp32-elf", //!MODIFY + "openOCDPreConfigLaunchCommands": ["set ESP_RTOS none"], + "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", //!MODIFY + "configFiles": ["board/esp32-wrover-kit-3.3v.cfg"], //!MODIFY + "overrideAttachCommands": [ + "set remote hardware-watchpoint-limit 2", + "mon halt", + "flushregs" + ], + "overrideRestartCommands": ["mon reset halt", "flushregs", "c"] + } + ] +} +``` + +[jtag-interfaces-esp32]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/configure-other-jtag.html + diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index 5ff8e45..52e8a50 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -126,6 +126,6 @@ There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentatio [cargo-embed]: https://probe.rs/docs/tools/cargo-embed/ [cargo-embed-config]: https://probe.rs/docs/tools/cargo-embed/#configuration -## Using `probe-rs` as an OpenOCD Replacement +## GDB Integration -`probe-rs` has a `gdb` command that runs a GDB server, by default in port, `1337` +`probe-rs` includes a GDB stub to integrate into your usual workflow with common tools. The `gdb` command runs a GDB server, by default in port, `1337`. diff --git a/src/tooling/debugging/vscode.md b/src/tooling/debugging/vscode.md deleted file mode 100644 index b8749b7..0000000 --- a/src/tooling/debugging/vscode.md +++ /dev/null @@ -1,53 +0,0 @@ -# `cortex-debug` VS Code Extension - -The [`cortex-debug`][cortex-debug] VS Code extension also allows debugging Espressif products. Products containing the [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial] do'nt require any external hardware, but other products -may use an external JTAG debugger, like [ESP-Prog][esp-prog]. - - -[cortex-debug]: https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug -[usb-jtag-serial]: index.md#usb-jtag-serial-peripheral -[esp-prog]: https://docs.espressif.com/projects/espressif-esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html - -### Configuration - -1. If required, connect the external JTAG adapter. - 1. See Configure Other JTAG Interfaces section of ESP-IDF Programming Guide. Eg: [Section for ESP32][jtag-interfaces-esp32] -> ⚠️ **Note**: On Windows, `USB Serial Converter A 0403 6010 00` driver should be WinUSB. -2. Set up VSCode - 1. Install [Cortex-Debug][cortex-debug] extension for VS Code. - 2. Create the `.vscode/launch.json` file in the project tree you want to debug. - 3. Update `executable`, `svdFile`, `serverpath` paths, and `toolchainPrefix` fields. - -```json -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - // more info at: https://github.com/Marus/cortex-debug/blob/master/package.json - "name": "Attach", - "type": "cortex-debug", - "request": "attach", // launch will fail when attempting to download the app into the target - "cwd": "${workspaceRoot}", - "executable": "target/xtensa-esp32-none-elf/debug/.....", //!MODIFY - "servertype": "openocd", - "interface": "jtag", - "toolchainPrefix": "xtensa-esp32-elf", //!MODIFY - "openOCDPreConfigLaunchCommands": ["set ESP_RTOS none"], - "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", //!MODIFY - "configFiles": ["board/esp32-wrover-kit-3.3v.cfg"], //!MODIFY - "overrideAttachCommands": [ - "set remote hardware-watchpoint-limit 2", - "mon halt", - "flushregs" - ], - "overrideRestartCommands": ["mon reset halt", "flushregs", "c"] - } - ] -} -``` - -[jtag-interfaces-esp32]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/jtag-debugging/configure-other-jtag.html - From b6fdeadb160f9de31806a51a7a855358b5e5bfc7 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Mon, 6 Nov 2023 09:14:08 +0100 Subject: [PATCH 05/11] fix: Grammarly corrections --- src/tooling/debugging/openocd.md | 2 +- src/tooling/debugging/probe-rs.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tooling/debugging/openocd.md b/src/tooling/debugging/openocd.md index ad0aeaf..b890945 100644 --- a/src/tooling/debugging/openocd.md +++ b/src/tooling/debugging/openocd.md @@ -11,7 +11,7 @@ Once installed, it's as simple as running `openocd` with the correct arguments. openocd -f board/esp32c3-builtin.cfg ``` -For other configurations it may require specifying the chip and the interface, for example, ESP32 with a J-Link: +For other configurations, it may require specifying the chip and the interface, for example, ESP32 with a J-Link: ```shell openocd -f interface/jlink.cfg -f target/esp32.cfg diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index 52e8a50..dfae2e7 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -7,10 +7,10 @@ The [`probe-rs`][probe-rs] project is a set of tools to interact with embedded M - CLI for interactive debugging. - VS Code extension. - [Real Time Transfer (RTT)][rtt] - - Similar to [app_trace component of IDF][app-trace-idf]. + - Similar to [`app_trace` component of IDF][app-trace-idf]. - Flashing algorithms -Follow the [installation][prober-rs-installation] and [setup][prober-rs-setup] instructions at the [probe-rs] website. +Follow the [installation][prober-rs-installation] and [setup][prober-rs-setup] instructions at the [`probe-rs`][probe-rs] website. Espressif products containing the [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial] can use `probe-rs` without any external hardware. @@ -118,9 +118,9 @@ There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentatio ## `cargo-flash` and `cargo-embed` -`probe-rs` comes with along with this two tools: +`probe-rs` comes along with these two tools: - [`cargo-flash`][cargo-flash]: A flash tool that downloads your binary to the target and runs it. -- [`cargo-embed`][cargo-embed]: Superset of `cargo-flash` that also allows opening a RTT terminal or a GDB server. A [configuration file][cargo-embed-config] can used to define the behavior. +- [`cargo-embed`][cargo-embed]: Superset of `cargo-flash` that also allows opening an RTT terminal or a GDB server. A [configuration file][cargo-embed-config] can used to define the behavior. - [cargo-flash]: https://probe.rs/docs/tools/cargo-flash/ [cargo-embed]: https://probe.rs/docs/tools/cargo-embed/ From dd7fa079fe7b0b4c0507582c3d63ebf48b0440ae Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Mon, 6 Nov 2023 13:45:10 +0100 Subject: [PATCH 06/11] docs: Address review comments --- src/tooling/debugging/openocd.md | 1 + src/tooling/debugging/probe-rs.md | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/tooling/debugging/openocd.md b/src/tooling/debugging/openocd.md index b890945..18d31b7 100644 --- a/src/tooling/debugging/openocd.md +++ b/src/tooling/debugging/openocd.md @@ -57,6 +57,7 @@ OpenOCD can be used in VS Code via the [`cortex-debug`][cortex-debug] extension "toolchainPrefix": "xtensa-esp32-elf", //!MODIFY "openOCDPreConfigLaunchCommands": ["set ESP_RTOS none"], "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", //!MODIFY + "gdbPath": "C:/Espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb", //!MODIFY "configFiles": ["board/esp32-wrover-kit-3.3v.cfg"], //!MODIFY "overrideAttachCommands": [ "set remote hardware-watchpoint-limit 2", diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index dfae2e7..049a22a 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -41,10 +41,7 @@ runner = "probe-rs run --chip esp32c3 --format idf" With this configuration, you can flash and monitor your application using `cargo run`. -[`esp-flash-loader`][esp-flash-loader] is home to the `probe-rs` flash loader for Espressif products. - [idf-image]: https://docs.espressif.com/projects/esptool/en/latest/esp32c3/advanced-topics/firmware-image-format.html -[esp-flash-loader]: https://github.com/esp-rs/esp-flash-loader ## VS Code Extension @@ -111,17 +108,26 @@ There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentatio ``` > ⚠️ **Note**: The example `launch.json` uses `rtt`, which may require enabling such feature in some crates, like [`esp-println`][esp-println] and [`esp-backtrace`][esp-backtrace] +> Eg: ESP32-C3 `no_std` project that uses `esp-println` and `esp-backtrace`: +> ```toml +> esp-backtrace = { version = "0.9.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-rtt"] } +> esp-println = { version = "0.7.0", features = ["esp32c3", "rtt"] } +> ``` + +The `Launch` configuration will flash the device and start debugging process while `Attach` will start the debuggin in the already running application of the device. See VS Code documentation on [diferences between launch and attach][vscode-configs] for more details. + [probe-rs-vscode]: https://probe.rs/docs/tools/vscode/ [esp-println]: https://github.com/esp-rs/esp-println [esp-backtrace]: https://github.com/esp-rs/esp-backtrace?tab=readme-ov-file#features +[vscode-configs]: https://code.visualstudio.com/docs/editor/debugging#_launch-versus-attach-configurations ## `cargo-flash` and `cargo-embed` `probe-rs` comes along with these two tools: - [`cargo-flash`][cargo-flash]: A flash tool that downloads your binary to the target and runs it. - [`cargo-embed`][cargo-embed]: Superset of `cargo-flash` that also allows opening an RTT terminal or a GDB server. A [configuration file][cargo-embed-config] can used to define the behavior. -- + [cargo-flash]: https://probe.rs/docs/tools/cargo-flash/ [cargo-embed]: https://probe.rs/docs/tools/cargo-embed/ [cargo-embed-config]: https://probe.rs/docs/tools/cargo-embed/#configuration From fc144aec648cbb375f6727a94329c891b3175f3c Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Mon, 6 Nov 2023 15:09:10 +0100 Subject: [PATCH 07/11] docs: Add links to binutils --- src/tooling/debugging/openocd.md | 5 ++++- src/tooling/debugging/probe-rs.md | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/tooling/debugging/openocd.md b/src/tooling/debugging/openocd.md index 18d31b7..add84b7 100644 --- a/src/tooling/debugging/openocd.md +++ b/src/tooling/debugging/openocd.md @@ -5,6 +5,8 @@ Similar to [`probe-rs`][probe-rs], OpenOCD doesn't have support for the `Xtensa` Instructions on how to install `openocd-esp32` for your platform can be found in [the Espressif documentation][espressif-documentation]. +GDB with all the Espressif products supported can be obtained in [`espressif/binutils-gdb`][binutils-repo]. + Once installed, it's as simple as running `openocd` with the correct arguments. For chips with the built-in [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial], there is normally a config file that will work out of the box, for example on the ESP32-C3: ```shell @@ -20,6 +22,7 @@ openocd -f interface/jlink.cfg -f target/esp32.cfg [probe-rs]: ./probe-rs.md [espressif-openocd-esp32]: https://github.com/espressif/openocd-esp32 [espressif-documentation]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html#setup-of-openocd +[binutils-repo]: https://github.com/espressif/binutils-gdb [usb-jtag-serial]: index.md#usb-jtag-serial-peripheral ## VS Code Extension @@ -57,7 +60,7 @@ OpenOCD can be used in VS Code via the [`cortex-debug`][cortex-debug] extension "toolchainPrefix": "xtensa-esp32-elf", //!MODIFY "openOCDPreConfigLaunchCommands": ["set ESP_RTOS none"], "serverpath": "C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20220411/openocd-esp32/bin/openocd.exe", //!MODIFY - "gdbPath": "C:/Espressif/tools/riscv32-esp-elf-gdb/12.1_20221002/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb", //!MODIFY + "gdbPath": "C:/Espressif/tools/riscv32-esp-elf-gdb/riscv32-esp-elf-gdb/bin/riscv32-esp-elf-gdb.exe", //!MODIFY "configFiles": ["board/esp32-wrover-kit-3.3v.cfg"], //!MODIFY "overrideAttachCommands": [ "set remote hardware-watchpoint-limit 2", diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index 049a22a..b2feae4 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -134,4 +134,8 @@ The `Launch` configuration will flash the device and start debugging process whi ## GDB Integration -`probe-rs` includes a GDB stub to integrate into your usual workflow with common tools. The `gdb` command runs a GDB server, by default in port, `1337`. +`probe-rs` includes a GDB stub to integrate into your usual workflow with common tools. The `probe-rs gdb` command runs a GDB server, by default in port, `1337`. + +GDB with all the Espressif products supported can be obtained in [`espressif/binutils-gdb`][binutils-repo] + +[binutils-repo]: https://github.com/espressif/binutils-gdb From 412f11131baafa65961d6a34ad2e2b7ff1ebb15c Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Wed, 22 Nov 2023 14:40:33 +0100 Subject: [PATCH 08/11] docs: Update probe-rs support --- src/tooling/debugging/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tooling/debugging/index.md b/src/tooling/debugging/index.md index 895d0bb..e2a37c1 100644 --- a/src/tooling/debugging/index.md +++ b/src/tooling/debugging/index.md @@ -6,13 +6,13 @@ Refer to the table below to see which chip is supported in every debugging metho | | **probe-rs** | **OpenOCD** | | :----------: | :----------: | :---------: | -| **ESP32** | ❌ | ✅ | +| **ESP32** | ⏳ | ✅ | | **ESP32-C2** | ✅ | ✅ | | **ESP32-C3** | ✅ | ✅ | | **ESP32-C6** | ✅ | ✅ | | **ESP32-H2** | ✅ | ✅ | -| **ESP32-S2** | ❌ | ✅ | -| **ESP32-S3** | ❌ | ✅ | +| **ESP32-S2** | ⏳ | ✅ | +| **ESP32-S3** | ⏳ | ✅ | ## `USB-JTAG-SERIAL` Peripheral From b5a9fdae5aec8beb140105358c52607d67c580ab Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Wed, 22 Nov 2023 14:45:55 +0100 Subject: [PATCH 09/11] docs: Remove direct-boot --- src/tooling/debugging/probe-rs.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index b2feae4..e66165b 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -26,11 +26,8 @@ Espressif products containing the [`USB-JTAG-SERIAL` peripheral][usb-jtag-serial ## Flashing with `probe-rs` -`probe-rs` can be used to flash your applications to your target, there are 2 supported image formats: -- [ESP-IDF image format][idf-image]: This is the default format used by `espflash` and `cargo-espflash` and can be used in `probe-rs` using the `--format idf` argument +`probe-rs` can be used to flash applications to your target since it supports the [ESP-IDF image format][idf-image] via the `--format idf` argument. - Example command for flashing an ESP32-C3: `probe-rs run --chip esp32c3 --format idf` -- `direct-boot`: Only supported in some Espressif products. - - Example command for flashing an ESP32-C3: `probe-rs run --chip esp32c3` The flashing command can be set as a custom Cargo runner by adding the following to your project's `.cargo/config.toml` file: From 001491235f3c93ab99f46ef60103d87e63860bd3 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Wed, 22 Nov 2023 14:51:30 +0100 Subject: [PATCH 10/11] docs: Update probe-rs link --- src/tooling/debugging/probe-rs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index e66165b..2f7b90c 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -111,10 +111,10 @@ There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentatio > esp-println = { version = "0.7.0", features = ["esp32c3", "rtt"] } > ``` -The `Launch` configuration will flash the device and start debugging process while `Attach` will start the debuggin in the already running application of the device. See VS Code documentation on [diferences between launch and attach][vscode-configs] for more details. +The `Launch` configuration will flash the device and start debugging process while `Attach` will start the debugging in the already running application of the device. See VS Code documentation on [differences between launch and attach][vscode-configs] for more details. -[probe-rs-vscode]: https://probe.rs/docs/tools/vscode/ +[probe-rs-vscode]: https://probe.rs/docs/tools/debugger/ [esp-println]: https://github.com/esp-rs/esp-println [esp-backtrace]: https://github.com/esp-rs/esp-backtrace?tab=readme-ov-file#features [vscode-configs]: https://code.visualstudio.com/docs/editor/debugging#_launch-versus-attach-configurations From 0237a595988febc13a236b1954151fba961088f5 Mon Sep 17 00:00:00 2001 From: Sergio Gasquez Date: Wed, 22 Nov 2023 14:55:13 +0100 Subject: [PATCH 11/11] docs: FIx code snippet --- src/tooling/debugging/probe-rs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tooling/debugging/probe-rs.md b/src/tooling/debugging/probe-rs.md index 2f7b90c..8e76979 100644 --- a/src/tooling/debugging/probe-rs.md +++ b/src/tooling/debugging/probe-rs.md @@ -108,7 +108,7 @@ There is a `probe-rs` extension in VS Code, see `probe-rs` [VS Code documentatio > Eg: ESP32-C3 `no_std` project that uses `esp-println` and `esp-backtrace`: > ```toml > esp-backtrace = { version = "0.9.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-rtt"] } -> esp-println = { version = "0.7.0", features = ["esp32c3", "rtt"] } +> esp-println = { version = "0.7.0", features = ["esp32c3", "rtt"], default-features = flase } > ``` The `Launch` configuration will flash the device and start debugging process while `Attach` will start the debugging in the already running application of the device. See VS Code documentation on [differences between launch and attach][vscode-configs] for more details.