Skip to content

Commit 382db66

Browse files
Niall Coolinggeekbozu
authored andcommitted
macOS and Win10 dockerfile
1 parent 273a94f commit 382db66

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ RUN pip3 install adafruit-nrfutil
2727
RUN pip3 install setuptools_rust
2828

2929
WORKDIR /opt/
30-
# build.sh knows how to compile
30+
# build.sh knows how to compile but it problimatic on Win10
3131
COPY build.sh .
32+
# create_build_openocd.sh uses cmake to crate to build directory
33+
COPY create_build_openocd.sh .
3234

3335
# Lets get each in a separate docker layer for better downloads
3436
# GCC
3537
# RUN bash -c "source /opt/build.sh; GetGcc;"
3638
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
37-
# RUN rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
3839
# NrfSdk
3940
# RUN bash -c "source /opt/build.sh; GetNrfSdk;"
4041
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
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
rm -rf build/
3+
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug -DUSE_OPENOCD=1 -DARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2020-q2-update -DNRF5_SDK_PATH=/opt/nRF5_SDK_15.3.0_59ac345 -S . -Bbuild

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// "forwardPorts": [],
2525

2626
// Use 'postCreateCommand' to run commands after the container is created.
27-
// "postCreateCommand": "gcc -v",
27+
// "postCreateCommand": "/opt/create_build_openocd.sh",
2828

2929
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3030
// "remoteUser": "vscode"

0 commit comments

Comments
 (0)