From e9248b225e78e36ff04f7c26244adf200e17020e Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 26 Jul 2021 01:14:23 +0000 Subject: Updated documentation --- doc/buildWithVScode.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/buildWithVScode.md (limited to 'doc') diff --git a/doc/buildWithVScode.md b/doc/buildWithVScode.md new file mode 100644 index 00000000..31174d1c --- /dev/null +++ b/doc/buildWithVScode.md @@ -0,0 +1,42 @@ +# Build and Develop the project using VS Code + +The .VSCode folder contains configuration files for developing InfiniTime with VS Code. Effort was made to have these rely on Environment variables instead of hardcoded paths. + +## Environment Setup + +To support as many setups as possible the VS Code configuration files expect there to be certain environment variables to be set. + + Variable | Description | Example +----------|-------------|-------- +**ARM_NONE_EABI_TOOLCHAIN_PATH**|path to the toolchain directory|`export ARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2020-q2-update` +**NRF5_SDK_PATH**|path to the NRF52 SDK|`export NRF5_SDK_PATH=/opt/nRF5_SDK_15.3.0_59ac345` + +## VS Code Extensions + +We leverage a few VS Code extensions for ease of development. + +#### Required Extensions + +- [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) - C/C++ IntelliSense, debugging, and code browsing. +- [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) - Extended CMake support in Visual Studio Code + +#### Optional Extensions + +[Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) - ARM Cortex-M GDB Debugger support for VSCode + +Cortex-Debug is only required for interactive debugging using VS Codes built in GDB support. + + + +## VS Code/Docker DevContainer + +The .devcontainer folder contains the configuration and scripts for using a Docker dev container for building InfiniTime + +Using the [Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension is recommended. It will handle configuring the Docker virtual machine and setting everything up. + +More documentation is available in the [readme in .devcontainer](.devcontainer/readme.md) + + + + + -- cgit v1.2.3 From 7f2ee62aedd359d34af6569bc691e216a49a7f5d Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Mon, 26 Jul 2021 15:43:48 +0000 Subject: Typos for days --- .devcontainer/README.md | 32 ++++++++++++++++---------------- doc/buildWithVScode.md | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'doc') diff --git a/.devcontainer/README.md b/.devcontainer/README.md index c8aef574..1932a9d4 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -1,11 +1,11 @@ -# VScode devcontainer -This is a docker-based interactive development environment using VSCode and Docker Devcontainers removing the need to install any tools locally* +# VS Code Dev Container +This is a docker-based interactive development environment using VS Code and Docker Dev Containers removing the need to install any tools locally* ## Requirements -- VScode +- VS Code - [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension - Docker - OpenOCD - For debugging @@ -14,24 +14,24 @@ This is a docker-based interactive development environment using VSCode and Dock ### Code editing, and building. -1. Clone InifiniTime and update submodules -2. Launch VSCode -3. Open InifiTime directory, -4. Allow VSCode to open folder with devcontainer. +1. Clone InfiniTime and update submodules +2. Launch VS Code +3. Open InfiniTime directory, +4. Allow VS Code to open folder with devcontainer. After this the environment will be built if you do not currently have a container setup, it will install all the necessary tools and extra VSCode extensions. -In order to build InfiniTime we need to run the initial submodule init and Cmake commands. +In order to build InfiniTime we need to run the initial submodule init and CMake commands. #### Manually - You can use the VSCode terminal to run the CMake commands as outlined in the [build instructions](blob/develop/doc/buildAndProgram.md) + You can use the VS Code terminal to run the CMake commands as outlined in the [build instructions](blob/develop/doc/buildAndProgram.md) #### Script -The dev enviroment comes with some scripts to make this easier, They are located in /opt/. +The dev environment comes with some scripts to make this easier, They are located in /opt/. -There are also VSCode tasks provided should you desire to use those. +There are also VS Code tasks provided should you desire to use those. The task "update submodules" will update the git submodules @@ -41,20 +41,20 @@ The task "update submodules" will update the git submodules You can use the build.sh script located in /opt/ -CMake is also configured and controlls for the CMake plugin are available in VSCode +CMake is also configured and controls for the CMake plugin are available in VS Code ### Debugging -Docker on windows does not support passing USB devices to the underlying WSL2 subsystem, To get around this we use openocd in server mode running on the host. +Docker on windows does not support passing USB devices to the underlying WSL2 subsystem, To get around this we use OpenOCD in server mode running on the host. `openocd -f -f ` -This will launch openocd in server mode and attach it to the MCU. +This will launch OpenOCD in server mode and attach it to the MCU. -The default launch.json file expects openocd to be listening on port 3333, edit if needed +The default launch.json file expects OpenOCD to be listening on port 3333, edit if needed ## Current Issues -Currently WSL2 Has some real performance issues with IO on a windows host. Accessing files on the virtualized filesystem is much faster. Using VSCodes "clone in container" feature of the Remote - Containers will get around this. After the container is built you will need to update the submodules and follow the build isntructions like normal \ No newline at end of file +Currently WSL2 Has some real performance issues with IO on a windows host. Accessing files on the virtualized filesystem is much faster. Using VS Codes "clone in container" feature of the Remote - Containers will get around this. After the container is built you will need to update the submodules and follow the build instructions like normal \ No newline at end of file diff --git a/doc/buildWithVScode.md b/doc/buildWithVScode.md index 31174d1c..c1df17b7 100644 --- a/doc/buildWithVScode.md +++ b/doc/buildWithVScode.md @@ -1,6 +1,6 @@ # Build and Develop the project using VS Code -The .VSCode folder contains configuration files for developing InfiniTime with VS Code. Effort was made to have these rely on Environment variables instead of hardcoded paths. +The .VS Code folder contains configuration files for developing InfiniTime with VS Code. Effort was made to have these rely on Environment variables instead of hardcoded paths. ## Environment Setup @@ -22,7 +22,7 @@ We leverage a few VS Code extensions for ease of development. #### Optional Extensions -[Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) - ARM Cortex-M GDB Debugger support for VSCode +[Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) - ARM Cortex-M GDB Debugger support for VS Code Cortex-Debug is only required for interactive debugging using VS Codes built in GDB support. -- cgit v1.2.3