Skip to content

Commit 384e0a5

Browse files
committed
Add local container debugging instructions
1 parent a2a38ea commit 384e0a5

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docs/debugging.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This article on debugging is under construction. It refers to products in private beta, and also uses techniques that could expose your internet network to external attack. Care should be taken when following the steps below.
44

5-
## Install Open OCD
5+
## Install OpenOCD
66

77
1. Install the relevant driver for the devkits on chip debugger:
88
|Devkit |Driver |
@@ -17,6 +17,7 @@ This article on debugging is under construction. It refers to products in privat
1717
You can choose to develop locally or develop in [Codespaces](https://github.com/features/codespaces).
1818

1919
* Developing locally requires the installation of the build/debug tools on your local machine to build the application.
20+
* Develop locally in a Docker container. The development envrionment will be built automatically on your local mahcine.
2021
* Developing in Codespaces doesn't require additional installation, however it requires early access to the Codespaces beta and also to expose a port on your computer the public internet.
2122

2223
### Setup Local Development
@@ -28,10 +29,23 @@ You can choose to develop locally or develop in [Codespaces](https://github.com/
2829
1. Open Visual Studio Code and install the required extensions:
2930
* Required
3031
* [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
32+
* [Cortex Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug)
3133
* Recommended
3234
* [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools)
3335
* [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake)
3436

37+
### Setup Docker Development
38+
39+
1. Go to the [Getting Started GitHub repository](https://github.com/azure-rtos/getting-started)
40+
1. Recursively clone the repository to your machine.
41+
1. Run as Administrator "tools\get-toolchain.bat" from the repository clone to install the required build tools.
42+
1. Install [Visual Studio Code](https://code.visualstudio.com).
43+
1. Install [Docker Desktop](https://www.docker.com)
44+
1. Open Visual Studio Code and install the required extensions:
45+
* Required
46+
* [Remote Development](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)
47+
1. From the Command Palette (F1), choose "Remote-Containers: Open Folder in Container", and select the root folder of the cloned repository to build the Docker contains and start debugging
48+
3549
### Setup Codespaces Development
3650

3751
1. Go to the [Getting Started GitHub repository](https://github.com/azure-rtos/getting-started).
@@ -48,12 +62,12 @@ You can choose to develop locally or develop in [Codespaces](https://github.com/
4862
|---------|---------|
4963
|STM BL475E-IOT01 |openocd.exe -f "board/stm32l4discovery.cfg" -c "bindto 0.0.0.0" -c init -c "reset init"
5064

51-
1. Select "Add a Folder to your Workspace...", and choose the folder for the devkit of your choice.
52-
> For example: choose the "STMicroelectronics/STM32L4_L4+" folder for the B-L475-IOT01 devkit.
65+
1. Open the VSCode workspace in the directory for the devkit you would like to debug. For example the STM32L4 devkit workspace is "STMicroelectronics/STM32L4_L4+/STM32L4plus.code-workspace".
5366

5467
1. Build the application by pressing "F7"
5568
1. Choose the "ARM GCC Cortex" CMake kit when prompted
5669

5770
1. Start the debugger by pressing "F5".
5871
1. For debugging locally, use "localhost:3333" for the OpenOCD hostname.
72+
1. For debugging from a local Docker image, use "host.docker.internal:3333".
5973
1. For debugging via Codespaces, specify {PUBLIC_IP_ADDRESS}:3333

0 commit comments

Comments
 (0)