Merge pull request #1073 from watertrainer/patch-1

Documentation for building on Windows (see #1056)
This commit is contained in:
Avamander 2022-04-17 16:50:01 +03:00 committed by GitHub
commit 01270c71ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,8 +172,10 @@ docker image build -t infinitime-build --build-arg PUID=$(id -u) --build-arg PGI
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.
At the moment building using VSCode on Windows has not been done yet. Using the [devcontainer](#vs-codedocker-devcontainer) is probably the easiest way.
#### 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
@ -218,6 +220,20 @@ To use the DevContainer configuration on Ubuntu based systems two changes need t
``openocd -f interface/stlink.cfg -f target/nrf52.cfg``. This launches openocd with the default ports ``3333``, ``4444`` and ``6666``.
4. In VsCode go to the Debug pane on the left of the screen and select the configuration ``Debug - Openocd docker Remote`` and hit the play button on the left.
##### Dev Container on Windows
To use the DevContainer configuration on Windows a few files need their line endings changed, e.g. by using [notepad++](https://notepad-plus-plus.org/)
```
\InfiniTime\tools\mcuboot\imgtool.py
\InfiniTime\tools\mcuboot\imgtool_init_.py
\InfiniTime\tools\mcuboot\imgtool\boot_record.py
\InfiniTime\tools\mcuboot\imgtool\image.py
\InfiniTime\tools\mcuboot\imgtool\version.py
```
You also need to install ```cbor``` with ```pip install cbor``` or by running ```pip install -r requirements.txt``` in ```\Infitime\tools\mcuboot```.
## Build the documentation
### Setup
The documentation is written in Markdown (.md) files and generated using the Sphinx documentation generator.