forked from nanoframework/nf-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/nanoframework/nf-interpreter …
…into main-orgpal
- Loading branch information
Showing
1,389 changed files
with
108,976 additions
and
47,910 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM ghcr.io/nanoframework/dev-container-all:v2.53 |
274 changes: 150 additions & 124 deletions
274
.devcontainer/sources/Dockerfile.All → .devcontainer/All/Dockerfile.All.SRC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,124 +1,150 @@ | ||
FROM ghcr.io/linuxcontainers/debian-slim:latest AS downloader | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils \ | ||
&& apt-get install -y \ | ||
curl \ | ||
xz-utils \ | ||
unzip | ||
|
||
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz | ||
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc /tmp/dc-extracted/cmake \ | ||
&& curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \ | ||
&& xz -d /tmp/dc-downloads/gcc-arm.tar.xz \ | ||
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \ | ||
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/ | ||
|
||
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.23/cmake-3.23.0-linux-x86_64.sh | ||
RUN curl -o /tmp/dc-downloads/cmake.sh $CMAKE_SCRIPT \ | ||
&& chmod +x /tmp/dc-downloads/cmake.sh \ | ||
&& bash /tmp/dc-downloads/cmake.sh --skip-license --prefix=/tmp/dc-extracted/cmake | ||
|
||
# This is TI XDC tools for linux. Cheack all versions here: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/index.html | ||
ARG TI_TOOL_URL=http://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 | ||
RUN mkdir -p /tmp/dc-extracted/titools \ | ||
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \ | ||
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip | ||
|
||
FROM ghcr.io/linuxcontainers/debian-slim:latest AS devcontainer | ||
|
||
# Avoid warnings by switching to noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# You can set up non-root user | ||
# ARG USERNAME=vscode | ||
# ARG USER_UID=1000 | ||
# ARG USER_GID=$USER_UID | ||
|
||
# Configure apt and install packages | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \ | ||
&& apt-get install -y \ | ||
git \ | ||
git-lfs \ | ||
git-svn \ | ||
subversion \ | ||
curl \ | ||
ninja-build \ | ||
srecord \ | ||
python3 \ | ||
python3-pip \ | ||
nodejs \ | ||
libffi-dev | ||
|
||
# Create needed directories | ||
RUN mkdir -p /usr/local/bin/gcc \ | ||
&& mkdir -p /usr/local/bin/titools | ||
|
||
# Clone repos for STM32 including AzureRTOS | ||
RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \ | ||
&& git clone --branch v6.1.12_rel --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \ | ||
&& git clone --branch v6.1.12_rel --recursive https://github.com/azure-rtos/netxduo.git --depth 1 ./sources/NextDuo \ | ||
&& git svn clone https://svn.osdn.net/svnroot/chibios/branches/stable_21.11.x -rHEAD ./sources/ChibiOs \ | ||
&& git clone --branch nanoframework https://github.com/nanoframework/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib | ||
# Clone mbedtls and fatfs | ||
RUN git clone --branch mbedtls-2.28.1 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ | ||
&& git clone --branch R0.14b https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs | ||
# Clone FreeRTOS and what is needed for ESP32 | ||
RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \ | ||
&& git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs | ||
|
||
# The certificate of this one is not prolely propagated in the base image, ignoring the verification of this clone | ||
ENV GIT_SSL_NO_VERIFY=1 | ||
RUN git clone --branch STABLE-2_0_3_RELEASE https://git.savannah.nongnu.org/git/lwip.git --depth 1 ./sources/lwip | ||
ENV GIT_SSL_NO_VERIFY=0 | ||
|
||
# Clone ESP-IDF | ||
RUN git clone --branch v4.4.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf | ||
|
||
# Clone what is needed for TI | ||
RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \ | ||
# you can't use the nanoFramework repository as it's Windows only | ||
# && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git --depth 1 ./sources/TI_XDCTools \ | ||
&& git clone --branch 5.40.00.40 https://github.com/nanoframework/SimpleLink_CC13xx_26xx_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ | ||
&& git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ | ||
&& chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh | ||
|
||
# set gcc location | ||
ENV ARM_GCC_PATH=/usr/local/bin/gcc | ||
ENV PATH=$ARM_GCC_PATH/bin:${PATH} | ||
|
||
# Copy from our other container | ||
COPY --from=downloader /tmp/dc-extracted/gcc $ARM_GCC_PATH | ||
COPY --from=downloader /tmp/dc-extracted/cmake /usr | ||
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools | ||
# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh | ||
|
||
# Putting hex2dfu in the container | ||
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu | ||
|
||
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu | ||
RUN mkdir -p $HEX2DFU_PATH \ | ||
&& curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \ | ||
&& chmod +x $HEX2DFU_PATH/hex2dfu | ||
|
||
# Creating static link python for pyhton3 | ||
RUN ln -fs /usr/bin/python3 /usr/bin/python \ | ||
&& pip3 install pyserial | ||
|
||
# Install ESP-IDF | ||
ENV IDF_PATH=/sources/esp-idf | ||
RUN python -m pip install -r $IDF_PATH/requirements.txt | ||
RUN $IDF_PATH/install.sh | ||
ENV PATH=$PATH:$IDF_PATH/components/esptool_py/esptool:$IDF_PATH/components/espcoredump:$IDF_PATH/components/partition_table/:$IDF_PATH/tools/:$IDF_PATH/components/app_update:/root/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin:/root/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32s2-elf/bin:/root/.espressif/tools/riscv32-esp-elf/esp-2021r2-patch3-8.4.0/riscv32-esp-elf/bin | ||
|
||
# Clean up downloaded files | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Switch back to dialog for any ad-hoc use of apt-get | ||
ENV DEBIAN_FRONTEND=dialog | ||
FROM ubuntu:latest AS downloader | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils \ | ||
&& apt-get install -y \ | ||
curl \ | ||
xz-utils \ | ||
unzip \ | ||
wget | ||
|
||
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted | ||
|
||
ARG GCC_VERSION=13.3.rel1 | ||
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 | ||
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc \ | ||
&& curl -o /tmp/dc-downloads/gcc-arm.tar.xz $GCC_URI \ | ||
&& xz -d /tmp/dc-downloads/gcc-arm.tar.xz \ | ||
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 \ | ||
&& rm -rf /tmp/dc-extracted/gcc/share/doc/ /tmp/dc-extracted/gcc/share/gcc-arm-none-eabi/samples/ | ||
|
||
ARG CMAKE_VERSION=3.27.6 | ||
ARG CMAKE_SCRIPT=https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-x86_64.sh | ||
RUN wget $CMAKE_SCRIPT \ | ||
-q -O /tmp/dc-downloads/cmake-install.sh \ | ||
&& chmod u+x /tmp/dc-downloads/cmake-install.sh \ | ||
&& mkdir -p /tmp/dc-extracted/cmake \ | ||
&& /tmp/dc-downloads/cmake-install.sh --skip-license --prefix=/tmp/dc-extracted/cmake \ | ||
&& rm /tmp/dc-downloads/cmake-install.sh | ||
|
||
# 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 | ||
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 | ||
RUN mkdir -p /tmp/dc-extracted/titools \ | ||
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \ | ||
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip | ||
|
||
FROM python:3.11 AS devcontainer | ||
|
||
# Avoid warnings by switching to noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# You can set up non-root user | ||
# ARG USERNAME=vscode | ||
# ARG USER_UID=1000 | ||
# ARG USER_GID=$USER_UID | ||
|
||
# Configure apt and install packages | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \ | ||
&& apt-get install -y \ | ||
git \ | ||
git-lfs \ | ||
git-svn \ | ||
subversion \ | ||
clang-format \ | ||
curl \ | ||
ninja-build \ | ||
srecord \ | ||
nodejs \ | ||
libffi-dev | ||
|
||
# Create needed directories | ||
RUN mkdir -p /usr/local/bin/gcc \ | ||
&& mkdir -p /usr/local/bin/titools | ||
|
||
# Clone ChibiOS repo | ||
# RUN git svn clone http://svn.code.sf.net/p/chibios/code/branches/stable_21.11.x -rHEAD ./sources/ChibiOs | ||
# Alternative source for those having issues with git svn downloads: | ||
RUN git clone --branch stable_21.11.x https://github.com/ArduPilot/ChibiOS.svn.git --depth 1 ./sources/ChibiOs | ||
|
||
# Clone support repos for STM32 including AzureRTOS | ||
RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git --depth 1 ./sources/STM32CubeL4 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git --depth 1 ./sources/STM32CubeF7 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git --depth 1 ./sources/STM32CubeF4 \ | ||
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git --depth 1 ./sources/STM32CubeH7 \ | ||
&& git clone --branch chibios-21.11.x https://github.com/ChibiOS/ChibiOS-Contrib.git --depth 1 ./sources/ChibiOs-Contrib | ||
|
||
# Clone repos for AzureRTOS | ||
RUN git clone --branch v6.4.0_rel --recursive https://github.com/eclipse-threadx/threadx.git --depth 1 ./sources/AzureRTOS \ | ||
&& git clone --branch v6.3.0_rel --recursive https://github.com/eclipse-threadx/netxduo.git --depth 1 ./sources/NetxDuo | ||
|
||
# Clone dependent repos (mbedtls, fatfs and littlefs) | ||
RUN git clone --branch R0.15 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \ | ||
&& git clone --branch v2.9.3 https://github.com/littlefs-project/littlefs --depth 1 ./sources/littlefs \ | ||
&& git clone --branch mbedtls-3.6.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ | ||
&& cd ./sources/mbedtls \ | ||
&& git submodule update --init --recursive | ||
|
||
# Clone FreeRTOS and what is needed for ESP32 | ||
RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git --depth 1 ./sources/FreeRTOS \ | ||
&& git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git --depth 1 ./sources/CMSIS_5 | ||
|
||
# Clone lwIP for STM32 and NXP | ||
RUN git clone --branch STABLE-2_1_3_RELEASE https://github.com/lwip-tcpip/lwip.git --depth 1 ./sources/lwip | ||
|
||
# Clone ESP-IDF | ||
RUN git clone --branch v5.2.2 https://github.com/espressif/esp-idf --depth 1 --recursive ./sources/esp-idf | ||
|
||
# Clone what is needed for TI | ||
RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git --depth 1 ./sources/SimpleLinkCC32 \ | ||
# you can't use the nanoFramework repository as it's Windows only | ||
# && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git --depth 1 ./sources/TI_XDCTools \ | ||
&& git clone --branch 5.40.00.40 https://github.com/nanoframework/SimpleLink_CC13xx_26xx_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ | ||
&& git clone --branch 1.10.0 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ | ||
&& chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh | ||
|
||
# set gcc location | ||
ARG TMP_GCC_PATH=/usr/local/bin/gcc | ||
ENV ARM_GCC_PATH=$TMP_GCC_PATH/bin | ||
|
||
# Copy from our other container | ||
COPY --from=downloader /tmp/dc-extracted/gcc $TMP_GCC_PATH | ||
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_62_00_08_core /usr/local/bin/titools | ||
COPY --from=downloader /tmp/dc-extracted/cmake /usr/bin/cmake | ||
|
||
ENV PATH=/usr/bin/cmake/bin:${PATH} | ||
|
||
# Putting hex2dfu in the container | ||
ENV HEX2DFU_PATH=/usr/local/bin/hex2dfu | ||
|
||
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/latest/download/hex2dfu | ||
RUN mkdir -p $HEX2DFU_PATH \ | ||
&& curl -o $HEX2DFU_PATH/hex2dfu $HEX2DFU -L \ | ||
&& chmod +x $HEX2DFU_PATH/hex2dfu | ||
|
||
# Creating static link python for pyhton3 | ||
RUN ln -fs /usr/bin/python3 /usr/bin/python \ | ||
&& pip3 install pyserial | ||
|
||
# Install ESP-IDF | ||
ENV IDF_PATH=/sources/esp-idf | ||
ENV ESP_PATCH_VER=esp-13.2.0_20230928 | ||
# This is now taking care in the following line | ||
# RUN python -m pip install -r $IDF_PATH/requirements.txt | ||
RUN $IDF_PATH/install.sh | ||
|
||
ENV PATH=/root/.espressif/python_env/idf5.2_py3.11_env/bin:$PATH:\ | ||
$IDF_PATH/components/esptool_py/esptool:\ | ||
$IDF_PATH/components/espcoredump:\ | ||
$IDF_PATH/components/partition_table/:\ | ||
$IDF_PATH/tools/:\ | ||
$IDF_PATH/components/app_update:\ | ||
/root/.espressif/tools/xtensa-esp-elf/$ESP_PATCH_VER/xtensa-esp-elf/bin:\ | ||
/root/.espressif/tools/riscv32-esp-elf/$ESP_PATCH_VER/riscv32-esp-elf/bin | ||
|
||
# Clean up downloaded files | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Switch back to dialog for any ad-hoc use of apt-get | ||
ENV DEBIAN_FRONTEND=dialog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "nanoFramework-All", | ||
// If you prefer, you can use the source files and adjust them where they are located, | ||
// To do this, change the "dockerFile" to use 'Dockerfile.All.SRC'. | ||
// This will allow you to customize and build the container source and add anything you may need on top. | ||
"dockerFile": "Dockerfile.All", | ||
"context": ".", | ||
"mounts": [ | ||
// Bind the Unix socket the Docker daemon listens on by default | ||
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind", | ||
// Keep command history | ||
"source=nano-bashhistory,target=/home/vscode/commandhistory,type=volume", | ||
// OPTIONAL: Mount .azure folder for seamless az cli auth | ||
// "source=${env:HOME}${env:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind" | ||
], | ||
// Set the *default* container specific settings.json values on container create. | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"cmake.preferredGenerators": [ | ||
"Ninja" | ||
], | ||
"cmake.generator": "Ninja", | ||
"cmake.autoRestartBuild" : true, | ||
"cmake.configureSettings": { | ||
"CMAKE_MAKE_PROGRAM":"/usr/bin/ninja" | ||
}, | ||
"cmake.configureOnOpen": false | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-vsliveshare.vsliveshare-pack", | ||
"streetsidesoftware.code-spell-checker", | ||
"twxs.cmake", | ||
"ms-vscode.cmake-tools", | ||
"xaver.clang-format" | ||
] | ||
} | ||
} | ||
// You can pull all the repos with the latest changes, this is only valid if you are using the ./sources/Dockerfile.All containers | ||
// "postAttachCommand": "/usr/local/git-pull-repos.sh" | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "terraform --version", | ||
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root. | ||
// ,"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.31 |
Oops, something went wrong.