Skip to content

Commit 64fd5e3

Browse files
authored
Release v1.6.4 (#1905)
2 parents 35453be + 63efbb1 commit 64fd5e3

File tree

1,191 files changed

+30120
-22879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,191 files changed

+30120
-22879
lines changed

.devcontainer/Dockerfile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM debian:10.4-slim 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+
bzip2 \
7+
unzip
8+
9+
ARG GCC_URI=https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
10+
RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc /tmp/dc-extracted/cmake \
11+
&& curl -o /tmp/dc-downloads/gcc-arm.tar.bz2 $GCC_URI \
12+
&& bunzip2 -d /tmp/dc-downloads/gcc-arm.tar.bz2 \
13+
&& tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1
14+
15+
ARG CMAKE_SCRIPT=https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.sh
16+
RUN curl -o /tmp/dc-downloads/cmake.sh $CMAKE_SCRIPT \
17+
&& chmod +x /tmp/dc-downloads/cmake.sh \
18+
&& bash /tmp/dc-downloads/cmake.sh --skip-license --prefix=/tmp/dc-extracted/cmake
19+
20+
ARG IDF_URI=https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v3.3.1.zip
21+
RUN curl -o /tmp/dc-downloads/esp-idf.zip $IDF_URI \
22+
&& unzip -d /tmp/dc-extracted/esp-idf /tmp/dc-downloads/esp-idf.zip
23+
24+
ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.1/IDF_libs-v3.3.1.zip
25+
RUN curl -o /tmp/dc-downloads/esp-idf-libs.zip $IDF_LIBS_URI -L \
26+
&& unzip -d /tmp/dc-extracted/esp-idf-libs /tmp/dc-downloads/esp-idf-libs.zip
27+
28+
ARG XTENSA_URI=https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
29+
RUN mkdir -p /tmp/dc-extracted/xtensa \
30+
&& curl -o /tmp/dc-downloads/xtensa.tar.gz $XTENSA_URI \
31+
&& tar -xzf /tmp/dc-downloads/xtensa.tar.gz -C /tmp/dc-extracted/xtensa --strip-components 1
32+
33+
ARG TI_TOOL_URL=http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_61_00_16/exports/xdccore/xdctools_3_61_00_16_core_linux.zip
34+
RUN mkdir -p /tmp/dc-extracted/titools \
35+
&& curl -o /tmp/dc-downloads/titools.zip $TI_TOOL_URL -L \
36+
&& unzip -d /tmp/dc-extracted/titools /tmp/dc-downloads/titools.zip
37+
38+
FROM debian:10.4-slim AS devcontainer
39+
40+
# Avoid warnings by switching to noninteractive
41+
ENV DEBIAN_FRONTEND=noninteractive
42+
43+
# You can set up non-root user
44+
# ARG USERNAME=vscode
45+
# ARG USER_UID=1000
46+
# ARG USER_GID=$USER_UID
47+
48+
# Configure apt and install packages
49+
RUN apt-get update \
50+
&& apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 \
51+
&& apt-get install -y \
52+
git \
53+
curl \
54+
ninja-build \
55+
srecord \
56+
python3 \
57+
python3-pip \
58+
nodejs
59+
60+
# Create needed directories
61+
RUN mkdir -p /usr/local/bin/gcc \
62+
&& mkdir -p /usr/local/bin/xtensa \
63+
&& mkdir -p /usr/local/bin/titools
64+
65+
# Clone repos for STM32 including AzureRTOS
66+
RUN git clone --branch nf-build https://github.com/nanoframework/STM32CubeL4.git ./sources/STM32CubeL4 \
67+
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git ./sources/STM32CubeF7 \
68+
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git ./sources/STM32CubeF4 \
69+
&& git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git ./sources/STM32CubeH7 \
70+
&& git clone --recursive https://github.com/azure-rtos/threadx.git ./sources/AzureRTOS \
71+
&& git clone --branch stable_20.3.x https://github.com/nanoframework/chibios.git ./sources/ChibiOs \
72+
&& git clone --branch nanoframework https://github.com/nanoframework/ChibiOS-Contrib.git ./sources/ChibiOs-Contrib
73+
# Clone mbedtls and fatfs
74+
RUN git clone --branch mbedtls-2.23.0 https://github.com/nanoframework/mbedtls.git ./sources/mbedtls \
75+
&& git clone --branch R0.14 https://github.com/abbrev/fatfs.git ./sources/fatfs
76+
# Clone FreeRTOS and what is needed for ESP32
77+
RUN git clone --branch V10.4.1-kernel-only https://github.com/FreeRTOS/FreeRTOS-Kernel.git ./sources/FreeRTOS \
78+
&& git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git ./sources/CMSIS_5 \
79+
&& git clone --branch STABLE-2_0_3_RELEASE https://git.savannah.nongnu.org/git/lwip.git ./sources/lwip \
80+
&& git clone --branch nf-build https://github.com/nanoframework/spiffs.git ./sources/spiffs
81+
# Clone what is needed for TI
82+
RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git ./sources/SimpleLinkCC32 \
83+
# && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git ./sources/TI_XDCTools \
84+
&& git clone --branch 4.20.01.04 https://github.com/nanoframework/SimpleLink_CC13x2_26x2_SDK.git ./sources/SimpleLinkCC13 \
85+
&& git clone --branch 1.5.0 https://github.com/nanoframework/TI_SysConfig.git ./sources/TI_SysConfig \
86+
&& chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh
87+
88+
# Copy from our other container
89+
COPY --from=downloader /tmp/dc-extracted/gcc /usr/local/bin/gcc
90+
COPY --from=downloader /tmp/dc-extracted/cmake /usr
91+
COPY --from=downloader /tmp/dc-extracted/esp-idf /sources/esp-idf
92+
COPY --from=downloader /tmp/dc-extracted/esp-idf-libs /sources/esp-idf-libs
93+
COPY --from=downloader /tmp/dc-extracted/xtensa /usr/local/bin/xtensa
94+
COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_61_00_16_core /usr/local/bin/titools
95+
COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh
96+
97+
# Putting hex2dfu in the container
98+
ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu
99+
RUN mkdir -p /usr/local/bin/hex2dfu \
100+
&& curl -o /usr/local/bin/hex2dfu/hex2dfu $HEX2DFU -L \
101+
&& chmod +x /usr/local/bin/hex2dfu/hex2dfu
102+
103+
# Creating static link python for pyhton3
104+
RUN ln -fs /usr/bin/python3 /usr/bin/python \
105+
&& pip3 install pyserial
106+
107+
# Clean up downloaded files
108+
RUN apt-get autoremove -y \
109+
&& apt-get clean -y \
110+
&& rm -rf /var/lib/apt/lists/*
111+
112+
# Switch back to dialog for any ad-hoc use of apt-get
113+
ENV DEBIAN_FRONTEND=dialog

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "nanoFramework",
3+
"dockerFile": "Dockerfile",
4+
"context": ".",
5+
"mounts": [
6+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
7+
// Mount .azure folder for seamless az cli auth
8+
"source=${env:HOME}${env:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind",
9+
// Keep command history
10+
"source=nano-bashhistory,target=/home/vscode/commandhistory,type=volume",
11+
],
12+
// Set *default* container specific settings.json values on container create.
13+
"settings": {
14+
"cmake.preferredGenerators": [
15+
"Ninja"
16+
],
17+
"cmake.generator": "Ninja",
18+
"cmake.autoRestartBuild" : true,
19+
"cmake.configureSettings": {
20+
"CMAKE_MAKE_PROGRAM":"/usr/bin/ninja"
21+
},
22+
"cmake.cmakePath": "/usr/bin/cmake",
23+
"cmake.configureOnOpen": false
24+
},
25+
// Add the IDs of extensions you want installed when the container is created.
26+
"extensions": [
27+
"ms-vsliveshare.vsliveshare-pack",
28+
"streetsidesoftware.code-spell-checker",
29+
"twxs.cmake",
30+
"ms-vscode.cmake-tools"
31+
],
32+
// Make sure we pull all the repos with the latest changes
33+
"postAttachCommand": "/usr/local/git-pull-repos.sh"
34+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
35+
// "forwardPorts": [],
36+
// Use 'postCreateCommand' to run commands after the container is created.
37+
// "postCreateCommand": "terraform --version",
38+
// Uncomment to connect as a non-root user. See https: //aka.ms/vscode-remote/containers/non-root.
39+
// ,"remoteUser": "vscode"
40+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
echo "Pulling all the repos"
2+
cd /sources/STM32CubeL4
3+
git pull origin nf-build
4+
cd /sources/STM32CubeF7
5+
git pull origin nf-build
6+
cd /sources/STM32CubeF4
7+
git pull origin nf-build
8+
cd /sources/STM32CubeH7
9+
git pull origin nf-build
10+
cd /sources/AzureRTOS
11+
git pull
12+
cd /sources/ChibiOs
13+
git pull origin stable_20.3.x
14+
cd /sources/ChibiOs-Contrib
15+
git pull origin nanoframework
16+
cd /sources/mbedtls
17+
git pull origin mbedtls-2.23.0
18+
cd /sources/fatfs
19+
git pull origin R0.14
20+
cd /sources/FreeRTOS
21+
git pull origin V10.4.1-kernel-only
22+
cd /sources/CMSIS_5
23+
git pull origin 5.5.1
24+
cd /sources/lwip
25+
git pull origin STABLE-2_0_3_RELEASE
26+
cd /sources/spiffs
27+
git pull origin nf-build
28+
cd /sources/SimpleLinkCC32
29+
git pull origin 4.10.00.07
30+
cd /sources/SimpleLinkCC13
31+
git pull origin 4.20.01.04
32+
cd /sources/TI_SysConfig
33+
git pull origin 1.5.0
34+
echo "All repos pulled and up to date"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# usage: non-root-user.sh [username] [user UID] [user GID]
2+
3+
USERNAME=${1:-"automatic"}
4+
USER_UID=${2:-"automatic"}
5+
USER_GID=${3:-"automatic"}
6+
7+
set -e
8+
9+
if [ "$(id -u)" -ne 0 ]; then
10+
echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
11+
exit 1
12+
fi
13+
14+
15+
# If in automatic mode, determine if a user already exists, if not use vscode
16+
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
17+
USERNAME=""
18+
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
19+
for CURRENT_USER in ${POSSIBLE_USERS[@]}; do
20+
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
21+
USERNAME=${CURRENT_USER}
22+
break
23+
fi
24+
done
25+
if [ "${USERNAME}" = "" ]; then
26+
USERNAME=vscode
27+
fi
28+
elif [ "${USERNAME}" = "none" ]; then
29+
USERNAME=root
30+
USER_UID=0
31+
USER_GID=0
32+
fi
33+
34+
35+
36+
37+
# Create or update a non-root user to match UID/GID.
38+
if id -u ${USERNAME} > /dev/null 2>&1; then
39+
# User exists, update if needed
40+
if [ "${USER_GID}" != "automatic" ] && [ "$USER_GID" != "$(id -G $USERNAME)" ]; then
41+
groupmod --gid $USER_GID $USERNAME
42+
usermod --gid $USER_GID $USERNAME
43+
fi
44+
if [ "${USER_UID}" != "automatic" ] && [ "$USER_UID" != "$(id -u $USERNAME)" ]; then
45+
usermod --uid $USER_UID $USERNAME
46+
fi
47+
else
48+
# Create user
49+
if [ "${USER_GID}" = "automatic" ]; then
50+
groupadd $USERNAME
51+
else
52+
groupadd --gid $USER_GID $USERNAME
53+
fi
54+
if [ "${USER_UID}" = "automatic" ]; then
55+
useradd -s /bin/bash --gid $USERNAME -m $USERNAME
56+
else
57+
useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME
58+
fi
59+
fi
60+
61+
# Add add sudo support for non-root user
62+
if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" ]; then
63+
mkdir -p /etc/sudoers.d
64+
echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
65+
chmod 0440 /etc/sudoers.d/$USERNAME
66+
EXISTING_NON_ROOT_USER="${USERNAME}"
67+
fi

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CMake/Modules/FindINTEROP*.cmake
4848

4949
# Visual Studio cache/options directory contents but not the example launch.vs.json
5050
!.vs/
51-
.vs/*
51+
**/.vs/*
5252
!.vs/launch.vs.SAMPLE.json
5353
!.vs/tasks.vs.SAMPLE.json
5454
**/ipch/*
@@ -62,3 +62,4 @@ CMake/Modules/FindINTEROP*.cmake
6262
**/packages/*
6363
# except build/, which is used as an MSBuild target.
6464
!**/packages/build/
65+
/targets/os/win32/.vs/nanoCLR/v16

0 commit comments

Comments
 (0)