Updated documentation

This commit is contained in:
Tim Keller 2021-07-26 01:14:23 +00:00
parent f7643a4d82
commit e9248b225e
6 changed files with 54 additions and 8 deletions

View File

@ -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. 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/ 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

View File

@ -47,14 +47,14 @@
"short": "No DFU", "short": "No DFU",
"long": "Do not build DFU", "long": "Do not build DFU",
"settings": { "settings": {
"BUILD_DFU":0 "BUILD_DFU":"0"
} }
}, },
"yes": { "yes": {
"short": "Build DFU", "short": "Build DFU",
"long": "Build DFU", "long": "Build DFU",
"settings": { "settings": {
"BUILD_DFU":1 "BUILD_DFU":"1"
} }
} }
} }

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["ms-vscode.cpptools","ms-vscode.cmake-tools","marus25.cortex-debug"]
}

8
.vscode/launch.json vendored
View File

@ -4,13 +4,13 @@
{ {
"name": "Debug - Openocd docker Remote", "name": "Debug - Openocd docker Remote",
"type":"cortex-debug", "type":"cortex-debug",
"cortex-debug.armToolchainPath":"${env:COMPILER_DIR}/bin", "cortex-debug.armToolchainPath":"${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}", "executable": "${command:cmake.launchTargetPath}",
"request": "launch", "request": "launch",
"servertype": "external", "servertype": "external",
// This may need to be arm-none-eabi-gdb depending on your system // 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 // Connect to an already running OpenOCD instance
"gdbTarget": "host.docker.internal:3333", "gdbTarget": "host.docker.internal:3333",
"svdFile": "${workspaceRoot}/nrf52.svd", "svdFile": "${workspaceRoot}/nrf52.svd",
@ -24,13 +24,13 @@
{ {
"name": "Debug - Openocd Local", "name": "Debug - Openocd Local",
"type":"cortex-debug", "type":"cortex-debug",
"cortex-debug.armToolchainPath":"${env:COMPILER_DIR}/bin", "cortex-debug.armToolchainPath":"${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin",
"cwd": "${workspaceRoot}", "cwd": "${workspaceRoot}",
"executable": "${command:cmake.launchTargetPath}", "executable": "${command:cmake.launchTargetPath}",
"request": "launch", "request": "launch",
"servertype": "openocd", "servertype": "openocd",
// This may need to be arm-none-eabi-gdb depending on your system // 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 // Connect to an already running OpenOCD instance
"gdbTarget": "localhost:3333", "gdbTarget": "localhost:3333",
"svdFile": "${workspaceRoot}/nrf52.svd", "svdFile": "${workspaceRoot}/nrf52.svd",

View File

@ -87,6 +87,7 @@ As of now, here is the list of achievements of this project:
- [Build the project](doc/buildAndProgram.md) - [Build the project](doc/buildAndProgram.md)
- [Flash the firmware using OpenOCD and STLinkV2](doc/openOCD.md) - [Flash the firmware using OpenOCD and STLinkV2](doc/openOCD.md)
- [Build the project with Docker](doc/buildWithDocker.md) - [Build the project with Docker](doc/buildWithDocker.md)
- [Build the project with VSCode](doc/buildWithVScode.md)
- [Bootloader, OTA and DFU](./bootloader/README.md) - [Bootloader, OTA and DFU](./bootloader/README.md)
- [Stub using NRF52-DK](./doc/PinetimeStubWithNrf52DK.md) - [Stub using NRF52-DK](./doc/PinetimeStubWithNrf52DK.md)
- Logging with JLink RTT. - Logging with JLink RTT.

42
doc/buildWithVScode.md Normal file
View File

@ -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)