|
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.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 |
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.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 |
| - |
29 |
| -# 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 |
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 |
| - |
60 |
| -# Create needed directories |
61 |
| -RUN mkdir -p /usr/local/bin/gcc \ |
62 |
| - && mkdir -p /usr/local/bin/titools |
63 |
| - |
64 |
| -# Clone ChibiOS repo |
65 |
| -# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs |
66 |
| -# Alternative source for those having issues with git svn downloads: |
67 |
| -RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs |
68 |
| - |
69 |
| -# Clone support repos for STM32 including AzureRTOS |
70 |
| -RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \ |
71 |
| - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \ |
72 |
| - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \ |
73 |
| - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \ |
74 |
| - && git clone --branch chibios-21.11.x https://github.com/ChibiOS/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib |
75 |
| - |
76 |
| -# Clone repos for AzureRTOS |
77 |
| -RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx/threadx.git --depth 1 ./sources/AzureRTOS \ |
78 |
| - && git clone --branch v6.3.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo |
79 |
| - |
80 |
| -# Clone dependent repos (mbedtls, fatfs and littlefs) |
81 |
| -RUN git clone --branch mbedtls-3.5.2 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ |
82 |
| - && git clone --branch R0.15 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 |
| - |
85 |
| -# Clone FreeRTOS and what is needed for ESP32 |
86 |
| -RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \ |
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 |
91 |
| - |
92 |
| -# Clone ESP-IDF |
93 |
| -RUN git clone --branch v5.1.4 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf |
94 |
| - |
95 |
| -# Clone what is needed for TI |
96 |
| -RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \ |
97 |
| - # you can't use the nanoFramework repository as it's Windows only |
98 |
| - # && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git --depth 1 ./sources/TI_XDCTools \ |
99 |
| - && git clone --branch 5.40.00.40 https://github.com/nanoframework/SimpleLink_CC13xx_26xx_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ |
100 |
| - && git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ |
101 |
| - && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh |
102 |
| - |
103 |
| -# set gcc location |
104 |
| -ARG TMP_GCC_PATH=/usr/local/bin/gcc |
105 |
| -ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin |
106 |
| - |
107 |
| -# Copy from our other container |
108 |
| -COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH |
109 |
| -COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools |
110 |
| -COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake |
111 |
| - |
112 |
| -ENV PATH=/usr/bin/cmake/bin:${PATH} |
113 |
| - |
114 |
| -# Putting hex2dfu in the container |
115 |
| -ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu |
116 |
| - |
117 |
| -ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu |
118 |
| -RUN mkdir -p $HEX2DFU_PATH \ |
119 |
| - && curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \ |
120 |
| - && chmod +x $HEX2DFU_PATH/hex2dfu |
121 |
| - |
122 |
| -# Creating static link python for pyhton3 |
123 |
| -RUN ln -fs /usr/bin/python3 /usr/bin/python \ |
124 |
| - && pip3 install pyserial |
125 |
| - |
126 |
| -# Install ESP-IDF |
127 |
| -ENV IDF_PATH=/sources/esp-idf |
128 |
| -ENV ESP_PATCH_VER=esp-12.2.0_20230208 |
129 |
| -# This is now taking care in the following line |
130 |
| -# RUN python -m pip install -r $IDF_PATH/requirements.txt |
131 |
| -RUN $IDF_PATH/install.sh |
132 |
| - |
133 |
| -ENV PATH=/root/.espressif/python_env/idf5.1_py3.11_env/bin:$PATH:\ |
134 |
| -$IDF_PATH/components/esptool_py/esptool:\ |
135 |
| -$IDF_PATH/components/espcoredump:\ |
136 |
| -$IDF_PATH/components/partition_table/:\ |
137 |
| -$IDF_PATH/tools/:\ |
138 |
| -$IDF_PATH/components/app_update:\ |
139 |
| -/root/.espressif/tools/xtensa-esp32-elf/$ESP_PATCH_VER/xtensa-esp32-elf/bin:\ |
140 |
| -/root/.espressif/tools/xtensa-esp32s2-elf/$ESP_PATCH_VER/xtensa-esp32s2-elf/bin:\ |
141 |
| -/root/.espressif/tools/xtensa-esp32s3-elf/$ESP_PATCH_VER/xtensa-esp32s3-elf/bin:\ |
142 |
| -/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin |
143 |
| - |
144 |
| -# Clean up downloaded files |
145 |
| -RUN apt-get autoremove -y \ |
146 |
| - && apt-get clean -y \ |
147 |
| - && rm -rf /var/lib/apt/lists/* |
148 |
| - |
149 |
| -# Switch back to dialog for any ad-hoc use of apt-get |
150 |
| -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.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 |
| 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.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 | +
|
| 29 | +# 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 |
| 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 | +
|
| 60 | +# Create needed directories |
| 61 | +RUN mkdir -p /usr/local/bin/gcc \ |
| 62 | + && mkdir -p /usr/local/bin/titools |
| 63 | +
|
| 64 | +# Clone ChibiOS repo |
| 65 | +# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs |
| 66 | +# Alternative source for those having issues with git svn downloads: |
| 67 | +RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs |
| 68 | +
|
| 69 | +# Clone support repos for STM32 including AzureRTOS |
| 70 | +RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \ |
| 71 | + && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \ |
| 72 | + && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \ |
| 73 | + && git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \ |
| 74 | + && git clone --branch chibios-21.11.x https://github.com/ChibiOS/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib |
| 75 | +
|
| 76 | +# Clone repos for AzureRTOS |
| 77 | +RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx/threadx.git --depth 1 ./sources/AzureRTOS \ |
| 78 | + && git clone --branch v6.3.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo |
| 79 | +
|
| 80 | +# Clone dependent repos (mbedtls, fatfs and littlefs) |
| 81 | +RUN git clone --branch mbedtls-3.5.2 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ |
| 82 | + && git clone --branch R0.15 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 | +
|
| 85 | +# Clone FreeRTOS and what is needed for ESP32 |
| 86 | +RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \ |
| 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 |
| 91 | +
|
| 92 | +# Clone ESP-IDF |
| 93 | +RUN git clone --branch v5.2.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf |
| 94 | +
|
| 95 | +# Clone what is needed for TI |
| 96 | +RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \ |
| 97 | + # you can't use the nanoFramework repository as it's Windows only |
| 98 | + # && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git --depth 1 ./sources/TI_XDCTools \ |
| 99 | + && git clone --branch 5.40.00.40 https://github.com/nanoframework/SimpleLink_CC13xx_26xx_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ |
| 100 | + && git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ |
| 101 | + && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh |
| 102 | +
|
| 103 | +# set gcc location |
| 104 | +ARG TMP_GCC_PATH=/usr/local/bin/gcc |
| 105 | +ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin |
| 106 | +
|
| 107 | +# Copy from our other container |
| 108 | +COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH |
| 109 | +COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools |
| 110 | +COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake |
| 111 | +
|
| 112 | +ENV PATH=/usr/bin/cmake/bin:${PATH} |
| 113 | +
|
| 114 | +# Putting hex2dfu in the container |
| 115 | +ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu |
| 116 | +
|
| 117 | +ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu |
| 118 | +RUN mkdir -p $HEX2DFU_PATH \ |
| 119 | + && curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \ |
| 120 | + && chmod +x $HEX2DFU_PATH/hex2dfu |
| 121 | +
|
| 122 | +# Creating static link python for pyhton3 |
| 123 | +RUN ln -fs /usr/bin/python3 /usr/bin/python \ |
| 124 | + && pip3 install pyserial |
| 125 | +
|
| 126 | +# Install ESP-IDF |
| 127 | +ENV IDF_PATH=/sources/esp-idf |
| 128 | +ENV ESP_PATCH_VER=esp-13.2.0_20230928 |
| 129 | +# This is now taking care in the following line |
| 130 | +# RUN python -m pip install -r $IDF_PATH/requirements.txt |
| 131 | +RUN $IDF_PATH/install.sh |
| 132 | +
|
| 133 | +ENV PATH=/root/.espressif/python_env/idf5.1_py3.11_env/bin:$PATH:\ |
| 134 | +$IDF_PATH/components/esptool_py/esptool:\ |
| 135 | +$IDF_PATH/components/espcoredump:\ |
| 136 | +$IDF_PATH/components/partition_table/:\ |
| 137 | +$IDF_PATH/tools/:\ |
| 138 | +$IDF_PATH/components/app_update:\ |
| 139 | +/root/.espressif/tools/xtensa-esp32-elf/$ESP_PATCH_VER/xtensa-esp32-elf/bin:\ |
| 140 | +/root/.espressif/tools/xtensa-esp32s2-elf/$ESP_PATCH_VER/xtensa-esp32s2-elf/bin:\ |
| 141 | +/root/.espressif/tools/xtensa-esp32s3-elf/$ESP_PATCH_VER/xtensa-esp32s3-elf/bin:\ |
| 142 | +/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin |
| 143 | +
|
| 144 | +# Clean up downloaded files |
| 145 | +RUN apt-get autoremove -y \ |
| 146 | + && apt-get clean -y \ |
| 147 | + && rm -rf /var/lib/apt/lists/* |
| 148 | +
|
| 149 | +# Switch back to dialog for any ad-hoc use of apt-get |
| 150 | +ENV DEBIAN_FRONTEND=dialog |
0 commit comments