summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Cooling <niallcooling@gmail.com>2021-02-25 17:49:40 +0000
committerTim Keller <geekboy1011@gmail.com>2021-08-07 17:17:38 +0000
commit382db668ed513836a52ff4fdc49b0ee7a08a1527 (patch)
tree7e00ba9ffc2152065692a93b2f4fdf44ffa3ea92
parent273a94f298cc96a1415499d00559fed3a741af71 (diff)
macOS and Win10 dockerfile
-rw-r--r--.devcontainer/Dockerfile5
-rwxr-xr-x.devcontainer/create_build_openocd.sh3
-rw-r--r--.devcontainer/devcontainer.json2
3 files changed, 7 insertions, 3 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 7e961528..2c223bc1 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -27,14 +27,15 @@ RUN pip3 install adafruit-nrfutil
RUN pip3 install setuptools_rust
WORKDIR /opt/
-# build.sh knows how to compile
+# build.sh knows how to compile but it problimatic on Win10
COPY build.sh .
+# create_build_openocd.sh uses cmake to crate to build directory
+COPY create_build_openocd.sh .
# Lets get each in a separate docker layer for better downloads
# GCC
# RUN bash -c "source /opt/build.sh; GetGcc;"
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
-# RUN rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
# NrfSdk
# RUN bash -c "source /opt/build.sh; GetNrfSdk;"
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
diff --git a/.devcontainer/create_build_openocd.sh b/.devcontainer/create_build_openocd.sh
new file mode 100755
index 00000000..860ffa1f
--- /dev/null
+++ b/.devcontainer/create_build_openocd.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+rm -rf build/
+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 \ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index fb81d289..1740a8e4 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -24,7 +24,7 @@
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
- // "postCreateCommand": "gcc -v",
+ // "postCreateCommand": "/opt/create_build_openocd.sh",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"