@@ -5,30 +5,34 @@ RUN apt-get update \
55 curl \
66 xz-utils \
77 unzip \
8- wget
8+ wget
99
10- ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
10+ RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted
11+
12+ ARG GCC_VERSION=13.2.rel1
13+ ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/$GCC_VERSION/binrel/arm-gnu-toolchain-$GCC_VERSION-x86_64-arm-none-eabi.tar.xz
1114RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \
1215 && curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \
1316 && xz -d /tmp/dc-downloads/gcc-arm.tar.xz \
1417 && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \
1518 && rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/
1619
20+ ARG CMAKE_VERSION=3.27.6
21+ ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh
22+ RUN wget $CMAKE_SCRIPT \
23+ -q -O /tmp/dc-downloads/cmake-install.sh \
24+ && chmod u+x /tmp/dc-downloads/cmake-install.sh \
25+ && mkdir -p /tmp/dc-extracted/cmake \
26+ && /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
27+ && rm /tmp/dc-downloads/cmake-install.sh
28+
1729# This is TI XDC tools for linux. Cheack all versions here: https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/index.html
1830ARG TI_TOOL_URL=https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_62_00_08/exports/xdccore/xdctools_3_62_00_08_core_linux.zip
1931RUN mkdir -p /tmp/dc-extracted/titools \
2032 && curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \
2133 && unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip
2234
23- ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh
24- RUN wget $CMAKE_SCRIPT \
25- -q -O /tmp/cmake-install.sh \
26- && chmod u+x /tmp/cmake-install.sh \
27- && mkdir /tmp/dc-extracted/cmake \
28- && /tmp/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \
29- && rm /tmp/cmake-install.sh
30-
31- FROM ubuntu:latest AS devcontainer
35+ FROM python:3.10 AS devcontainer
3236
3337# Avoid warnings by switching to noninteractive
3438ENV DEBIAN_FRONTEND=noninteractive
@@ -53,40 +57,37 @@ RUN apt-get update \
5357 nodejs \
5458 libffi-dev
5559
56- # Set Python 10 as the default version
57- RUN apt-get install -y software-properties-common \
58- && add-apt-repository ppa:deadsnakes/ppa \
59- && apt-get update \
60- && apt-get install -y python3.10 \
61- python3-pip
62-
6360# Create needed directories
6461RUN mkdir -p /usr/local/bin/gcc \
6562 && mkdir -p /usr/local/bin/titools
6663
6764# Clone ChibiOS repo
68- RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
65+ # RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs
6966# Alternative source for those having issues with git svn downloads:
70- # RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
67+ RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs
7168
7269# Clone support repos for STM32 including AzureRTOS
7370RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \
7471 && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \
7572 && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \
7673 && git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \
77- && git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \
78- && git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/netxduo.git --depth 1 ./sources/NetxDuo \
7974 && git clone --branch nanoframework https://github.com/nanoframework/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib
8075
81- # Clone libs mbedtls and fatfs etc.
76+ # Clone repos for AzureRTOS
77+ RUN git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \
78+ && git clone --branch v6.3.0_rel --recursive https://github.com/azure-rtos/netxduo.git --depth 1 ./sources/NetxDuo
79+
80+ # Clone dependent repos (mbedtls, fatfs and spiffs)
8281RUN git clone --branch mbedtls-2.28.5 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \
8382 && git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \
84- && git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip .git --depth 1 ./sources/lwip
83+ && git clone --branch nf-build https://github.com/nanoframework/spiffs .git --depth 1 ./sources/spiffs
8584
8685# Clone FreeRTOS and what is needed for ESP32
8786RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \
88- && git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5 \
89- && git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs
87+ && git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5
88+
89+ # Clone lwIP for STM32 and NXP
90+ RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip
9091
9192# Clone ESP-IDF
9293RUN git clone --branch v4.4.6 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf
@@ -100,11 +101,11 @@ RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC
100101 && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh
101102
102103# set gcc location
103- ENV ARM_GCC_PATH =/usr/local/bin/gcc
104- ENV PATH=$ARM_GCC_PATH /bin:${PATH}
104+ ARG TMP_GCC_PATH =/usr/local/bin/gcc
105+ ENV ARM_GCC_PATH=$TMP_GCC_PATH /bin
105106
106107# Copy from our other container
107- COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH
108+ COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH
108109COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools
109110COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake
110111
@@ -113,7 +114,7 @@ ENV PATH=/usr/bin/cmake/bin:${PATH}
113114# Putting hex2dfu in the container
114115ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu
115116
116- ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v3.0.2 /hex2dfu
117+ ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download /hex2dfu
117118RUN mkdir -p $HEX2DFU_PATH \
118119 && curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \
119120 && chmod +x $HEX2DFU_PATH/hex2dfu
0 commit comments