|
1 | | -FROM ubuntu:latest AS downloader |
2 | | -RUN apt-get update \ |
3 | | - && apt-get -y install --no-install-recommends apt-utils \ |
4 | | - && apt-get install -y \ |
5 | | - curl \ |
6 | | - xz-utils \ |
7 | | - unzip \ |
8 | | - wget |
9 | | -
|
10 | | -RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted |
11 | | -
|
12 | | -ARG GCC_VERSION=13.3.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 |
14 | | -RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \ |
15 | | - && curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \ |
16 | | - && xz -d /tmp/dc-downloads/gcc-arm.tar.xz \ |
17 | | - && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \ |
18 | | - && rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/ |
19 | | -
|
20 | | -ARG CMAKE_VERSION=3.31.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 | | -
|
29 | | -# This is TI XDC tools for linux. Check all versions here: https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/index.html |
30 | | -ARG 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 |
31 | | -RUN mkdir -p /tmp/dc-extracted/titools \ |
32 | | - && curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \ |
33 | | - && unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip |
34 | | -
|
35 | | -FROM python:3.11 AS devcontainer |
36 | | -
|
37 | | -# Avoid warnings by switching to noninteractive |
38 | | -ENV DEBIAN_FRONTEND=noninteractive |
39 | | -
|
40 | | -# You can set up non-root user |
41 | | -# ARG USERNAME=vscode |
42 | | -# ARG USER_UID=1000 |
43 | | -# ARG USER_GID=$USER_UID |
44 | | -
|
45 | | -# Configure apt and install packages |
46 | | -RUN apt-get update \ |
47 | | - && apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \ |
48 | | - && apt-get install -y \ |
49 | | - git \ |
50 | | - git-lfs \ |
51 | | - git-svn \ |
52 | | - subversion \ |
53 | | - clang-format \ |
54 | | - curl \ |
55 | | - ninja-build \ |
56 | | - srecord \ |
57 | | - nodejs \ |
58 | | - libffi-dev \ |
59 | | - libusb-1.0 |
60 | | -
|
61 | | -# Create needed directories |
62 | | -RUN mkdir -p /usr/local/bin/gcc \ |
63 | | - && mkdir -p /usr/local/bin/titools |
64 | | -
|
65 | | -# Clone ChibiOS repo |
66 | | -# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs |
67 | | -# Alternative source for those having issues with git svn downloads: |
68 | | -RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs |
69 | | -
|
70 | | -# Clone support repos for STM32 including Eclipse ThreadX (a.k.a. Azure RTOS) |
71 | | -RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \ |
72 | | - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \ |
73 | | - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \ |
74 | | - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \ |
75 | | - && git clone --branch chibios-21.11.x https://github.com/ChibiOS/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib |
76 | | -
|
77 | | -# Clone repos for Eclipse ThreadX (a.k.a. Azure RTOS) |
78 | | -RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx/threadx.git --depth 1 ./sources/AzureRTOS \ |
79 | | - && git clone --branch v6.3.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo |
80 | | -
|
81 | | -# Clone dependent repos (mbedtls, fatfs and littlefs) |
82 | | -RUN git clone --branch R0.15a https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \ |
83 | | - && git clone --branch v2.9.3 https://github.com/littlefs-project/littlefs --depth 1 ./sources/littlefs \ |
84 | | - && git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ |
85 | | - && cd ./sources/mbedtls \ |
86 | | - && git submodule update --init --recursive |
87 | | -
|
88 | | -# Clone FreeRTOS and what is needed for ESP32 |
89 | | -RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \ |
90 | | - && git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5 |
91 | | -
|
92 | | -# Clone lwIP for STM32 and NXP |
93 | | -RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip |
94 | | -
|
95 | | -# Clone ESP-IDF |
96 | | -RUN git clone --branch v5.4.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf |
97 | | -
|
98 | | -# Clone what is needed for TI |
99 | | -RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \ |
100 | | - # you can't use the nanoFramework repository as it's Windows only |
101 | | - # && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git --depth 1 ./sources/TI_XDCTools \ |
102 | | - && git clone --branch 5.40.00.40 https://github.com/nanoframework/SimpleLink_CC13xx_26xx_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ |
103 | | - && git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ |
104 | | - && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh |
105 | | -
|
106 | | -# set gcc location |
107 | | -ARG TMP_GCC_PATH=/usr/local/bin/gcc |
108 | | -ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin |
109 | | -
|
110 | | -# Copy from our other container |
111 | | -COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH |
112 | | -COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools |
113 | | -COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake |
114 | | -
|
115 | | -ENV PATH=/usr/bin/cmake/bin:${PATH} |
116 | | -
|
117 | | -# Putting hex2dfu in the container |
118 | | -ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu |
119 | | -
|
120 | | -ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu |
121 | | -RUN mkdir -p $HEX2DFU_PATH \ |
122 | | - && curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \ |
123 | | - && chmod +x $HEX2DFU_PATH/hex2dfu |
124 | | -
|
125 | | -# Creating static link python for pyhton3 |
126 | | -RUN ln -fs /usr/bin/python3 /usr/bin/python \ |
127 | | - && pip3 install pyserial |
128 | | -
|
129 | | -# Install ESP-IDF |
130 | | -ENV IDF_PATH=/sources/esp-idf |
131 | | -ENV ESP_PATCH_VER=esp-14.2.0_20241119 |
132 | | -# This is now taking care in the following line |
133 | | -# RUN python -m pip install -r $IDF_PATH/requirements.txt |
134 | | -RUN $IDF_PATH/install.sh |
135 | | -
|
136 | | -ENV PATH=/root/.espressif/python_env/idf5.4_py3.11_env/bin:$PATH:\ |
137 | | -$IDF_PATH/components/esptool_py/esptool:\ |
138 | | -$IDF_PATH/components/espcoredump:\ |
139 | | -$IDF_PATH/components/partition_table/:\ |
140 | | -$IDF_PATH/tools/:\ |
141 | | -$IDF_PATH/components/app_update:\ |
142 | | -/root/.espressif/tools/xtensa-esp-elf/$ESP_PATCH_VER/xtensa-esp-elf/bin:\ |
143 | | -/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin |
144 | | -
|
145 | | -# Clean up downloaded files |
146 | | -RUN apt-get autoremove -y \ |
147 | | - && apt-get clean -y \ |
148 | | - && rm -rf /var/lib/apt/lists/* |
149 | | -
|
150 | | -# Switch back to dialog for any ad-hoc use of apt-get |
151 | | -ENV DEBIAN_FRONTEND=dialog |
| 1 | +FROM ubuntu:latest AS downloader |
| 2 | +RUN apt-get update \ |
| 3 | + && apt-get -y install --no-install-recommends apt-utils \ |
| 4 | + && apt-get install -y \ |
| 5 | + curl \ |
| 6 | + xz-utils \ |
| 7 | + unzip \ |
| 8 | + wget |
| 9 | + |
| 10 | +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted |
| 11 | + |
| 12 | +ARG GCC_VERSION=13.3.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 |
| 14 | +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \ |
| 15 | + && curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \ |
| 16 | + && xz -d /tmp/dc-downloads/gcc-arm.tar.xz \ |
| 17 | + && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \ |
| 18 | + && rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/ |
| 19 | + |
| 20 | +ARG CMAKE_VERSION=3.31.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 | + |
| 29 | +# This is TI XDC tools for linux. Check all versions here: https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/index.html |
| 30 | +ARG 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 |
| 31 | +RUN mkdir -p /tmp/dc-extracted/titools \ |
| 32 | + && curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \ |
| 33 | + && unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip |
| 34 | + |
| 35 | +FROM python:3.11 AS devcontainer |
| 36 | + |
| 37 | +# Avoid warnings by switching to noninteractive |
| 38 | +ENV DEBIAN_FRONTEND=noninteractive |
| 39 | + |
| 40 | +# You can set up non-root user |
| 41 | +# ARG USERNAME=vscode |
| 42 | +# ARG USER_UID=1000 |
| 43 | +# ARG USER_GID=$USER_UID |
| 44 | + |
| 45 | +# Configure apt and install packages |
| 46 | +RUN apt-get update \ |
| 47 | + && apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \ |
| 48 | + && apt-get install -y \ |
| 49 | + git \ |
| 50 | + git-lfs \ |
| 51 | + git-svn \ |
| 52 | + subversion \ |
| 53 | + clang-format \ |
| 54 | + curl \ |
| 55 | + ninja-build \ |
| 56 | + srecord \ |
| 57 | + nodejs \ |
| 58 | + libffi-dev \ |
| 59 | + libusb-1.0 |
| 60 | + |
| 61 | +# Create needed directories |
| 62 | +RUN mkdir -p /usr/local/bin/gcc \ |
| 63 | + && mkdir -p /usr/local/bin/titools |
| 64 | + |
| 65 | +# Clone ChibiOS repo |
| 66 | +# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs |
| 67 | +# Alternative source for those having issues with git svn downloads: |
| 68 | +RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs |
| 69 | + |
| 70 | +# Clone support repos for STM32 including Eclipse ThreadX (a.k.a. Azure RTOS) |
| 71 | +RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \ |
| 72 | + && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \ |
| 73 | + && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \ |
| 74 | + && git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \ |
| 75 | + && git clone --branch chibios-21.11.x https://github.com/ChibiOS/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib |
| 76 | + |
| 77 | +# Clone repos for Eclipse ThreadX (a.k.a. Azure RTOS) |
| 78 | +RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx/threadx.git --depth 1 ./sources/AzureRTOS \ |
| 79 | + && git clone --branch v6.3.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo |
| 80 | + |
| 81 | +# Clone dependent repos (mbedtls, fatfs and littlefs) |
| 82 | +RUN git clone --branch R0.15a https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \ |
| 83 | + && git clone --branch v2.9.3 https://github.com/littlefs-project/littlefs --depth 1 ./sources/littlefs \ |
| 84 | + && git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ |
| 85 | + && cd ./sources/mbedtls \ |
| 86 | + && git submodule update --init --recursive |
| 87 | + |
| 88 | +# Clone FreeRTOS and what is needed for ESP32 |
| 89 | +RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \ |
| 90 | + && git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5 |
| 91 | + |
| 92 | +# Clone lwIP for STM32 and NXP |
| 93 | +RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip |
| 94 | + |
| 95 | +# Clone ESP-IDF |
| 96 | +RUN git clone --branch v5.4.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf |
| 97 | + |
| 98 | +# Clone what is needed for TI |
| 99 | +RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \ |
| 100 | + # you can't use the nanoFramework repository as it's Windows only |
| 101 | + # && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git --depth 1 ./sources/TI_XDCTools \ |
| 102 | + && git clone --branch 5.40.00.40 https://github.com/nanoframework/SimpleLink_CC13xx_26xx_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ |
| 103 | + && git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ |
| 104 | + && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh |
| 105 | + |
| 106 | +# set gcc location |
| 107 | +ARG TMP_GCC_PATH=/usr/local/bin/gcc |
| 108 | +ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin |
| 109 | + |
| 110 | +# Copy from our other container |
| 111 | +COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH |
| 112 | +COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools |
| 113 | +COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake |
| 114 | + |
| 115 | +ENV PATH=/usr/bin/cmake/bin:${PATH} |
| 116 | + |
| 117 | +# Putting hex2dfu in the container |
| 118 | +ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu |
| 119 | + |
| 120 | +ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu |
| 121 | +RUN mkdir -p $HEX2DFU_PATH \ |
| 122 | + && curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \ |
| 123 | + && chmod +x $HEX2DFU_PATH/hex2dfu |
| 124 | + |
| 125 | +# Creating static link python for pyhton3 |
| 126 | +RUN ln -fs /usr/bin/python3 /usr/bin/python \ |
| 127 | + && pip3 install pyserial |
| 128 | + |
| 129 | +# Install ESP-IDF |
| 130 | +ENV IDF_PATH=/sources/esp-idf |
| 131 | +ENV ESP_PATCH_VER=esp-14.2.0_20241119 |
| 132 | +# This is now taking care in the following line |
| 133 | +# RUN python -m pip install -r $IDF_PATH/requirements.txt |
| 134 | +RUN $IDF_PATH/install.sh |
| 135 | + |
| 136 | +ENV PATH=/root/.espressif/python_env/idf5.4_py3.11_env/bin:$PATH:\ |
| 137 | +$IDF_PATH/components/esptool_py/esptool:\ |
| 138 | +$IDF_PATH/components/espcoredump:\ |
| 139 | +$IDF_PATH/components/partition_table/:\ |
| 140 | +$IDF_PATH/tools/:\ |
| 141 | +$IDF_PATH/components/app_update:\ |
| 142 | +/root/.espressif/tools/xtensa-esp-elf/$ESP_PATCH_VER/xtensa-esp-elf/bin:\ |
| 143 | +/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin |
| 144 | + |
| 145 | +# Clean up downloaded files |
| 146 | +RUN apt-get autoremove -y \ |
| 147 | + && apt-get clean -y \ |
| 148 | + && rm -rf /var/lib/apt/lists/* |
| 149 | + |
| 150 | +# Switch back to dialog for any ad-hoc use of apt-get |
| 151 | +ENV DEBIAN_FRONTEND=dialog |
0 commit comments