You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# build.sh knows how to compile but it problimatic on Win10
42
+
COPY build.sh .
43
+
RUN chmod +x build.sh
44
+
# create_build_openocd.sh uses cmake to crate to build directory
45
+
COPY create_build_openocd.sh .
46
+
RUN chmod +x create_build_openocd.sh
47
+
# Lets get each in a separate docker layer for better downloads
48
+
# GCC
49
+
# RUN bash -c "source /opt/build.sh; GetGcc;"
50
+
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -O - | tar -xj -C /opt
51
+
# NrfSdk
52
+
# RUN bash -c "source /opt/build.sh; GetNrfSdk;"
53
+
RUN wget -q "https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip" -O /tmp/nRF5_SDK_15.3.0_59ac345
54
+
RUN unzip -q /tmp/nRF5_SDK_15.3.0_59ac345 -d /opt
55
+
RUN rm /tmp/nRF5_SDK_15.3.0_59ac345
56
+
# McuBoot
57
+
# RUN bash -c "source /opt/build.sh; GetMcuBoot;"
58
+
RUN git clone https://github.com/JuulLabs-OSS/mcuboot.git
59
+
RUN pip3 install -r ./mcuboot/scripts/requirements.txt
4. Allow VS Code to open folder with devcontainer.
21
+
22
+
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.
23
+
24
+
In order to build InfiniTime we need to run the initial submodule init and CMake commands.
25
+
26
+
#### Manually
27
+
28
+
You can use the VS Code terminal to run the CMake commands as outlined in the [build instructions](blob/develop/doc/buildAndProgram.md)
29
+
30
+
#### Script
31
+
32
+
The dev environment comes with some scripts to make this easier, They are located in /opt/.
33
+
34
+
There are also VS Code tasks provided should you desire to use those.
35
+
36
+
The task "update submodules" will update the git submodules
37
+
38
+
39
+
40
+
### Build
41
+
42
+
You can use the build.sh script located in /opt/
43
+
44
+
CMake is also configured and controls for the CMake plugin are available in VS Code
45
+
46
+
47
+
48
+
### Debugging
49
+
50
+
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.
This will launch OpenOCD in server mode and attach it to the MCU.
55
+
56
+
The default launch.json file expects OpenOCD to be listening on port 3333, edit if needed
57
+
58
+
59
+
## Current Issues
60
+
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
0 commit comments