summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <geekboy1011@gmail.com>2021-07-26 01:14:23 +0000
committerTim Keller <geekboy1011@gmail.com>2021-08-07 18:19:11 +0000
commite9248b225e78e36ff04f7c26244adf200e17020e (patch)
treec06977ff4b46fb45000715814ebad92fac24eb9e
parentf7643a4d828ec3c60f418b6d9a660097eb44e05e (diff)
Updated documentation
-rw-r--r--.devcontainer/README.md4
-rw-r--r--.vscode/cmake-variants.json4
-rw-r--r--.vscode/extensions.json3
-rw-r--r--.vscode/launch.json8
-rw-r--r--README.md1
-rw-r--r--doc/buildWithVScode.md42
6 files changed, 54 insertions, 8 deletions
diff --git a/.devcontainer/README.md b/.devcontainer/README.md
index ff9307b2..c8aef574 100644
--- a/.devcontainer/README.md
+++ b/.devcontainer/README.md
@@ -33,7 +33,7 @@ The dev enviroment comes with some scripts to make this easier, They are located
There are also VSCode tasks provided should you desire to use those.
-The task BuildInit will update submodules and configure for openocd
+The task "update submodules" will update the git submodules
@@ -41,7 +41,7 @@ The task BuildInit will update submodules and configure for openocd
You can use the build.sh script located in /opt/
-There will also eventually be a Build task. - Not written yet
+CMake is also configured and controlls for the CMake plugin are available in VSCode
diff --git a/.vscode/cmake-variants.json b/.vscode/cmake-variants.json
index d00e638e..9c95a631 100644
--- a/.vscode/cmake-variants.json
+++ b/.vscode/cmake-variants.json
@@ -47,14 +47,14 @@
"short": "No DFU",
"long": "Do not build DFU",
"settings": {
- "BUILD_DFU":0
+ "BUILD_DFU":"0"
}
},
"yes": {
"short": "Build DFU",
"long": "Build DFU",
"settings": {
- "BUILD_DFU":1
+ "BUILD_DFU":"1"
}
}
}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000..1cc05268
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,3 @@
+{
+ "recommendations": ["ms-vscode.cpptools","ms-vscode.cmake-tools","marus25.cortex-debug"]
+} \ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 78fc1180..7cf3acd1 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -4,13 +4,13 @@
{
"name": "Debug - Openocd docker Remote",
"type":"cortex-debug",
- "cortex-debug.armToolchainPath":"${env:COMPILER_DIR}/bin",
+ "cortex-debug.armToolchainPath":"${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"servertype": "external",
// This may need to be arm-none-eabi-gdb depending on your system
- "gdbPath" : "${env:COMPILER_DIR}/bin/arm-none-eabi-gdb",
+ "gdbPath" : "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb",
// Connect to an already running OpenOCD instance
"gdbTarget": "host.docker.internal:3333",
"svdFile": "${workspaceRoot}/nrf52.svd",
@@ -24,13 +24,13 @@
{
"name": "Debug - Openocd Local",
"type":"cortex-debug",
- "cortex-debug.armToolchainPath":"${env:COMPILER_DIR}/bin",
+ "cortex-debug.armToolchainPath":"${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin",
"cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"servertype": "openocd",
// This may need to be arm-none-eabi-gdb depending on your system
- "gdbPath" : "${env:COMPILER_DIR}/bin/arm-none-eabi-gdb",
+ "gdbPath" : "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gdb",
// Connect to an already running OpenOCD instance
"gdbTarget": "localhost:3333",
"svdFile": "${workspaceRoot}/nrf52.svd",
diff --git a/README.md b/README.md
index bd23c867..4b067dce 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,7 @@ As of now, here is the list of achievements of this project:
- [Build the project](doc/buildAndProgram.md)
- [Flash the firmware using OpenOCD and STLinkV2](doc/openOCD.md)
- [Build the project with Docker](doc/buildWithDocker.md)
+ - [Build the project with VSCode](doc/buildWithVScode.md)
- [Bootloader, OTA and DFU](./bootloader/README.md)
- [Stub using NRF52-DK](./doc/PinetimeStubWithNrf52DK.md)
- Logging with JLink RTT.
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)
+
+
+
+
+