macOS and Win10 dockerfile

This commit is contained in:
Niall Cooling 2021-02-25 17:49:40 +00:00 committed by Tim Keller
parent 273a94f298
commit 382db668ed
3 changed files with 7 additions and 3 deletions

View file

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

View file

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

View file

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