diff --git a/.devcontainer/Dockerfile.All b/.devcontainer/Dockerfile.All new file mode 100644 index 0000000000..d50a26c208 --- /dev/null +++ b/.devcontainer/Dockerfile.All @@ -0,0 +1 @@ +FROM ghcr.io/nanoframework/dev-container-all:v1.3 \ No newline at end of file diff --git a/.devcontainer/Dockerfile.AzureRTOS b/.devcontainer/Dockerfile.AzureRTOS new file mode 100644 index 0000000000..5be3b4092c --- /dev/null +++ b/.devcontainer/Dockerfile.AzureRTOS @@ -0,0 +1 @@ +FROM ghcr.io/nanoframework/dev-container-azure-rtos:v1.0 \ No newline at end of file diff --git a/.devcontainer/Dockerfile.ChibiOS b/.devcontainer/Dockerfile.ChibiOS new file mode 100644 index 0000000000..78eef30d31 --- /dev/null +++ b/.devcontainer/Dockerfile.ChibiOS @@ -0,0 +1 @@ +FROM ghcr.io/nanoframework/dev-container-chibios:v1.1 \ No newline at end of file diff --git a/.devcontainer/Dockerfile.ESP32 b/.devcontainer/Dockerfile.ESP32 new file mode 100644 index 0000000000..33e589ef00 --- /dev/null +++ b/.devcontainer/Dockerfile.ESP32 @@ -0,0 +1 @@ +FROM ghcr.io/nanoframework/dev-container-esp32:v1.2 \ No newline at end of file diff --git a/.devcontainer/Dockerfile.TI b/.devcontainer/Dockerfile.TI new file mode 100644 index 0000000000..f43716746e --- /dev/null +++ b/.devcontainer/Dockerfile.TI @@ -0,0 +1 @@ +FROM ghcr.io/nanoframework/dev-container-ti:v1.0 \ No newline at end of file diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000000..ad2eca8059 Binary files /dev/null and b/.devcontainer/README.md differ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2cbc716aa8..cb13514976 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,13 @@ { "name": "nanoFramework", - "dockerFile": "Dockerfile", + // Adjust this file to chose the platform you want using the prebuild containers + // - Dockerfile.All = you can build anything but it's a very large container + // - Dockerfile.AzureRTOS = for AzureRTOS targets + // - Dockerfile.ChibiOS = for ChibiOS based targets (ex: STM32, Netduino, Orgpal) + // - Dockerfile.ESP32 = for ESP32 targets + // - Dockerfile.TI = for TI targets + // If you prefer, you can use the source files and adjust them they are located, with the same names in ./sources. This will alow you to customize them and add anything you may need on top. + "dockerFile": "Dockerfile.ChibiOS", "context": ".", "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind", @@ -29,8 +36,8 @@ "twxs.cmake", "ms-vscode.cmake-tools" ], - // Make sure we pull all the repos with the latest changes - "postAttachCommand": "/usr/local/git-pull-repos.sh" + // 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. diff --git a/.devcontainer/scripts/git-pull-repos.sh b/.devcontainer/scripts/git-pull-repos.sh index 1a4ea1cbd1..b752449480 100644 --- a/.devcontainer/scripts/git-pull-repos.sh +++ b/.devcontainer/scripts/git-pull-repos.sh @@ -9,12 +9,13 @@ cd /sources/STM32CubeH7 git pull origin nf-build cd /sources/AzureRTOS git pull -cd /sources/ChibiOs -git pull origin stable_20.3.x +cd / +rm -rf /sources/ChibiOs +git svn clone https://svn.osdn.net/svnroot/chibios/branches/stable_21.6.x -rHEAD /sources/ChibiOs cd /sources/ChibiOs-Contrib git pull origin nanoframework cd /sources/mbedtls -git pull origin mbedtls-2.23.0 +git pull origin mbedtls-2.26.0 cd /sources/fatfs git pull origin R0.14 cd /sources/FreeRTOS diff --git a/.devcontainer/scripts/non-toot-user.sh b/.devcontainer/scripts/non-root-user.sh similarity index 100% rename from .devcontainer/scripts/non-toot-user.sh rename to .devcontainer/scripts/non-root-user.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/sources/Dockerfile.All similarity index 63% rename from .devcontainer/Dockerfile rename to .devcontainer/sources/Dockerfile.All index b3cce31bb4..ecbb785ba4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/sources/Dockerfile.All @@ -17,20 +17,29 @@ 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 -ARG IDF_URI=https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v3.3.1.zip +ARG IDF_URI=https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v3.3.5.zip RUN curl -o /tmp/dc-downloads/esp-idf.zip $IDF_URI \ && unzip -d /tmp/dc-extracted/esp-idf /tmp/dc-downloads/esp-idf.zip -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 +ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5/IDF_libs-v3.3.5.zip RUN curl -o /tmp/dc-downloads/esp-idf-libs.zip $IDF_LIBS_URI -L \ && unzip -d /tmp/dc-extracted/esp-idf-libs /tmp/dc-downloads/esp-idf-libs.zip -ARG XTENSA_URI=https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz +ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5_BLE/IDF_libs-v3.3.5_BLE.zip +RUN curl -o /tmp/dc-downloads/esp-idf-libs-ble.zip $IDF_LIBS_URI -L \ + && unzip -d /tmp/dc-extracted/esp-idf-libs_BLE /tmp/dc-downloads/esp-idf-libs-ble.zip + +ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5_V3/IDF_libs-v3.3.5_V3.zip +RUN curl -o /tmp/dc-downloads/esp-idf-libs-v3.zip $IDF_LIBS_URI -L \ + && unzip -d /tmp/dc-extracted/esp-idf-libs_V3 /tmp/dc-downloads/esp-idf-libs-v3.zip + +ARG XTENSA_URI=https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-97-gc752ad5-5.2.0.tar.gz RUN mkdir -p /tmp/dc-extracted/xtensa \ && curl -o /tmp/dc-downloads/xtensa.tar.gz $XTENSA_URI \ && tar -xzf /tmp/dc-downloads/xtensa.tar.gz -C /tmp/dc-extracted/xtensa --strip-components 1 -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 +# 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 @@ -50,6 +59,8 @@ 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 \ curl \ ninja-build \ srecord \ @@ -63,36 +74,39 @@ 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 ./sources/STM32CubeL4 \ - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF7.git ./sources/STM32CubeF7 \ - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeF4.git ./sources/STM32CubeF4 \ - && git clone --branch nf-build https://github.com/nanoframework/STM32CubeH7.git ./sources/STM32CubeH7 \ - && git clone --recursive https://github.com/azure-rtos/threadx.git ./sources/AzureRTOS \ - && git clone --branch stable_20.3.x https://github.com/nanoframework/chibios.git ./sources/ChibiOs \ - && git clone --branch nanoframework https://github.com/nanoframework/ChibiOS-Contrib.git ./sources/ChibiOs-Contrib +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 --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS \ + && git svn clone https://svn.osdn.net/svnroot/chibios/branches/stable_21.6.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.23.0 https://github.com/nanoframework/mbedtls.git ./sources/mbedtls \ - && git clone --branch R0.14 https://github.com/abbrev/fatfs.git ./sources/fatfs +RUN git clone --branch mbedtls-2.26.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ + && git clone --branch R0.14 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 ./sources/FreeRTOS \ - && git clone --branch 5.5.1 https://github.com/ARM-software/CMSIS_5.git ./sources/CMSIS_5 \ - && git clone --branch STABLE-2_0_3_RELEASE https://git.savannah.nongnu.org/git/lwip.git ./sources/lwip \ - && git clone --branch nf-build https://github.com/nanoframework/spiffs.git ./sources/spiffs +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 STABLE-2_0_3_RELEASE https://git.savannah.nongnu.org/git/lwip.git --depth 1 ./sources/lwip \ + && git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs # Clone what is needed for TI -RUN git clone --branch 4.10.00.07 https://github.com/nanoframework/SimpleLink_CC32xx_SDK.git ./sources/SimpleLinkCC32 \ - # && git clone --branch 3.61.00.16 https://github.com/nanoframework/TI_XDCTools.git ./sources/TI_XDCTools \ - && git clone --branch 4.20.01.04 https://github.com/nanoframework/SimpleLink_CC13x2_26x2_SDK.git ./sources/SimpleLinkCC13 \ - && git clone --branch 1.5.0 https://github.com/nanoframework/TI_SysConfig.git ./sources/TI_SysConfig \ +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.10.00.48 https://github.com/nanoframework/SimpleLink_CC13x2_26x2_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ + && git clone --branch 1.8.1 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh # Copy from our other container COPY --from=downloader /tmp/dc-extracted/gcc /usr/local/bin/gcc COPY --from=downloader /tmp/dc-extracted/cmake /usr COPY --from=downloader /tmp/dc-extracted/esp-idf /sources/esp-idf +COPY --from=downloader /tmp/dc-extracted/esp-idf-libs_BLE /sources/esp-idf-libs_BLE +COPY --from=downloader /tmp/dc-extracted/esp-idf-libs_V3 /sources/esp-idf-libs_V3 COPY --from=downloader /tmp/dc-extracted/esp-idf-libs /sources/esp-idf-libs COPY --from=downloader /tmp/dc-extracted/xtensa /usr/local/bin/xtensa -COPY --from=downloader /tmp/dc-extracted/titools/xdctools_3_61_00_16_core /usr/local/bin/titools -COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh +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 ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu diff --git a/.devcontainer/sources/Dockerfile.AzureRTOS b/.devcontainer/sources/Dockerfile.AzureRTOS new file mode 100644 index 0000000000..7c64831855 --- /dev/null +++ b/.devcontainer/sources/Dockerfile.AzureRTOS @@ -0,0 +1,71 @@ +FROM debian:10.4-slim AS downloader +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils \ + && apt-get install -y \ + curl \ + bzip2 \ + unzip + +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 +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc /tmp/dc-extracted/cmake \ + && curl -o /tmp/dc-downloads/gcc-arm.tar.bz2 $GCC_URI \ + && bunzip2 -d /tmp/dc-downloads/gcc-arm.tar.bz2 \ + && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 + +ARG CMAKE_SCRIPT=https://cmake.org/files/v3.19/cmake-3.19.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 + +FROM debian:10.4-slim 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 \ + curl \ + ninja-build \ + srecord + +# Create needed directories +RUN mkdir -p /usr/local/bin/gcc \ + && mkdir -p /usr/local/bin/xtensa + +# 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 --recursive https://github.com/azure-rtos/threadx.git --depth 1 ./sources/AzureRTOS +# Clone mbedtls and fatfs +RUN git clone --branch mbedtls-2.26.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ + && git clone --branch R0.14 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \ + && git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs + +# Copy from our other container +COPY --from=downloader /tmp/dc-extracted/gcc /usr/local/bin/gcc +COPY --from=downloader /tmp/dc-extracted/cmake /usr +# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh + +# Putting hex2dfu in the container +ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu +RUN mkdir -p /usr/local/bin/hex2dfu \ + && curl -o /usr/local/bin/hex2dfu/hex2dfu $HEX2DFU -L \ + && chmod +x /usr/local/bin/hex2dfu/hex2dfu + +# 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 diff --git a/.devcontainer/sources/Dockerfile.ChibiOS b/.devcontainer/sources/Dockerfile.ChibiOS new file mode 100644 index 0000000000..18c6c5a124 --- /dev/null +++ b/.devcontainer/sources/Dockerfile.ChibiOS @@ -0,0 +1,74 @@ +FROM debian:10.4-slim AS downloader +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils \ + && apt-get install -y \ + curl \ + bzip2 \ + unzip + +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 +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc /tmp/dc-extracted/cmake \ + && curl -o /tmp/dc-downloads/gcc-arm.tar.bz2 $GCC_URI \ + && bunzip2 -d /tmp/dc-downloads/gcc-arm.tar.bz2 \ + && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 + +ARG CMAKE_SCRIPT=https://cmake.org/files/v3.19/cmake-3.19.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 + +FROM debian:10.4-slim 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-svn \ + curl \ + ninja-build \ + srecord + +# Create needed directories +RUN mkdir -p /usr/local/bin/gcc \ + && mkdir -p /usr/local/bin/xtensa \ + && 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 svn clone https://svn.osdn.net/svnroot/chibios/branches/stable_21.6.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.26.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ + && git clone --branch R0.14 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs \ + && git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs + +# Copy from our other container +COPY --from=downloader /tmp/dc-extracted/gcc /usr/local/bin/gcc +COPY --from=downloader /tmp/dc-extracted/cmake /usr +# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh + +# Putting hex2dfu in the container +ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu +RUN mkdir -p /usr/local/bin/hex2dfu \ + && curl -o /usr/local/bin/hex2dfu/hex2dfu $HEX2DFU -L \ + && chmod +x /usr/local/bin/hex2dfu/hex2dfu + +# 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 diff --git a/.devcontainer/sources/Dockerfile.ESP32 b/.devcontainer/sources/Dockerfile.ESP32 new file mode 100644 index 0000000000..71f2f0eb21 --- /dev/null +++ b/.devcontainer/sources/Dockerfile.ESP32 @@ -0,0 +1,104 @@ +FROM debian:10.4-slim AS downloader +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils \ + && apt-get install -y \ + curl \ + bzip2 \ + unzip + +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 +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc /tmp/dc-extracted/cmake \ + && curl -o /tmp/dc-downloads/gcc-arm.tar.bz2 $GCC_URI \ + && bunzip2 -d /tmp/dc-downloads/gcc-arm.tar.bz2 \ + && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 + +ARG CMAKE_SCRIPT=https://cmake.org/files/v3.19/cmake-3.19.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 + +ARG IDF_URI=https://dl.espressif.com/dl/esp-idf/releases/esp-idf-v3.3.5.zip +RUN curl -o /tmp/dc-downloads/esp-idf.zip $IDF_URI \ + && unzip -d /tmp/dc-extracted/esp-idf /tmp/dc-downloads/esp-idf.zip + +ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5/IDF_libs-v3.3.5.zip +RUN curl -o /tmp/dc-downloads/esp-idf-libs.zip $IDF_LIBS_URI -L \ + && unzip -d /tmp/dc-extracted/esp-idf-libs /tmp/dc-downloads/esp-idf-libs.zip + +ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5_BLE/IDF_libs-v3.3.5_BLE.zip +RUN curl -o /tmp/dc-downloads/esp-idf-libs-ble.zip $IDF_LIBS_URI -L \ + && unzip -d /tmp/dc-extracted/esp-idf-libs_BLE /tmp/dc-downloads/esp-idf-libs-ble.zip + +ARG IDF_LIBS_URI=https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5_V3/IDF_libs-v3.3.5_V3.zip +RUN curl -o /tmp/dc-downloads/esp-idf-libs-v3.zip $IDF_LIBS_URI -L \ + && unzip -d /tmp/dc-extracted/esp-idf-libs_V3 /tmp/dc-downloads/esp-idf-libs-v3.zip + +ARG XTENSA_URI=https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-97-gc752ad5-5.2.0.tar.gz +RUN mkdir -p /tmp/dc-extracted/xtensa \ + && curl -o /tmp/dc-downloads/xtensa.tar.gz $XTENSA_URI \ + && tar -xzf /tmp/dc-downloads/xtensa.tar.gz -C /tmp/dc-extracted/xtensa --strip-components 1 + +FROM debian:10.4-slim 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 \ + curl \ + ninja-build \ + srecord \ + python3 \ + python3-pip \ + nodejs + +# Create needed directories +RUN mkdir -p /usr/local/bin/gcc \ + && mkdir -p /usr/local/bin/xtensa \ + && mkdir -p /usr/local/bin/titools + +# Clone mbedtls and fatfs +RUN git clone --branch mbedtls-2.26.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ + && git clone --branch R0.14 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 STABLE-2_0_3_RELEASE https://git.savannah.nongnu.org/git/lwip.git --depth 1 ./sources/lwip \ + && git clone --branch nf-build https://github.com/nanoframework/spiffs.git --depth 1 ./sources/spiffs + +# Copy from our other container +COPY --from=downloader /tmp/dc-extracted/gcc /usr/local/bin/gcc +COPY --from=downloader /tmp/dc-extracted/cmake /usr +COPY --from=downloader /tmp/dc-extracted/esp-idf /sources/esp-idf +COPY --from=downloader /tmp/dc-extracted/esp-idf-libs_BLE /sources/esp-idf-libs_BLE +COPY --from=downloader /tmp/dc-extracted/esp-idf-libs_V3 /sources/esp-idf-libs_V3 +COPY --from=downloader /tmp/dc-extracted/esp-idf-libs /sources/esp-idf-libs +COPY --from=downloader /tmp/dc-extracted/xtensa /usr/local/bin/xtensa +# COPY ./scripts/git-pull-repos.sh /usr/local/git-pull-repos.sh + +# Putting hex2dfu in the container +ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu +RUN mkdir -p /usr/local/bin/hex2dfu \ + && curl -o /usr/local/bin/hex2dfu/hex2dfu $HEX2DFU -L \ + && chmod +x /usr/local/bin/hex2dfu/hex2dfu + +# Creating static link python for pyhton3 +RUN ln -fs /usr/bin/python3 /usr/bin/python \ + && pip3 install pyserial + +# 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 diff --git a/.devcontainer/sources/Dockerfile.TI b/.devcontainer/sources/Dockerfile.TI new file mode 100644 index 0000000000..b4a6941704 --- /dev/null +++ b/.devcontainer/sources/Dockerfile.TI @@ -0,0 +1,79 @@ +FROM debian:10.4-slim AS downloader +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils \ + && apt-get install -y \ + curl \ + bzip2 \ + unzip + +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 +RUN mkdir -p /tmp/dc-downloads /tmp/dc-extracted/gcc /tmp/dc-extracted/cmake \ + && curl -o /tmp/dc-downloads/gcc-arm.tar.bz2 $GCC_URI \ + && bunzip2 -d /tmp/dc-downloads/gcc-arm.tar.bz2 \ + && tar -xvf /tmp/dc-downloads/gcc-arm.tar -C /tmp/dc-extracted/gcc --strip-components 1 + +ARG CMAKE_SCRIPT=https://cmake.org/files/v3.19/cmake-3.19.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 debian:10.4-slim 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 \ + curl \ + ninja-build \ + srecord \ + nodejs + +# Create needed directories +RUN mkdir -p /usr/local/bin/gcc \ + && mkdir -p /usr/local/bin/titools + +# Clone mbedtls and fatfs +RUN git clone --branch mbedtls-2.26.0 https://github.com/ARMmbed/mbedtls.git --depth 1 ./sources/mbedtls \ + && git clone --branch R0.14 https://github.com/abbrev/fatfs.git --depth 1 ./sources/fatfs +# 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.10.00.48 https://github.com/nanoframework/SimpleLink_CC13x2_26x2_SDK.git --depth 1 ./sources/SimpleLinkCC13 \ + && git clone --branch 1.8.1 https://github.com/nanoframework/TI_SysConfig.git --depth 1 ./sources/TI_SysConfig \ + && chmod +x ./sources/TI_SysConfig/sysconfig_cli.sh + +# Copy from our other container +COPY --from=downloader /tmp/dc-extracted/gcc /usr/local/bin/gcc +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 +ARG HEX2DFU=https://github.com/nanoframework/hex2dfu/releases/download/v2.0.9/hex2dfu +RUN mkdir -p /usr/local/bin/hex2dfu \ + && curl -o /usr/local/bin/hex2dfu/hex2dfu $HEX2DFU -L \ + && chmod +x /usr/local/bin/hex2dfu/hex2dfu + +# 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 diff --git a/.github/workflows/all.yaml b/.github/workflows/all.yaml new file mode 100644 index 0000000000..8f8ef71e52 --- /dev/null +++ b/.github/workflows/all.yaml @@ -0,0 +1,43 @@ +name: Build and push image for all RTOS + +env: + GCR_IMAGE: ghcr.io/nanoframework/dev-container-all + GCR_VERSION: v1.3 + GCR_FILE: .devcontainer/sources/Dockerfile.All + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ develop ] + paths: [ .devcontainer/sources/Dockerfile.All ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CONTAINER_BUILD_TOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + file: ${{ env.GCR_FILE }} + push: true # Will only build if this is not here + tags: | + ${{ env.GCR_IMAGE }}:${{ env.GCR_VERSION }} + ${{ env.GCR_IMAGE }}:latest \ No newline at end of file diff --git a/.github/workflows/azurertos.yaml b/.github/workflows/azurertos.yaml new file mode 100644 index 0000000000..bf87285ce9 --- /dev/null +++ b/.github/workflows/azurertos.yaml @@ -0,0 +1,43 @@ +name: Build and push image for Azure RTOS + +env: + GCR_IMAGE: ghcr.io/nanoframework/dev-container-azure-rtos + GCR_VERSION: v1.0 + GCR_FILE: .devcontainer/sources/Dockerfile.AzureRTOS + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ develop ] + paths: [ .devcontainer/sources/Dockerfile.AzureRTOS ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CONTAINER_BUILD_TOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + file: ${{ env.GCR_FILE }} + push: true # Will only build if this is not here + tags: | + ${{ env.GCR_IMAGE }}:${{ env.GCR_VERSION }} + ${{ env.GCR_IMAGE }}:latest \ No newline at end of file diff --git a/.github/workflows/chibios.yaml b/.github/workflows/chibios.yaml new file mode 100644 index 0000000000..650fcc3461 --- /dev/null +++ b/.github/workflows/chibios.yaml @@ -0,0 +1,43 @@ +name: Build and push ChibiOS image + +env: + GCR_IMAGE: ghcr.io/nanoframework/dev-container-chibios + GCR_VERSION: v1.1 + GCR_FILE: .devcontainer/sources/Dockerfile.ChibiOS + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ develop ] + paths: [ .devcontainer/sources/Dockerfile.ChibiOS ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CONTAINER_BUILD_TOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + file: ${{ env.GCR_FILE }} + push: true # Will only build if this is not here + tags: | + ${{ env.GCR_IMAGE }}:${{ env.GCR_VERSION }} + ${{ env.GCR_IMAGE }}:latest \ No newline at end of file diff --git a/.github/workflows/esp32.yml b/.github/workflows/esp32.yml new file mode 100644 index 0000000000..e068532b1f --- /dev/null +++ b/.github/workflows/esp32.yml @@ -0,0 +1,43 @@ +name: Build and push ESP32 image + +env: + GCR_IMAGE: ghcr.io/nanoframework/dev-container-esp32 + GCR_VERSION: v1.2 + GCR_FILE: .devcontainer/sources/Dockerfile.ESP32 + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ develop ] + paths: [ .devcontainer/sources/Dockerfile.ESP32 ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CONTAINER_BUILD_TOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + file: ${{ env.GCR_FILE }} + push: true # Will only build if this is not here + tags: | + ${{ env.GCR_IMAGE }}:${{ env.GCR_VERSION }} + ${{ env.GCR_IMAGE }}:latest \ No newline at end of file diff --git a/.github/workflows/ti.yaml b/.github/workflows/ti.yaml new file mode 100644 index 0000000000..860cf61485 --- /dev/null +++ b/.github/workflows/ti.yaml @@ -0,0 +1,43 @@ +name: Build and push image for TI + +env: + GCR_IMAGE: ghcr.io/nanoframework/dev-container-ti + GCR_VERSION: v1.0 + GCR_FILE: .devcontainer/sources/Dockerfile.TI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ develop ] + paths: [ .devcontainer/sources/Dockerfile.TI ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CONTAINER_BUILD_TOKEN }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v2 + with: + file: ${{ env.GCR_FILE }} + push: true # Will only build if this is not here + tags: | + ${{ env.GCR_IMAGE }}:${{ env.GCR_VERSION }} + ${{ env.GCR_IMAGE }}:latest \ No newline at end of file diff --git a/.vscode/cmake-variants-DEVCONTAINER.json b/.vscode/cmake-variants-DEVCONTAINER.json index 8efd56b8a3..4170a8e750 100644 --- a/.vscode/cmake-variants-DEVCONTAINER.json +++ b/.vscode/cmake-variants-DEVCONTAINER.json @@ -51,7 +51,8 @@ "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", - "API_Windows.Devices.SerialCommunication": "ON" + "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON" } }, "ST_STM32F429I_DISCOVERY": { @@ -70,6 +71,7 @@ "STM32_CUBE_PACKAGE_REQUIRED": "OFF", "STM32_CUBE_PACKAGE_SOURCE": "/sources/STM32CubeL4", "SUPPORT_ANY_BASE_CONVERSION": "ON", + "NF_FEATURE_HAS_SDCARD": "OFF", "NF_FEATURE_DEBUGGER": "ON", "NF_FEATURE_RTC": "ON", "SWO_OUTPUT": "OFF", @@ -84,6 +86,7 @@ "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_nanoFramework.Devices.OneWire": "ON", "API_nanoFramework.Devices.Can": "OFF", @@ -125,6 +128,7 @@ "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_nanoFramework.Devices.OneWire": "ON", "API_nanoFramework.ResourceManager": "ON", @@ -171,6 +175,7 @@ "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_Windows.Device.Dac": "ON", "API_System.Net": "ON", @@ -218,6 +223,7 @@ "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_Windows.Device.Dac": "ON", "API_System.Net": "ON", @@ -263,6 +269,7 @@ "API_Windows.Devices.Pwm": "OFF", "API_Windows.Devices.Wifi": "OFF", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_nanoFramework.ResourceManager": "ON", "API_nanoFramework.System.Collections": "ON", "API_System.Net": "ON", @@ -275,7 +282,7 @@ "BUILD_VERSION": "0.9.99.999", "CMAKE_TOOLCHAIN_FILE": "CMake/toolchain.xtensa-esp32-elf.cmake", "TOOLCHAIN_PREFIX": "/usr/local/bin/xtensa", - "ESP32_IDF_PATH": "/sources/esp-idf/esp-idf-v3.3.1", + "ESP32_IDF_PATH": "/sources/esp-idf/esp-idf-v3.3.5", "ESP32_LIBS_PATH": "/sources/esp-idf-libs", "EXECUTABLE_OUTPUT_PATH": "${workspaceRoot}/build", "TARGET_SERIES": "ESP32", @@ -296,7 +303,7 @@ "API_nanoFramework.System.Text": "ON", "API_Windows.Devices.Wifi": "ON", "API_Windows.Devices.Adc": "ON", - "API_System.Devices.Dac": "OFF", + "API_System.Device.Dac": "OFF", "API_System.IO.FileSystem": "OFF", "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", @@ -304,9 +311,9 @@ "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_System.Device.Spi": "ON", "API_Windows.Devices.Spi": "OFF", - "API_Windows.Networking.Sockets": "OFF", "API_Windows.Storage": "ON", "API_Hardware.Esp32": "ON", "API_nanoFramework.Hardware.Esp32.Rmt": "ON" @@ -319,7 +326,7 @@ "BUILD_VERSION": "0.9.99.999", "CMAKE_TOOLCHAIN_FILE": "CMake/toolchain.xtensa-esp32-elf.cmake", "TOOLCHAIN_PREFIX": "/usr/local/bin/xtensa", - "ESP32_IDF_PATH": "/sources/esp-idf/esp-idf-v3.3.1", + "ESP32_IDF_PATH": "/sources/esp-idf/esp-idf-v3.3.5", "ESP32_LIBS_PATH": "/sources/esp-idf-libs", "EXECUTABLE_OUTPUT_PATH": "${workspaceRoot}/build", "TARGET_SERIES": "ESP32", @@ -344,11 +351,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.I2c": "ON", + "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_System.Device.Spi": "ON", "API_Windows.Devices.Spi": "ON", - "API_Windows.Networking.Sockets": "OFF", "API_Windows.Storage": "ON", "API_Hardware.Esp32": "ON", "API_nanoFramework.Hardware.Esp32.Rmt": "ON", @@ -388,6 +396,7 @@ "API_Windows.Devices.Pwm": "OFF", "API_Windows.Devices.Adc": "ON", "API_Windows.Devices.SerialCommunication": "OFF", + "API_System.IO.Ports": "OFF", "API_nanoFramework.ResourceManager": "OFF", "API_nanoFramework.System.Collections": "OFF", "API_nanoFramework.System.Text": "OFF", diff --git a/.vscode/cmake-variants.TEMPLATE.json b/.vscode/cmake-variants.TEMPLATE.json index f3095e3efe..1b62fd6d56 100644 --- a/.vscode/cmake-variants.TEMPLATE.json +++ b/.vscode/cmake-variants.TEMPLATE.json @@ -99,7 +99,9 @@ "API_System.Device.I2c": "OFF-default-ON-to-add-this-API", "API_Windows.Devices.Pwm": "OFF-default-ON-to-add-this-API", "API_Windows.Devices.SerialCommunication": "OFF-default-ON-to-add-this-API", + "API_System.IO.Ports": "OFF-default-ON-to-add-this-API", "API_Windows.Devices.Spi": "OFF-default-ON-to-add-this-API", + "API_System.Device.Spi": "OFF-default-ON-to-add-this-API", "API_Hardware.Esp32": "OFF-default-ON-to-add-this-API", "API_Hardware.Stm32": "OFF-default-ON-to-add-this-API", "API_nanoFramework.TI.EasyLink": "OFF-default-ON-to-add-this-API", diff --git a/CMake/ESP32_target_os.h.in b/CMake/ESP32_target_os.h.in index a4a7fb5cd1..67fa6f36dc 100644 --- a/CMake/ESP32_target_os.h.in +++ b/CMake/ESP32_target_os.h.in @@ -16,7 +16,7 @@ #define VERSION_BUILD @nanoFramework_VERSION_PATCH@U #define VERSION_REVISION @nanoFramework_VERSION_TWEAK@U -#define TARGETINFOSTRING "@CMAKE_BUILD_TYPE@ build with IDF v3.3.1" +#define TARGETINFOSTRING "@CMAKE_BUILD_TYPE@ build with IDF v3.3.5" #define NANOCLR_LIGHT_MATH @TARGET_LIGHT_MATH@ #define DP_FLOATINGPOINT @TARGET_DP_FLOATINGPOINT@ diff --git a/CMake/Modules/CHIBIOS_STM32F0xx_sources.cmake b/CMake/Modules/CHIBIOS_STM32F0xx_sources.cmake index 2f752f14ff..66648bbb6b 100644 --- a/CMake/Modules/CHIBIOS_STM32F0xx_sources.cmake +++ b/CMake/Modules/CHIBIOS_STM32F0xx_sources.cmake @@ -14,43 +14,10 @@ FetchContent_GetProperties(chibios) ################################################################################ set(CHIBIOS_PORT_SRCS - # startup code - crt1.c - vectors.S - crt0_v6m.S - - nvic.c - stm32_isr.c - hal_lld.c - - hal_adc_lld.c - hal_can_lld.c - hal_dac_lld.c - stm32_dma.c - stm32_exti.c - hal_pal_lld.c - hal_i2c_lld.c - hal_rtc_lld.c - - hal_i2s_lld.c - hal_spi_lld.c - - hal_st_lld.c - hal_gpt_lld.c - hal_icu_lld.c - hal_pwm_lld.c - - hal_serial_lld.c - hal_uart_lld.c - - hal_usb_lld.c - - hal_wdg_lld.c # RT chcore.c - chcore_v6m.c - chcoreasm_v6m.S + chcoreasm.S ) foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) @@ -59,25 +26,10 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) find_file(CHIBIOS_F0_SRC_FILE ${SRC_FILE} PATHS - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx + ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F0xx - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 CMAKE_FIND_ROOT_PATH_BOTH ) @@ -90,26 +42,7 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) endforeach() -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32F0xx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32F0xx) - -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) - +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M) #################################################################################### # WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below diff --git a/CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake b/CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake index dbb781d693..2ff3abc7b2 100644 --- a/CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake +++ b/CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake @@ -14,47 +14,10 @@ FetchContent_GetProperties(chibios) ################################################################################################ set(CHIBIOS_PORT_SRCS - # startup code - crt1.c - vectors.S - crt0_v7m.S - - nvic.c - stm32_isr.c - hal_lld.c - - hal_adc_lld.c - hal_can_lld.c - hal_crypto_lld.c - hal_dac_lld.c - stm32_dma.c - stm32_exti.c - hal_pal_lld.c - hal_i2c_lld.c - hal_mac_lld.c - hal_usb_lld.c - hal_wspi_lld.c - hal_trng_lld.c - hal_rtc_lld.c - hal_sdc_lld.c - - hal_i2s_lld.c - hal_spi_lld.c - - hal_st_lld.c - hal_gpt_lld.c - hal_icu_lld.c - hal_pwm_lld.c - - hal_serial_lld.c - hal_uart_lld.c - - hal_wdg_lld.c # RT chcore.c - chcore_v7m.c - chcoreasm_v7m.S + chcoreasm.S ) foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) @@ -64,30 +27,8 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) find_file(CHIBIOS_F4_SRC_FILE ${SRC_FILE} PATHS - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx - ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx - - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F4xx - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDIOv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M CMAKE_FIND_ROOT_PATH_BOTH ) @@ -100,31 +41,7 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) endforeach() -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32F4xx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32F4xx) - -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDIOv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) - +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) #################################################################################### # WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below diff --git a/CMake/Modules/CHIBIOS_STM32F7xx_sources.cmake b/CMake/Modules/CHIBIOS_STM32F7xx_sources.cmake index b25d9940b9..c7809e49ba 100644 --- a/CMake/Modules/CHIBIOS_STM32F7xx_sources.cmake +++ b/CMake/Modules/CHIBIOS_STM32F7xx_sources.cmake @@ -14,47 +14,10 @@ FetchContent_GetProperties(chibios) ################################################################################################ set(CHIBIOS_PORT_SRCS - # startup code - crt1.c - vectors.S - crt0_v7m.S - - nvic.c - stm32_isr.c - hal_lld.c - - hal_adc_lld.c - hal_can_lld.c - hal_crypto_lld.c - hal_dac_lld.c - stm32_dma.c - stm32_exti.c - hal_pal_lld.c - hal_i2c_lld.c - hal_mac_lld.c - hal_usb_lld.c - hal_wspi_lld.c - hal_trng_lld.c - hal_rtc_lld.c - hal_sdc_lld.c - - hal_i2s_lld.c - hal_spi_lld.c - - hal_st_lld.c - hal_gpt_lld.c - hal_icu_lld.c - hal_pwm_lld.c - - hal_serial_lld.c - hal_uart_lld.c - - hal_wdg_lld.c # RT chcore.c - chcore_v7m.c - chcoreasm_v7m.S + chcoreasm.S ) foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) @@ -64,31 +27,8 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) find_file(CHIBIOS_F7_SRC_FILE ${SRC_FILE} PATHS - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx - ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx - - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F7xx - - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M CMAKE_FIND_ROOT_PATH_BOTH ) @@ -101,30 +41,7 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) endforeach() -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32F7xx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32F7xx) - -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) #################################################################################### diff --git a/CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake b/CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake index a6f19ddeb2..c3c49dd424 100644 --- a/CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake +++ b/CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake @@ -14,47 +14,10 @@ FetchContent_GetProperties(chibios) ################################################################################################ set(CHIBIOS_PORT_SRCS - # startup code - crt1.c - vectors.S - crt0_v7m.S - - nvic.c - stm32_isr.c - hal_lld.c - - hal_adc_lld.c - hal_can_lld.c - hal_crypto_lld.c - hal_dac_lld.c - stm32_dma.c - stm32_exti.c - hal_pal_lld.c - hal_i2c_lld.c - #hal_mac_lld.c - hal_usb_lld.c - hal_wspi_lld.c - hal_trng_lld.c - hal_rtc_lld.c - hal_sdc_lld.c - - #hal_i2s_lld.c - hal_spi_lld.c - - hal_st_lld.c - hal_gpt_lld.c - hal_icu_lld.c - hal_pwm_lld.c - - hal_serial_lld.c - hal_uart_lld.c - - hal_wdg_lld.c # RT chcore.c - chcore_v7m.c - chcoreasm_v7m.S + chcoreasm.S ) foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) @@ -64,31 +27,8 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) find_file(CHIBIOS_H7_SRC_FILE ${SRC_FILE} PATHS - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx - ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx - - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32H7xx - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv4 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/BDMAv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/FDCANv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv3 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MDMAv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv3 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M CMAKE_FIND_ROOT_PATH_BOTH ) @@ -101,32 +41,7 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) endforeach() -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32H7xx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32H7xx) - -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv4) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/BDMAv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/FDCANv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv3) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MDMAv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv3) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) - +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) #################################################################################### # WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below diff --git a/CMake/Modules/CHIBIOS_STM32L0xx_sources.cmake b/CMake/Modules/CHIBIOS_STM32L0xx_sources.cmake index 95e03bd764..f0047f4626 100644 --- a/CMake/Modules/CHIBIOS_STM32L0xx_sources.cmake +++ b/CMake/Modules/CHIBIOS_STM32L0xx_sources.cmake @@ -14,43 +14,10 @@ FetchContent_GetProperties(chibios) ################################################################################ set(CHIBIOS_PORT_SRCS - # startup code - crt1.c - vectors.S - crt0_v6m.S - - nvic.c - stm32_isr.c - hal_lld.c - - hal_adc_lld.c - hal_can_lld.c - hal_dac_lld.c - stm32_dma.c - stm32_exti.c - hal_pal_lld.c - hal_i2c_lld.c - hal_rtc_lld.c - - hal_i2s_lld.c - hal_spi_lld.c - - hal_st_lld.c - hal_gpt_lld.c - hal_icu_lld.c - hal_pwm_lld.c - - hal_serial_lld.c - hal_uart_lld.c - - hal_usb_lld.c - - hal_wdg_lld.c # RT chcore.c - chcore_v6m.c - chcoreasm_v6m.S + chcoreasm.S ) foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) @@ -60,25 +27,8 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) find_file(CHIBIOS_L0_SRC_FILE ${SRC_FILE} PATHS - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx - ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx - - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L0xx - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M CMAKE_FIND_ROOT_PATH_BOTH ) @@ -90,26 +40,7 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) list(APPEND CHIBIOS_SOURCES ${CHIBIOS_L0_SRC_FILE}) endforeach() -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32L0xx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32L0xx) - -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) - +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M) #################################################################################### # WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below diff --git a/CMake/Modules/CHIBIOS_STM32L4xx_sources.cmake b/CMake/Modules/CHIBIOS_STM32L4xx_sources.cmake index 4105c43613..1624d7f1ed 100644 --- a/CMake/Modules/CHIBIOS_STM32L4xx_sources.cmake +++ b/CMake/Modules/CHIBIOS_STM32L4xx_sources.cmake @@ -14,47 +14,10 @@ FetchContent_GetProperties(chibios) ################################################################################################ set(CHIBIOS_PORT_SRCS - # startup code - crt1.c - vectors.S - crt0_v7m.S - - nvic.c - stm32_isr.c - hal_lld.c - - hal_adc_lld.c - hal_can_lld.c - hal_crypto_lld.c - hal_dac_lld.c - stm32_dma.c - stm32_exti.c - hal_pal_lld.c - hal_i2c_lld.c - #hal_mac_lld.c - hal_usb_lld.c - hal_wspi_lld.c - hal_trng_lld.c - hal_rtc_lld.c - hal_sdc_lld.c - - hal_i2s_lld.c - hal_spi_lld.c - - hal_st_lld.c - hal_gpt_lld.c - hal_icu_lld.c - hal_pwm_lld.c - - hal_serial_lld.c - hal_uart_lld.c - - hal_wdg_lld.c # RT chcore.c - chcore_v7m.c - chcoreasm_v7m.S + chcoreasm.S ) foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) @@ -64,30 +27,8 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) find_file(CHIBIOS_L4_SRC_FILE ${SRC_FILE} PATHS - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC - ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx - ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx - - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F4xx - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv3 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv3 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 - #${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 - ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M CMAKE_FIND_ROOT_PATH_BOTH ) @@ -100,31 +41,7 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS}) endforeach() -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32L4xx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32L4xx) - -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv3) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv3) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) -#list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) - +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) #################################################################################### # WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below diff --git a/CMake/Modules/FindBuildUtils.cmake b/CMake/Modules/FindBuildUtils.cmake index 317596066b..8160899e12 100644 --- a/CMake/Modules/FindBuildUtils.cmake +++ b/CMake/Modules/FindBuildUtils.cmake @@ -48,6 +48,30 @@ function(NF_GENERATE_HEX_PACKAGE FILE1 FILE2 OUTPUTFILENAME) endfunction() +# generates a binary file with nanoBooter + nanoCLR at the proper addresses +# ready to be drag & drop on targets that feature DAPLink +function(NF_GENERATE_BIN_PACKAGE FILE1 FILE2 OFFSET OUTPUTFILENAME) + + add_custom_command( + + TARGET ${NANOCLR_PROJECT_NAME}.elf POST_BUILD + + COMMAND ${TOOL_SRECORD_PREFIX}/srec_cat + + ${FILE1} -Binary + ${FILE2} -Binary -offset 0x${OFFSET} + -o ${OUTPUTFILENAME} -Binary + + WORKING_DIRECTORY ${TOOL_SRECORD_PREFIX} + + COMMENT "exporting hex files to one binary file" + ) + + # need to add a dependency of NANOCLR to NANOBOOTER because SRECORD util needs hex outputs of both targets + add_dependencies(${NANOCLR_PROJECT_NAME}.elf ${NANOBOOTER_PROJECT_NAME}.elf) + +endfunction() + function(NF_GENERATE_BUILD_OUTPUT_FILES TARGET) # need to remove the .elf suffix from target name diff --git a/CMake/Modules/FindChibiOS.cmake b/CMake/Modules/FindChibiOS.cmake index 0d59d84681..518b84832d 100644 --- a/CMake/Modules/FindChibiOS.cmake +++ b/CMake/Modules/FindChibiOS.cmake @@ -31,6 +31,9 @@ else() set(TARGET_VENDOR "STM" CACHE INTERNAL "target vendor is STM") endif() +# store the package name for later use +set(TARGET_STM32_SERIES STM32${TARGET_SERIES_SHORT} CACHE INTERNAL "name for STM32 Cube package") + # including here the CMake files for the source files specific to the target series include(CHIBIOS_${TARGET_SERIES}_sources) # and here the GCC options tuned for the target series @@ -48,8 +51,8 @@ list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/oslib/include) list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/rt/include) list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/${TARGET_SERIES}) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx) -list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC) list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/abstractions/cmsis_os) list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/CMSIS/include) @@ -112,10 +115,12 @@ set(CHIBIOS_SRCS # RT chsys.c + chrfcu.c chdebug.c chtrace.c chvt.c chschd.c + chinstances.c chthreads.c chtm.c chstats.c @@ -132,6 +137,8 @@ set(CHIBIOS_SRCS chmemheaps.c chmempools.c chpipes.c + chobjcaches.c + chdelegates.c chfactory.c # required to use malloc and other newlib stuff diff --git a/CMake/Modules/FindChibiOS_F0_HAL.cmake b/CMake/Modules/FindChibiOS_F0_HAL.cmake new file mode 100644 index 0000000000..a1b6cb382a --- /dev/null +++ b/CMake/Modules/FindChibiOS_F0_HAL.cmake @@ -0,0 +1,170 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +include(FetchContent) +FetchContent_GetProperties(chibios) + +# set include directories for ChibiOS HAL +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD}) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F0xx) + +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARM-common) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32F0xx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32F0xx) + + +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USART) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) + + +# OSHAL sources need to be added for ChibiOS RT-NIL or Azure RTOS depending on build +# adjust search path here +if(RTOS_CHIBIOS_CHECK) + set(OSHAL_PATH ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) +elseif(RTOS_AZURERTOS_CHECK) + set(OSHAL_PATH targets/AzureRTOS/ChibiOS/HAL) +else() + message(FATAL_ERROR "RTOS not configured to use ChibiOS HAL") +endif() + +# set include path for OSHAL header +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${OSHAL_PATH}) + + +# source files for ChibiOS HAL +set(CHIBIOS_HAL_SRCS + + # startup code + crt1.c + vectors.S + crt0_v6m.S + + nvic.c + stm32_isr.c + + # HAL-OSAL files + hal.c + hal_st.c + + hal_buffers.c + hal_queues.c + hal_mmcsd.c + + hal_adc.c + hal_can.c + hal_crypto.c + hal_dac.c + hal_gpt.c + hal_i2c.c + hal_i2s.c + hal_icu.c + hal_mac.c + hal_mmc_spi.c + hal_pal.c + hal_pwm.c + hal_rtc.c + hal_sdc.c + hal_serial.c + hal_serial_usb.c + hal_sio.c + hal_spi.c + hal_trng.c + hal_uart.c + hal_usb.c + hal_wdg.c + hal_wspi.c + + # LLD HAL files + hal_lld.c + + hal_adc_lld.c + hal_can_lld.c + hal_dac_lld.c + stm32_dma.c + stm32_exti.c + hal_pal_lld.c + hal_i2c_lld.c + hal_rtc_lld.c + hal_spi_lld.c + hal_st_lld.c + hal_gpt_lld.c + hal_icu_lld.c + hal_pwm_lld.c + hal_serial_lld.c + hal_uart_lld.c + hal_usb_lld.c + hal_wdg_lld.c + + # OSAL + osal.c +) + +foreach(SRC_FILE ${CHIBIOS_HAL_SRCS}) + + set(CHIBIOS_HAL_SRC_FILE SRC_FILE -NOTFOUND) + + find_file(CHIBIOS_HAL_SRC_FILE ${SRC_FILE} + PATHS + + ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC + + ${chibios_SOURCE_DIR}/os/hal/src + ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F0xx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F0xx + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + + ${OSHAL_PATH} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${CHIBIOS_HAL_SRC_FILE}") + endif() + + list(APPEND CHIBIOS_HAL_SOURCES ${CHIBIOS_HAL_SRC_FILE}) + +endforeach() + + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_HAL_INCLUDE_DIRS CHIBIOS_HAL_SOURCES) diff --git a/CMake/Modules/FindChibiOS_F4_HAL.cmake b/CMake/Modules/FindChibiOS_F4_HAL.cmake new file mode 100644 index 0000000000..b4c35a89d9 --- /dev/null +++ b/CMake/Modules/FindChibiOS_F4_HAL.cmake @@ -0,0 +1,188 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +include(FetchContent) +FetchContent_GetProperties(chibios) + +# set include directories for ChibiOS HAL +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD}) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F4xx) + +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARM-common) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32F4xx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32F4xx) + +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDIOv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USART) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) + +# OSHAL sources need to be added for ChibiOS RT-NIL or Azure RTOS depending on build +# adjust search path here +if(RTOS_CHIBIOS_CHECK) + set(OSHAL_PATH ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) +elseif(RTOS_AZURERTOS_CHECK) + set(OSHAL_PATH targets/AzureRTOS/ChibiOS/HAL) +else() + message(FATAL_ERROR "RTOS not configured to use ChibiOS HAL") +endif() + +# set include path for OSHAL header +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${OSHAL_PATH}) + + +# source files for ChibiOS HAL +set(CHIBIOS_HAL_SRCS + + # startup code + crt1.c + vectors.S + crt0_v7m.S + + nvic.c + stm32_isr.c + + # HAL-OSAL files + hal.c + hal_st.c + + hal_buffers.c + hal_queues.c + hal_mmcsd.c + + hal_adc.c + hal_can.c + hal_crypto.c + hal_dac.c + hal_gpt.c + hal_i2c.c + hal_i2s.c + hal_icu.c + hal_mac.c + hal_mmc_spi.c + hal_pal.c + hal_pwm.c + hal_rtc.c + hal_sdc.c + hal_serial.c + hal_serial_usb.c + hal_sio.c + hal_spi.c + hal_trng.c + hal_uart.c + hal_usb.c + hal_wdg.c + hal_wspi.c + + # LLD HAL files + hal_lld.c + + hal_adc_lld.c + hal_can_lld.c + hal_crypto_lld.c + hal_dac_lld.c + stm32_dma.c + stm32_exti.c + hal_pal_lld.c + hal_i2c_lld.c + hal_mac_lld.c + hal_usb_lld.c + hal_wspi_lld.c + hal_trng_lld.c + hal_rtc_lld.c + hal_sdc_lld.c + + hal_i2s_lld.c + hal_spi_lld.c + + hal_st_lld.c + hal_gpt_lld.c + hal_icu_lld.c + hal_pwm_lld.c + + hal_serial_lld.c + hal_uart_lld.c + + hal_wdg_lld.c + + # OSAL + osal.c +) + +foreach(SRC_FILE ${CHIBIOS_HAL_SRCS}) + + set(CHIBIOS_HAL_SRC_FILE SRC_FILE -NOTFOUND) + + find_file(CHIBIOS_HAL_SRC_FILE ${SRC_FILE} + PATHS + + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC + + ${chibios_SOURCE_DIR}/os/hal/src + ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F4xx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F4xx + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDIOv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + + ${OSHAL_PATH} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${CHIBIOS_HAL_SRC_FILE}") + endif() + + list(APPEND CHIBIOS_HAL_SOURCES ${CHIBIOS_HAL_SRC_FILE}) + +endforeach() + + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_HAL_INCLUDE_DIRS CHIBIOS_HAL_SOURCES) diff --git a/CMake/Modules/FindChibiOS_F7_HAL.cmake b/CMake/Modules/FindChibiOS_F7_HAL.cmake new file mode 100644 index 0000000000..9dbfe6e0e4 --- /dev/null +++ b/CMake/Modules/FindChibiOS_F7_HAL.cmake @@ -0,0 +1,188 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +include(FetchContent) +FetchContent_GetProperties(chibios) + +# set include directories for ChibiOS HAL +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD}) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F7xx) + +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARM-common) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32F7xx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32F7xx) + +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USART) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) + + +# OSHAL sources need to be added for ChibiOS RT-NIL or Azure RTOS depending on build +# adjust search path here +if(RTOS_CHIBIOS_CHECK) + set(OSHAL_PATH ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) +elseif(RTOS_AZURERTOS_CHECK) + set(OSHAL_PATH targets/AzureRTOS/ChibiOS/HAL) +else() + message(FATAL_ERROR "RTOS not configured to use ChibiOS HAL") +endif() + +# set include path for OSHAL header +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${OSHAL_PATH}) + + +# source files for ChibiOS HAL +set(CHIBIOS_HAL_SRCS + + # startup code + crt1.c + vectors.S + crt0_v7m.S + + nvic.c + stm32_isr.c + + # HAL-OSAL files + hal.c + hal_st.c + + hal_buffers.c + hal_queues.c + hal_mmcsd.c + + hal_adc.c + hal_can.c + hal_crypto.c + hal_dac.c + hal_gpt.c + hal_i2c.c + hal_i2s.c + hal_icu.c + hal_mac.c + hal_mmc_spi.c + hal_pal.c + hal_pwm.c + hal_rtc.c + hal_sdc.c + hal_serial.c + hal_serial_usb.c + hal_sio.c + hal_spi.c + hal_trng.c + hal_uart.c + hal_usb.c + hal_wdg.c + hal_wspi.c + + # LLD HAL files + hal_lld.c + + hal_adc_lld.c + hal_can_lld.c + hal_crypto_lld.c + hal_dac_lld.c + stm32_dma.c + stm32_exti.c + hal_pal_lld.c + hal_i2c_lld.c + hal_mac_lld.c + hal_usb_lld.c + hal_wspi_lld.c + hal_trng_lld.c + hal_rtc_lld.c + hal_sdc_lld.c + + hal_i2s_lld.c + hal_spi_lld.c + + hal_st_lld.c + hal_gpt_lld.c + hal_icu_lld.c + hal_pwm_lld.c + + hal_serial_lld.c + hal_uart_lld.c + + hal_wdg_lld.c + + # OSAL + osal.c +) + +foreach(SRC_FILE ${CHIBIOS_HAL_SRCS}) + + set(CHIBIOS_HAL_SRC_FILE SRC_FILE -NOTFOUND) + + find_file(CHIBIOS_HAL_SRC_FILE ${SRC_FILE} + PATHS + + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC + + ${chibios_SOURCE_DIR}/os/hal/src + ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32F7xx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + + ${OSHAL_PATH} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${CHIBIOS_HAL_SRC_FILE}") + endif() + + list(APPEND CHIBIOS_HAL_SOURCES ${CHIBIOS_HAL_SRC_FILE}) + +endforeach() + + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_HAL_INCLUDE_DIRS CHIBIOS_HAL_SOURCES) diff --git a/CMake/Modules/FindChibiOS_H7_HAL.cmake b/CMake/Modules/FindChibiOS_H7_HAL.cmake new file mode 100644 index 0000000000..e4faa448d6 --- /dev/null +++ b/CMake/Modules/FindChibiOS_H7_HAL.cmake @@ -0,0 +1,191 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +include(FetchContent) +FetchContent_GetProperties(chibios) + +# set include directories for ChibiOS HAL +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD}) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32H7xx) + +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARM-common) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32H7xx) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32H7xx) + +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv4) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/BDMAv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/FDCANv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv3) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MDMAv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv3) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USART) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) + + +# OSHAL sources need to be added for ChibiOS RT-NIL or Azure RTOS depending on build +# adjust search path here +if(RTOS_CHIBIOS_CHECK) + set(OSHAL_PATH ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) +elseif(RTOS_AZURERTOS_CHECK) + set(OSHAL_PATH targets/AzureRTOS/ChibiOS/HAL) +else() + message(FATAL_ERROR "RTOS not configured to use ChibiOS HAL") +endif() + +# set include path for OSHAL header +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${OSHAL_PATH}) + + +# source files for ChibiOS HAL +set(CHIBIOS_HAL_SRCS + + # startup code + crt1.c + vectors.S + crt0_v7m.S + + nvic.c + stm32_isr.c + + # HAL-OSAL files + hal.c + hal_st.c + + hal_buffers.c + hal_queues.c + hal_mmcsd.c + + hal_adc.c + hal_can.c + hal_crypto.c + hal_dac.c + hal_gpt.c + hal_i2c.c + hal_i2s.c + hal_icu.c + hal_mac.c + hal_mmc_spi.c + hal_pal.c + hal_pwm.c + hal_rtc.c + hal_sdc.c + hal_serial.c + hal_serial_usb.c + hal_sio.c + hal_spi.c + hal_trng.c + hal_uart.c + hal_usb.c + hal_wdg.c + hal_wspi.c + + # LLD HAL files + hal_lld.c + + hal_adc_lld.c + hal_can_lld.c + hal_crypto_lld.c + hal_dac_lld.c + stm32_dma.c + stm32_exti.c + hal_pal_lld.c + hal_i2c_lld.c + #hal_mac_lld.c + hal_usb_lld.c + hal_wspi_lld.c + hal_trng_lld.c + hal_rtc_lld.c + hal_sdc_lld.c + + #hal_i2s_lld.c + hal_spi_lld.c + + hal_st_lld.c + hal_gpt_lld.c + hal_icu_lld.c + hal_pwm_lld.c + + hal_serial_lld.c + hal_uart_lld.c + + hal_wdg_lld.c + + # OSAL + osal.c +) + +foreach(SRC_FILE ${CHIBIOS_HAL_SRCS}) + + set(CHIBIOS_HAL_SRC_FILE SRC_FILE -NOTFOUND) + + find_file(CHIBIOS_HAL_SRC_FILE ${SRC_FILE} + PATHS + + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC + + ${chibios_SOURCE_DIR}/os/hal/src + ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32H7xx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32H7xx + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv4 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/BDMAv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/FDCANv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv3 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MDMAv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv3 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + + ${OSHAL_PATH} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${CHIBIOS_HAL_SRC_FILE}") + endif() + + list(APPEND CHIBIOS_HAL_SOURCES ${CHIBIOS_HAL_SRC_FILE}) + +endforeach() + + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_HAL_INCLUDE_DIRS CHIBIOS_HAL_SOURCES) diff --git a/CMake/Modules/FindChibiOS_L0_HAL.cmake b/CMake/Modules/FindChibiOS_L0_HAL.cmake new file mode 100644 index 0000000000..b9d0f69e44 --- /dev/null +++ b/CMake/Modules/FindChibiOS_L0_HAL.cmake @@ -0,0 +1,173 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +include(FetchContent) +FetchContent_GetProperties(chibios) + +# set include directories for ChibiOS HAL +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD}) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L0xx) + +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARM-common) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32L0xx) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32L0xx) + +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USART) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) + + +# OSHAL sources need to be added for ChibiOS RT-NIL or Azure RTOS depending on build +# adjust search path here +if(RTOS_CHIBIOS_CHECK) + set(OSHAL_PATH ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) +elseif(RTOS_AZURERTOS_CHECK) + set(OSHAL_PATH targets/AzureRTOS/ChibiOS/HAL) +else() + message(FATAL_ERROR "RTOS not configured to use ChibiOS HAL") +endif() + +# set include path for OSHAL header +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${OSHAL_PATH}) + + +# source files for ChibiOS HAL +set(CHIBIOS_HAL_SRCS + + # startup code + crt1.c + vectors.S + crt0_v6m.S + + nvic.c + stm32_isr.c + + # HAL-OSAL files + hal.c + hal_st.c + + hal_buffers.c + hal_queues.c + hal_mmcsd.c + + hal_adc.c + hal_can.c + hal_crypto.c + hal_dac.c + hal_gpt.c + hal_i2c.c + hal_i2s.c + hal_icu.c + hal_mac.c + hal_mmc_spi.c + hal_pal.c + hal_pwm.c + hal_rtc.c + hal_sdc.c + hal_serial.c + hal_serial_usb.c + hal_sio.c + hal_spi.c + hal_trng.c + hal_uart.c + hal_usb.c + hal_wdg.c + hal_wspi.c + + # LLD HAL files + hal_lld.c + + hal_adc_lld.c + hal_can_lld.c + hal_dac_lld.c + stm32_dma.c + stm32_exti.c + hal_pal_lld.c + hal_i2c_lld.c + hal_usb_lld.c + hal_rtc_lld.c + + hal_i2s_lld.c + hal_spi_lld.c + + hal_st_lld.c + hal_gpt_lld.c + hal_icu_lld.c + hal_pwm_lld.c + + hal_serial_lld.c + hal_uart_lld.c + + hal_wdg_lld.c + + # OSAL + osal.c +) + +foreach(SRC_FILE ${CHIBIOS_HAL_SRCS}) + + set(CHIBIOS_HAL_SRC_FILE SRC_FILE -NOTFOUND) + + find_file(CHIBIOS_HAL_SRC_FILE ${SRC_FILE} + PATHS + + ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC + + ${chibios_SOURCE_DIR}/os/hal/src + ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L0xx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L0xx + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USBv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + + ${OSHAL_PATH} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${CHIBIOS_HAL_SRC_FILE}") + endif() + + list(APPEND CHIBIOS_HAL_SOURCES ${CHIBIOS_HAL_SRC_FILE}) + +endforeach() + + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_HAL_INCLUDE_DIRS CHIBIOS_HAL_SOURCES) diff --git a/CMake/Modules/FindChibiOS_L4_HAL.cmake b/CMake/Modules/FindChibiOS_L4_HAL.cmake new file mode 100644 index 0000000000..972250f063 --- /dev/null +++ b/CMake/Modules/FindChibiOS_L4_HAL.cmake @@ -0,0 +1,191 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +include(FetchContent) +FetchContent_GetProperties(chibios) + +# set include directories for ChibiOS HAL +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/include) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD}) +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L4xx) + +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/portability/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARM-common) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/devices/STM32L4xx) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ARM/CMSIS/Core/Include) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ext/ST/STM32L4xx) + +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv3) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv3) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2) +#list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USART) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2) +list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1) + + +# OSHAL sources need to be added for ChibiOS RT-NIL or Azure RTOS depending on build +# adjust search path here +if(RTOS_CHIBIOS_CHECK) + set(OSHAL_PATH ${chibios_SOURCE_DIR}/os/hal/osal/rt-nil) +elseif(RTOS_AZURERTOS_CHECK) + set(OSHAL_PATH targets/AzureRTOS/ChibiOS/HAL) +else() + message(FATAL_ERROR "RTOS not configured to use ChibiOS HAL") +endif() + +# set include path for OSHAL header +list(APPEND CHIBIOS_HAL_INCLUDE_DIRS ${OSHAL_PATH}) + + +# source files for ChibiOS HAL +set(CHIBIOS_HAL_SRCS + + # startup code + crt1.c + vectors.S + crt0_v7m.S + + nvic.c + stm32_isr.c + + # HAL-OSAL files + hal.c + hal_st.c + + hal_buffers.c + hal_queues.c + hal_mmcsd.c + + hal_adc.c + hal_can.c + hal_crypto.c + hal_dac.c + hal_gpt.c + hal_i2c.c + hal_i2s.c + hal_icu.c + hal_mac.c + hal_mmc_spi.c + hal_pal.c + hal_pwm.c + hal_rtc.c + hal_sdc.c + hal_serial.c + hal_serial_usb.c + hal_sio.c + hal_spi.c + hal_trng.c + hal_uart.c + hal_usb.c + hal_wdg.c + hal_wspi.c + + # LLD HAL files + hal_lld.c + + hal_adc_lld.c + hal_can_lld.c + hal_crypto_lld.c + hal_dac_lld.c + stm32_dma.c + stm32_exti.c + hal_pal_lld.c + hal_i2c_lld.c + #hal_mac_lld.c + hal_usb_lld.c + hal_wspi_lld.c + hal_trng_lld.c + hal_rtc_lld.c + hal_sdc_lld.c + + hal_i2s_lld.c + hal_spi_lld.c + + hal_st_lld.c + hal_gpt_lld.c + hal_icu_lld.c + hal_pwm_lld.c + + hal_serial_lld.c + hal_uart_lld.c + + hal_wdg_lld.c + + + # OSAL + osal.c +) + +foreach(SRC_FILE ${CHIBIOS_HAL_SRCS}) + + set(CHIBIOS_HAL_SRC_FILE SRC_FILE -NOTFOUND) + + find_file(CHIBIOS_HAL_SRC_FILE ${SRC_FILE} + PATHS + + ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M/compilers/GCC + ${chibios_SOURCE_DIR}/os/common/startup/ARMCMx/compilers/GCC + + ${chibios_SOURCE_DIR}/os/hal/src + ${chibios_SOURCE_DIR}/os/hal/ports/common/ARMCMx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L4xx + + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/STM32L4xx + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/ADCv3 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CANv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/CRYPv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/DMAv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/EXTIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/GPIOv3 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/I2Cv2 + #${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/MACv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/OTGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/QUADSPIv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RNGv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/RTCv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SDMMCv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SPIv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/SYSTICKv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/TIMv1 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/USARTv2 + ${chibios_SOURCE_DIR}/os/hal/ports/STM32/LLD/xWDGv1 + + + ${OSHAL_PATH} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${CHIBIOS_HAL_SRC_FILE}") + endif() + + list(APPEND CHIBIOS_HAL_SOURCES ${CHIBIOS_HAL_SRC_FILE}) + +endforeach() + + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOS DEFAULT_MSG CHIBIOS_HAL_INCLUDE_DIRS CHIBIOS_HAL_SOURCES) diff --git a/CMake/Modules/FindNF_CoreCLR.cmake b/CMake/Modules/FindNF_CoreCLR.cmake index 9324b46d77..3cbb7a3483 100644 --- a/CMake/Modules/FindNF_CoreCLR.cmake +++ b/CMake/Modules/FindNF_CoreCLR.cmake @@ -105,6 +105,7 @@ set(NF_CoreCLR_SRCS corlib_native_System_Threading_Interlocked.cpp corlib_native_System_Threading_ManualResetEvent.cpp corlib_native_System_Threading_Monitor.cpp + corlib_native_System_Threading_SpinWait.cpp corlib_native_System_Threading_Thread.cpp corlib_native_System_Threading_Timer.cpp corlib_native_System_Threading_WaitHandle.cpp diff --git a/CMake/Modules/FindNF_NativeAssemblies.cmake b/CMake/Modules/FindNF_NativeAssemblies.cmake index 4cd462db7e..41da91c66b 100644 --- a/CMake/Modules/FindNF_NativeAssemblies.cmake +++ b/CMake/Modules/FindNF_NativeAssemblies.cmake @@ -5,7 +5,7 @@ ############################################################################################ # WHEN ADDING A NEW API add the name that corresponds to the CMake option here -# e.g.: for namespace Windows.Devices.Gpio, the CMake option is 'API_Windows.Devices.Gpio' +# e.g.: for namespace System.Device.Gpio, the CMake option is 'API_System.Device.Gpio' # and the namespace designation is 'Windows.Devices.Gpio' ########################################################################################### @@ -27,6 +27,7 @@ option(API_Windows.Devices.Gpio "option for Windows.Devices.Gpio option(API_Windows.Devices.I2c "option for Windows.Devices.I2c API") option(API_Windows.Devices.Pwm "option for Windows.Devices.Pwm API") option(API_Windows.Devices.SerialCommunication "option for Windows.Devices.SerialCommunication API") +option(API_System.IO.Ports "option for System.IO.Ports API") option(API_Windows.Devices.Spi "option for Windows.Devices.Spi API") option(API_System.Device.Spi "option for System.Device.Spi API") option(API_Windows.Storage "option for Windows.Storage") @@ -36,6 +37,7 @@ option(API_nanoFramework.Graphics "option for nanoFramework.Graphi # Esp32 only option(API_Hardware.Esp32 "option for Hardware.Esp32") option(API_nanoFramework.Hardware.Esp32.Rmt "option for nanoFramework.Hardware.Esp32.Rmt") +option(API_nanoFramework.Hardware.Esp32.Ble "option for nanoFramework.Hardware.Esp32.Ble") # Stm32 only @@ -175,6 +177,12 @@ if(API_nanoFramework.Hardware.Esp32.Rmt) PerformSettingsForApiEntry("nanoFramework.Hardware.Esp32.Rmt") endif() +# nanoFramework.Hardware.Esp32.Ble +if(API_nanoFramework.Hardware.Esp32.Ble) + ##### API name here (doted name) + PerformSettingsForApiEntry("nanoFramework.Hardware.Esp32.Ble") +endif() + # Hardware.Stm32 if(API_Hardware.Stm32) ##### API name here (doted name) @@ -315,6 +323,12 @@ if(API_Windows.Devices.SerialCommunication) PerformSettingsForApiEntry("Windows.Devices.SerialCommunication") endif() +# API_System.IO.Ports +if(API_System.IO.Ports) + ##### API name here (doted name) + PerformSettingsForApiEntry("System.IO.Ports") +endif() + # Windows.Devices.Spi if(API_Windows.Devices.Spi) ##### API name here (doted name) diff --git a/CMake/Modules/FindSystem.IO.Ports.cmake b/CMake/Modules/FindSystem.IO.Ports.cmake new file mode 100644 index 0000000000..d023153b5d --- /dev/null +++ b/CMake/Modules/FindSystem.IO.Ports.cmake @@ -0,0 +1,78 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +# native code directory +set(BASE_PATH_FOR_THIS_MODULE ${BASE_PATH_FOR_CLASS_LIBRARIES_MODULES}/System.IO.Ports) + + +# set include directories +list(APPEND System.IO.Ports_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/CLR/Core) +list(APPEND System.IO.Ports_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/CLR/Include) +list(APPEND System.IO.Ports_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/HAL/Include) +list(APPEND System.IO.Ports_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/PAL/Include) +list(APPEND System.IO.Ports_INCLUDE_DIRS ${BASE_PATH_FOR_THIS_MODULE}) +list(APPEND System.IO.Ports_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/src/System.IO.Ports) +# TODO remove the following when Windows.Devices.SerialCommunications is removed +list(APPEND System.IO.Ports_INCLUDE_DIRS ${BASE_PATH_FOR_CLASS_LIBRARIES_MODULES}/Windows.Devices.SerialCommunications) + +# source files + +if(RTOS_TI_SIMPLELINK_CHECK) + + # TI SimpleLink is using the new Serial.IO.Ports + + set(System.IO.Ports_SRCS + + sys_io_ser_native.cpp + sys_io_ser_native_System_IO_Ports_SerialDevice.cpp + + target_system_io_serial_config.cpp + ) + + foreach(SRC_FILE ${System.IO.Ports_SRCS}) + set(System.IO.Ports_SRC_FILE SRC_FILE-NOTFOUND) + find_file(System.IO.Ports_SRC_FILE ${SRC_FILE} + PATHS + ${BASE_PATH_FOR_THIS_MODULE} + ${TARGET_BASE_LOCATION} + ${PROJECT_SOURCE_DIR}/src/System.IO.Ports + + CMAKE_FIND_ROOT_PATH_BOTH + ) + # message("${SRC_FILE} >> ${System.IO.Ports_SRC_FILE}") # debug helper + list(APPEND System.IO.Ports_SOURCES ${System.IO.Ports_SRC_FILE}) + endforeach() + +else() + + # all the other targets are using the Windows.Devices.SerialCommunication + + set(System.IO.Ports_SRCS + + sys_io_ser_native.cpp + sys_io_ser_native_System_IO_Ports_SerialPort.cpp + # this will have to be adjusted to the system_device file once Windows.Devices removed + target_windows_devices_serialcommunication_config.cpp + ) + + foreach(SRC_FILE ${System.IO.Ports_SRCS}) + set(System.IO.Ports_SRC_FILE SRC_FILE-NOTFOUND) + find_file(System.IO.Ports_SRC_FILE ${SRC_FILE} + PATHS + ${BASE_PATH_FOR_THIS_MODULE} + ${TARGET_BASE_LOCATION} + ${PROJECT_SOURCE_DIR}/src/System.IO.Ports + + CMAKE_FIND_ROOT_PATH_BOTH + ) + # message("${SRC_FILE} >> ${System.IO.Ports_SRC_FILE}") # debug helper + list(APPEND System.IO.Ports_SOURCES ${System.IO.Ports_SRC_FILE}) + endforeach() + +endif() + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(System.IO.Ports DEFAULT_MSG System.IO.Ports_INCLUDE_DIRS System.IO.Ports_SOURCES) diff --git a/CMake/Modules/FindTI_SimpleLink.cmake b/CMake/Modules/FindTI_SimpleLink.cmake index a10df0cbe9..68c29a5742 100644 --- a/CMake/Modules/FindTI_SimpleLink.cmake +++ b/CMake/Modules/FindTI_SimpleLink.cmake @@ -3,6 +3,9 @@ # See LICENSE file in the project root for full license information. # +include(FetchContent) +FetchContent_GetProperties(simplelinkcc13x2_26x2sdk) + ################################################################################################################################### # WHEN ADDING A NEW series add the respective name to the list below along with the CMake files with GCC options and source files ################################################################################################################################### @@ -28,5 +31,5 @@ include(TI_SimpleLink_${TARGET_SERIES}_sources) include(TI_SimpleLink_${TARGET_SERIES}_GCC_options) # includes for TI_RTOS -list(APPEND TI_SimpleLink_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/SimpleLinkCC32xxSdk_Source/kernel/tirtos/packages") -list(APPEND TI_SimpleLink_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/SimpleLinkCC32xxSdk_Source/kernel/tirtos/packages/ti/sysbios") +list(APPEND TI_SimpleLink_INCLUDE_DIRS ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/kernel/tirtos/packages) +list(APPEND TI_SimpleLink_INCLUDE_DIRS ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/kernel/tirtos/packages/ti/sysbios) diff --git a/CMake/Modules/FindWireProtocol.cmake b/CMake/Modules/FindWireProtocol.cmake index 8d2729d024..99f48d67fe 100644 --- a/CMake/Modules/FindWireProtocol.cmake +++ b/CMake/Modules/FindWireProtocol.cmake @@ -3,14 +3,6 @@ # See LICENSE file in the project root for full license information. # -# handle Wire Protocol _TRACE_ preferences, if any -option(NF_WP_TRACE_ERRORS "option to Trace errors with Wire Protocol") -option(NF_WP_TRACE_HEADERS "option to Trace headers with Wire Protocol") -option(NF_WP_TRACE_STATE "option to Trace state with Wire Protocol") -option(NF_WP_TRACE_NODATA "option to Trace empty packets with Wire Protocol") -option(NF_WP_TRACE_ALL "option to Trace with Wire Protocol") -option(NF_WP_IMPLEMENTS_CRC32 "option to report if target implements CRC32 in Wire Protocol") - # this one has to follow the declaration on src\CLR\Include\WireProtocol_Message.h # #define TRACE_ERRORS 1 # #define TRACE_HEADERS 2 diff --git a/CMake/Modules/FindmbedTLS.cmake b/CMake/Modules/FindmbedTLS.cmake index 6ebba08149..362db1ce19 100644 --- a/CMake/Modules/FindmbedTLS.cmake +++ b/CMake/Modules/FindmbedTLS.cmake @@ -13,6 +13,10 @@ FetchContent_GetProperties(mbedtls) # the list of the required include paths needs to be platform specific because of ESP32 port if(RTOS_FREERTOS_ESP32_CHECK) + if (BUILD_VERBOSE) + message("Using IDF path >> ${ESP32_IDF_PATH}") + endif() + # List of the required include paths list(APPEND mbedTLS_INCLUDE_DIRS ${ESP32_IDF_PATH}/components/mbedtls/port/include) list(APPEND mbedTLS_INCLUDE_DIRS ${ESP32_IDF_PATH}/components/mbedtls/port/include/mbedtls) diff --git a/CMake/Modules/FindnanoFramework.Hardware.Esp32.Ble.cmake b/CMake/Modules/FindnanoFramework.Hardware.Esp32.Ble.cmake new file mode 100644 index 0000000000..9aad9b1c50 --- /dev/null +++ b/CMake/Modules/FindnanoFramework.Hardware.Esp32.Ble.cmake @@ -0,0 +1,58 @@ +# +# Copyright (c) .NET Foundation and Contributors +# See LICENSE file in the project root for full license information. +# + +# native code directory +set(BASE_PATH_FOR_THIS_MODULE "${BASE_PATH_FOR_CLASS_LIBRARIES_MODULES}/nanoFramework.Hardware.Esp32.Ble") + + +# set include directories +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src/CLR/Core") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src/CLR/Include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src/HAL/Include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src/PAL/Include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${BASE_PATH_FOR_THIS_MODULE}") + +# set include directories for Esp32 IDF +set(NIMBLE_COMPONENT_PATH "${ESP32_IDF_PATH}/components/nimble") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/port/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/nimble/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/esp-hci/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/porting/nimble/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/porting/npl/freertos/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/nimble/host/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/nimble/host/util/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/nimble/host/services/gap/include") +list(APPEND nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS "${NIMBLE_COMPONENT_PATH}/nimble/nimble/host/services/gatt/include") + +# source files +set(nanoFramework.Hardware.Esp32.Ble_SRCS + + nanoFramework_hardware_esp32_ble.cpp + nanoFramework_hardware_esp32_ble_native.cpp + gatt_svr.c +) + +foreach(SRC_FILE ${nanoFramework.Hardware.Esp32.Ble_SRCS}) + + set(nanoFramework.Hardware.Esp32.Ble_SRC_FILE SRC_FILE-NOTFOUND) + + find_file(nanoFramework.Hardware.Esp32.Ble_SRC_FILE ${SRC_FILE} + PATHS + ${BASE_PATH_FOR_THIS_MODULE} + + CMAKE_FIND_ROOT_PATH_BOTH + ) + + if (BUILD_VERBOSE) + message("${SRC_FILE} >> ${nanoFramework.Hardware.Esp32.Ble_SRC_FILE}") + endif() + + list(APPEND nanoFramework.Hardware.Esp32.Ble_SOURCES ${nanoFramework.Hardware.Esp32.Ble_SRC_FILE}) + +endforeach() + +include(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(nanoFramework.Hardware.Esp32.Ble DEFAULT_MSG nanoFramework.Hardware.Esp32.Ble_INCLUDE_DIRS nanoFramework.Hardware.Esp32.Ble_SOURCES) diff --git a/CMake/binutils.ChibiOS.cmake b/CMake/binutils.ChibiOS.cmake index 4ea20983f0..17c75273eb 100644 --- a/CMake/binutils.ChibiOS.cmake +++ b/CMake/binutils.ChibiOS.cmake @@ -84,11 +84,22 @@ function(NF_SET_COMPILER_DEFINITIONS TARGET) endfunction() +function(NF_SET_STM32_TARGET_SERIES) + # process target series, which is in the format "STM32F4xx" + string(REPLACE "STM32" "" TARGET_SERIES_SHORT_1 "${TARGET_SERIES}") + string(REPLACE "xx" "" TARGET_SERIES_SHORT "${TARGET_SERIES_SHORT_1}") + + # store the series short name for later use + set(TARGET_SERIES_SHORT ${TARGET_SERIES_SHORT} CACHE INTERNAL "STM32 target series short name") + +endfunction() + # Add packages that are common to ChibiOS platform builds # To be called from target CMakeList.txt macro(NF_ADD_PLATFORM_PACKAGES) find_package(ChibiOS REQUIRED) + find_package(ChibiOS_${TARGET_SERIES_SHORT}_HAL REQUIRED) find_package(ChibiOSnfOverlay REQUIRED) # ChibiOS contrib repo @@ -130,6 +141,7 @@ macro(NF_ADD_PLATFORM_INCLUDE_DIRECTORIES TARGET) target_include_directories(${TARGET}.elf PUBLIC ${CHIBIOS_INCLUDE_DIRS} + ${CHIBIOS_HAL_INCLUDE_DIRS} ${ChibiOSnfOverlay_INCLUDE_DIRS} ${CHIBIOS_CONTRIB_INCLUDE_DIRS} ${${TARGET_STM32_CUBE_PACKAGE}_CubePackage_INCLUDE_DIRS} @@ -180,6 +192,7 @@ macro(NF_ADD_PLATFORM_SOURCES TARGET) ${${TARGET_STM32_CUBE_PACKAGE}_CubePackage_SOURCES} ${CHIBIOS_SOURCES} + ${CHIBIOS_HAL_SOURCES} ${ChibiOSnfOverlay_SOURCES} ) diff --git a/CMake/binutils.FreeRTOS.cmake b/CMake/binutils.FreeRTOS.cmake index b1acfae8cb..ec77be8f3d 100644 --- a/CMake/binutils.FreeRTOS.cmake +++ b/CMake/binutils.FreeRTOS.cmake @@ -74,6 +74,8 @@ function(NF_SET_COMPILER_DEFINITIONS TARGET) target_compile_definitions(${TARGET} PUBLIC -DNANOCLR_NO_IL_INLINE=1) endif() + NF_COMMON_COMPILER_DEFINITIONS(${TARGET}) + # include any extra compiler definitions comming from extra args target_compile_definitions(${TARGET} PUBLIC ${ARGN}) diff --git a/CMake/binutils.TI_SimpleLink.cmake b/CMake/binutils.TI_SimpleLink.cmake index 473f79c217..5885056d0e 100644 --- a/CMake/binutils.TI_SimpleLink.cmake +++ b/CMake/binutils.TI_SimpleLink.cmake @@ -82,6 +82,8 @@ function(NF_SET_COMPILER_DEFINITIONS TARGET) target_compile_definitions(${TARGET} PUBLIC -DNANOCLR_NO_IL_INLINE=1) endif() + NF_COMMON_COMPILER_DEFINITIONS(${TARGET}) + # include any extra compiler definitions coming from extra args target_compile_definitions(${TARGET} PUBLIC ${ARGN}) @@ -147,12 +149,12 @@ macro(NF_ADD_PLATFORM_INCLUDE_DIRECTORIES TARGET) target_link_libraries( ${NANOCLR_PROJECT_NAME}.elf - ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/display/lib/display.am4fg + ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/display/lib/gcc/m4f/display.a ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/grlib/lib/gcc/m4f/grlib.a ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/drivers/rf/lib/rf_multiMode_cc13x2.am4fg - ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/drivers/lib/drivers_cc13x2.am4fg + ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/drivers/lib/gcc/m4f/drivers_cc13x2.a ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/source/ti/devices/cc13x2_cc26x2/driverlib/bin/gcc/driverlib.lib - ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/kernel/tirtos/packages/ti/dpl/lib/dpl_cc13x2.am4fg + ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/kernel/tirtos/packages/ti/dpl/lib/gcc/m4f/dpl_cc13x2.a ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/thumb/v7e-m/hard/libm.a ${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/thumb/v7e-m/hard/libnosys.a @@ -234,7 +236,7 @@ macro(NF_ADD_PLATFORM_SYSCONFIG_STEPS TI_DEVICE TI_DEVICE_FAMILY) DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SYS_CONFIG_FILENAME} - COMMAND ${ti_sysconfig_SOURCE_DIR}/sysconfig_cli.bat -s "${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/.metadata/product.json" -o "syscfg" --compiler gcc ${SYS_CONFIG_FILENAME} + COMMAND ${ti_sysconfig_SOURCE_DIR}/sysconfig_cli.bat --product "${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/.metadata/product.json" --script ${SYS_CONFIG_FILENAME} -o "syscfg" --compiler gcc WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate configuration files" ) @@ -249,8 +251,8 @@ macro(NF_ADD_PLATFORM_SYSCONFIG_STEPS TI_DEVICE TI_DEVICE_FAMILY) DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${SYS_CONFIG_FILENAME} - COMMAND ${ti_sysconfig_SOURCE_DIR}/sysconfig_cli.sh -s "${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/.metadata/product.json" -o "syscfg" --compiler gcc ${SYS_CONFIG_FILENAME} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${ti_sysconfig_SOURCE_DIR}/sysconfig_cli.sh --product "${simplelinkcc13x2_26x2sdk_SOURCE_DIR}/.metadata/product.json" --script ${SYS_CONFIG_FILENAME} -o "syscfg" --compiler gcc + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generate configuration files" ) endif() diff --git a/CMake/binutils.common.cmake b/CMake/binutils.common.cmake index b337d26d55..83f19a36d9 100644 --- a/CMake/binutils.common.cmake +++ b/CMake/binutils.common.cmake @@ -42,7 +42,7 @@ macro(NF_ADD_COMMON_PACKAGES) # security provider is mbedTLS if(USE_SECURITY_MBEDTLS_OPTION) - find_package(mbedTLS REQUIRED) + find_package(mbedTLS REQUIRED) endif() endmacro() diff --git a/CMake/toolchain.xtensa-esp32-elf.cmake b/CMake/toolchain.xtensa-esp32-elf.cmake index a43e9adca8..dc152a6e22 100644 --- a/CMake/toolchain.xtensa-esp32-elf.cmake +++ b/CMake/toolchain.xtensa-esp32-elf.cmake @@ -54,11 +54,10 @@ set(GCC_ESP32_LINKER_LD, " -L ${ESP32_IDF_PATH}/components/esp32/ld -T esp32_ou # set debug flags #set(CMAKE_C_FLAGS "-DTEST_WITH_C_FLAGS " CACHE INTERNAL "c compiler flags ") - set(CMAKE_CXX_FLAGS "" CACHE INTERNAL "") -set(CMAKE_C_FLAGS_DEBUG "-std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -mfix-esp32-psram-cache-issue -DWITH_POSIX -DHAVE_CONFIG_H -DESP_PLATFORM -D IDF_VER=\"v3.3.1\" -MMD -MP " CACHE INTERNAL "c compiler flags debug") -set(CMAKE_CXX_FLAGS_DEBUG " -Og -ggdb -std=gnu++11 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -mfix-esp32-psram-cache-issue -DESP_PLATFORM " CACHE INTERNAL "cxx compiler flags debug") +set(CMAKE_C_FLAGS_DEBUG "-std=gnu99 -Og -ggdb -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -DWITH_POSIX -DHAVE_CONFIG_H -DESP_PLATFORM -D IDF_VER=\"v3.3.5\" -MMD -MP " CACHE INTERNAL "c compiler flags debug") +set(CMAKE_CXX_FLAGS_DEBUG " -Og -ggdb -std=gnu++11 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -DESP_PLATFORM " CACHE INTERNAL "cxx compiler flags debug") set(CMAKE_ASM_FLAGS_DEBUG " -g3 -ggdb" CACHE INTERNAL "asm compiler flags debug") @@ -66,10 +65,10 @@ set(CMAKE_ASM_FLAGS_DEBUG " -g3 -ggdb" CACHE INTERNAL "asm compiler flags debug" set(CMAKE_EXE_LINKER_FLAGS_DEBUG " -nostdlib -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static " CACHE INTERNAL "linker flags debug") # set release flags -set(CMAKE_C_FLAGS_RELEASE " -std=gnu99 -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -MMD -MP -Wall -Wextra -Werror -mfix-esp32-psram-cache-issue -D IDF_VER=\"v3.3.1\" " CACHE INTERNAL "c compiler flags release") -set(CMAKE_C_FLAGS_MINSIZEREL " -std=gnu99 -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -MMD -MP -Wall -Wextra -Werror -mfix-esp32-psram-cache-issue -D IDF_VER=\"v3.3.1\" " CACHE INTERNAL "c compiler flags minsizerel") -set(CMAKE_CXX_FLAGS_RELEASE " -Os -std=gnu++11 -g3 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -mfix-esp32-psram-cache-issue -DESP_PLATFORM " CACHE INTERNAL "cxx compiler flags release") -set(CMAKE_CXX_FLAGS_MINSIZEREL " -Os -std=gnu++11 -g3 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -mfix-esp32-psram-cache-issue -DESP_PLATFORM " CACHE INTERNAL "cxx compiler flags minsizerel") +set(CMAKE_C_FLAGS_RELEASE " -std=gnu99 -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -MMD -MP -Wall -Wextra -Werror -D IDF_VER=\"v3.3.5\" " CACHE INTERNAL "c compiler flags release") +set(CMAKE_C_FLAGS_MINSIZEREL " -std=gnu99 -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -MMD -MP -Wall -Wextra -Werror -D IDF_VER=\"v3.3.5\" " CACHE INTERNAL "c compiler flags minsizerel") +set(CMAKE_CXX_FLAGS_RELEASE " -Os -std=gnu++11 -g3 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -DESP_PLATFORM " CACHE INTERNAL "cxx compiler flags release") +set(CMAKE_CXX_FLAGS_MINSIZEREL " -Os -std=gnu++11 -g3 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Wextra -Werror -DESP_PLATFORM " CACHE INTERNAL "cxx compiler flags minsizerel") set(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm compiler flags release") set(CMAKE_EXE_LINKER_FLAGS_RELEASE " -nostdlib -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static " CACHE INTERNAL "linker flags release") diff --git a/CMakeLists.txt b/CMakeLists.txt index 24e17961c8..62e70a59bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,10 +202,10 @@ option(NF_FEATURE_LIGHT_MATH "option to build without complex math functions") if(NF_FEATURE_LIGHT_MATH) set(TARGET_LIGHT_MATH TRUE CACHE INTERNAL "Complex Math functions disabled") - message(STATUS "Complex math functions not available") + message(STATUS "Complex math functions available") else() set(TARGET_LIGHT_MATH FALSE CACHE INTERNAL "Complex Math functions enabled") - message(STATUS "Complex math functions available") + message(STATUS "Complex math functions not available") endif() ################################################################################### @@ -309,14 +309,6 @@ if(NF_FEATURE_HAS_SDCARD) # force inclusion of System.IO.FileSystem API set(API_System.IO.FileSystem ON CACHE INTERNAL "Forcing System.IO.FileSystem API option to ON") - if(RTOS_FREERTOS_ESP32_CHECK) - # can't System.IO.FileSystem API because of lack of suppporting configuration for FATFS. See issue #668 - message(WARNING "Can't use System.IO.FileSystem API in ESP32 targets because of FATFS config. See issue #668.") - - # force **REMOVAL** of System.IO.FileSystem API - set(API_System.IO.FileSystem OFF CACHE INTERNAL "Forcing **REMOVAL** of System.IO.FileSystem API option") - endif() - message(STATUS "Support for SD Card is included") else() message(STATUS "Support for SD Card **IS NOT** included") @@ -424,6 +416,15 @@ if(RTOS_CHIBIOS_CHECK) endif() ################################################################# +# Wire Protocol options +option(NF_WP_IMPLEMENTS_CRC32 "option to report if target implements CRC32 in Wire Protocol") + +# handle Wire Protocol _TRACE_ preferences, if any +option(NF_WP_TRACE_ERRORS "option to Trace errors with Wire Protocol") +option(NF_WP_TRACE_HEADERS "option to Trace headers with Wire Protocol") +option(NF_WP_TRACE_STATE "option to Trace state with Wire Protocol") +option(NF_WP_TRACE_NODATA "option to Trace empty packets with Wire Protocol") +option(NF_WP_TRACE_ALL "option to Trace with Wire Protocol") # reports Wire Protocol CRC32 implementation if(NF_WP_IMPLEMENTS_CRC32) @@ -504,7 +505,8 @@ endif() # and/or manage other APIs that are required if( API_nanoFramework.Devices.OneWire OR - API_Windows.Devices.SerialCommunication) + API_Windows.Devices.SerialCommunication OR + API_System.IO.Ports) set(HAL_USE_UART_OPTION TRUE CACHE INTERNAL "HAL OneWire for nanoFramework.Devices.OneWire") @@ -644,6 +646,7 @@ if( API_nanoFramework.Devices.OneWire OR API_System.Device.Gpio OR API_Windows.Devices.Gpio OR API_Windows.Devices.SerialCommunication OR + API_System.IO.Ports OR API_nanoFramework.Devices.Can OR API_Windows.Storage OR API_System.IO.FileSystem) @@ -802,7 +805,20 @@ elseif(RTOS_FREERTOS_CHECK) elseif(RTOS_FREERTOS_ESP32_CHECK) if(${TARGET_SERIES} STREQUAL "ESP32") - message(STATUS "Platform ESP32 target board: ${TARGET_BOARD}") + message(STATUS "Platform ESP32 target board: ${TARGET_BOARD} variant: ${TARGET_VARIANT}") + + if (NOT TARGET_VARIANT) + set(TARGET_VARIANT "generic" CACHE INTERNAL "Generic ESP32 build") + endif() + + # Only used by ESP32 at the moment + if(API_nanoFramework.Hardware.Esp32.Ble) + set(USE_ESP32_BLE TRUE CACHE INTERNAL "BLE Support") + message(STATUS "Support for BLE enabled") + else() + set(USE_ESP32_BLE FALSE CACHE INTERNAL "No BLE Support") + message(STATUS "Support for BLE disabled") + endif() # check watchdog feature # EPS32 build has watchdog enabled by default, so setting it to OFF doesn't make sense diff --git a/CMakeSettings.SAMPLE.json b/CMakeSettings.SAMPLE.json index be824677dd..cf9d9c6e18 100644 --- a/CMakeSettings.SAMPLE.json +++ b/CMakeSettings.SAMPLE.json @@ -30,12 +30,12 @@ }, { "name": "ESP32_IDF_PATH", - "value": "C:/ESP32_TOOLS/esp-idf-v3.3.1", + "value": "C:/ESP32_TOOLS/esp-idf-v3.3.5", "type": "PATH" }, { "name": "ESP32_LIBS_PATH", - "value": "C:/ESP32_TOOLS/libs-v3.3.1", + "value": "C:/ESP32_TOOLS/libs-v3.3.5", "type": "PATH" }, { @@ -213,11 +213,21 @@ "value": "True", "type": "BOOL" }, + { + "name": "API_System.Device.Gpio", + "value": "True", + "type": "BOOL" + }, { "name": "API_Windows.Devices.I2c", "value": "True", "type": "BOOL" }, + { + "name": "API_System.Device.I2c", + "value": "True", + "type": "BOOL" + }, { "name": "API_Windows.Devices.Pwm", "value": "True", @@ -228,6 +238,11 @@ "value": "True", "type": "BOOL" }, + { + "name": "API_System.IO.Ports", + "value": "True", + "type": "BOOL" + }, { "name": "API_Windows.Devices.Spi", "value": "True", @@ -478,11 +493,21 @@ "value": "True", "type": "BOOL" }, + { + "name": "API_System.Device.Gpio", + "value": "True", + "type": "BOOL" + }, { "name": "API_Windows.Devices.I2c", "value": "True", "type": "BOOL" }, + { + "name": "API_System.Device.I2c", + "value": "True", + "type": "BOOL" + }, { "name": "API_Windows.Devices.Pwm", "value": "True", @@ -493,6 +518,11 @@ "value": "True", "type": "BOOL" }, + { + "name": "API_System.IO.Ports", + "value": "True", + "type": "BOOL" + }, { "name": "API_Windows.Devices.Spi", "value": "True", diff --git a/CMakeSettings.json b/CMakeSettings.json index ce58f9a5b2..54705a6c50 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -119,6 +119,10 @@ "name": "API_Windows.Devices.Gpio", "value": "ON" }, + { + "name": "API_System.Device.Gpio", + "value": "ON" + }, { "name": "API_Windows.Devices.Spi", "value": "ON" @@ -131,6 +135,10 @@ "name": "API_Windows.Devices.I2c", "value": "ON" }, + { + "name": "API_System.Device.I2c", + "value": "ON" + }, { "name": "API_Windows.Devices.Pwm", "value": "ON" @@ -139,6 +147,10 @@ "name": "API_Windows.Devices.SerialCommunication", "value": "ON" }, + { + "name": "API_System.IO.Ports", + "value": "ON" + }, { "name": "API_Windows.Devices.Adc", "value": "ON" @@ -206,7 +218,7 @@ "PATH": "C:\\Windows\\system32;C:\\Program Files\\Espressif\\ESP-IDF Tools\\mconf-idf;c:\\python27;${env.PATH}", // ESP32 paths set up in environment so we can use in variables - "ESP32_IDF_VERSION": "v3.3.1", + "ESP32_IDF_VERSION": "v3.3.5", "ESP32_TOOLS": "C:/ESP32_TOOLS", "ESP32_IDF": "${env.ESP32_TOOLS}/esp-idf-${env.ESP32_IDF_VERSION}", "ESP32_LIB": "${env.ESP32_TOOLS}/libs-${env.ESP32_IDF_VERSION}", @@ -399,10 +411,18 @@ "name": "API_Windows.Devices.Gpio:BOOL", //OFF-default-ON-to-add-this-API "value": "ON" }, + { + "name": "API_System.Device.Gpio:BOOL", //OFF-default-ON-to-add-this-API + "value": "ON" + }, { "name": "API_Windows.Devices.I2c:BOOL", //OFF-default-ON-to-add-this-API "value": "ON" }, + { + "name": "API_System.Device.I2c:BOOL", //OFF-default-ON-to-add-this-API + "value": "ON" + }, { "name": "API_Windows.Devices.Pwm:BOOL", //OFF-default-ON-to-add-this-API "value": "ON" @@ -411,6 +431,10 @@ "name": "API_Windows.Devices.SerialCommunication:BOOL", //OFF-default-ON-to-add-this-API "value": "ON" }, + { + "name": "API_System.IO.Ports:BOOL", //OFF-default-ON-to-add-this-API + "value": "ON" + }, { "name": "API_Windows.Devices.Spi:BOOL", //OFF-default-ON-to-add-this-API "value": "ON" diff --git a/README.md b/README.md index 2b5fac8383..c39afb80e0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ The **preview** versions are continuous builds of the reference targets. They in | Target | Stable | Preview | |:-|---|---| | ESP32_WROOM_32 | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_WROOM_32/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_WROOM_32/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_WROOM_32/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_WROOM_32/latest/) | -| ESP_WROVER_KIT | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP_WROVER_KIT/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP_WROVER_KIT/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP_WROVER_KIT/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP_WROVER_KIT/latest/) | +| ESP32_WROOM_32_BLE | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_WROOM_32_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_WROOM_32_BLE/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_WROOM_32_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_WROOM_32_BLE/latest/) | +| ESP32_WROOM_32_V3_BLE | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_WROOM_32_V3_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_WROOM_32_V3_BLE/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_WROOM_32_V3_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_WROOM_32_V3_BLE/latest/) || ESP_WROVER_KIT | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP_WROVER_KIT/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP_WROVER_KIT/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP_WROVER_KIT/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP_WROVER_KIT/latest/) | | ESP32_PICO | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_PICO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_PICO/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_PICO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_PICO/latest/) | | ESP32_LILYGO | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_LILYGO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_LILYGO/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_LILYGO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_LILYGO/latest/) | | ST_STM32F429I_DISCOVERY | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ST_STM32F429I_DISCOVERY/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ST_STM32F429I_DISCOVERY/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ST_STM32F429I_DISCOVERY/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ST_STM32F429I_DISCOVERY/latest/) | @@ -44,22 +45,23 @@ The above firmware builds include support for the class libraries and features m
Click to expand! - | Target | Gpio | Spi | I2c | Pwm | Adc | Dac | Serial | OneWire | Events | SWO | Networking | Large Heap | UI | - |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: | - | ESP32_WROOM_32 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | - | ESP_WROVER_KIT | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | ESP32_PICO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | - | ESP32_LILYGO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: Wifi + Ethernet | :heavy_check_mark: | | - | ST_STM32F429I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | - | ST_NUCLEO64_F091RC | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | - | ST_STM32F769I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | ORGPAL_PALTHREE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | MBN_QUAIL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | - | NETDUINO3_WIFI | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | - | TI_CC1352R1_LAUNCHXL_868 | :heavy_check_mark: | | | | | | | | | | | | | - | TI_CC1352R1_LAUNCHXL_915 | :heavy_check_mark: | | | | | | | | | | | | | - | TI_CC3220SF_LAUNCHXL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | :heavy_check_mark: | | :heavy_check_mark: | | | - | NXP_MIMXRT1060_EVK | :heavy_check_mark: | | | | | | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | + | Target | Gpio | Spi | I2c | Pwm | Adc | Dac | Serial | OneWire | Events | SWO | Networking | Bluetooth BLE | Large Heap | UI | + |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: | + | ESP32_WROOM_32 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | | + | ESP32_WROOM_32_BLE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | + | ESP32_WROOM_32_V3_BLE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | + | ESP_WROVER_KIT | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | + | ESP32_PICO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | + | ESP32_LILYGO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: Wifi + Ethernet | :heavy_check_mark: | | | + | ST_STM32F429I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | | + | ST_NUCLEO64_F091RC | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | + | ST_STM32F769I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | + | ORGPAL_PALTHREE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | + | MBN_QUAIL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | | + | NETDUINO3_WIFI | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | | + | TI_CC1352R1_LAUNCHXL | :heavy_check_mark: | | | | | | | | | | | | | | + | TI_CC3220SF_LAUNCHXL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | :heavy_check_mark: | | :heavy_check_mark: | | | | + | NXP_MIMXRT1060_EVK | :heavy_check_mark: | | | | | | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | |
diff --git a/README.zh-cn.md b/README.zh-cn.md index 772f5e1ada..7966df90cb 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -26,6 +26,8 @@ | 目标 | 稳定 | 预览 | |:-|---|---| | ESP32_WROOM_32 | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_WROOM_32/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_WROOM_32/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_WROOM_32/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_WROOM_32/latest/) | +| ESP32_WROOM_32_BLE | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_WROOM_32_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_WROOM_32_BLE/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_WROOM_32_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_WROOM_32_BLE/latest/) | +| ESP32_WROOM_32_V3_BLE | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_WROOM_32_V3_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_WROOM_32_V3_BLE/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_WROOM_32_V3_BLE/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_WROOM_32_V3_BLE/latest/) | | ESP_WROVER_KIT | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP_WROVER_KIT/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP_WROVER_KIT/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP_WROVER_KIT/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP_WROVER_KIT/latest/) | | ESP32_PICO | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_PICO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_PICO/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_PICO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_PICO/latest/) | | ESP32_LILYGO | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images/raw/ESP32_LILYGO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images/packages/detail/raw/ESP32_LILYGO/latest/) | [![Latest Version @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/net-nanoframework/nanoframework-images-dev/raw/ESP32_LILYGO/latest/x/?render=true)](https://cloudsmith.io/~net-nanoframework/repos/nanoframework-images-dev/packages/detail/raw/ESP32_LILYGO/latest/) | @@ -44,22 +46,23 @@
点击展开 - | Target | Gpio | Spi | I2c | Pwm | Adc | Dac | Serial | OneWire | Events | SWO | Networking | Large Heap | UI | - |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: | - | ESP32_WROOM_32 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | - | ESP_WROVER_KIT | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | ESP32_PICO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | - | ESP32_LILYGO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: Wifi + Ethernet | :heavy_check_mark: | | - | ST_STM32F429I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | - | ST_NUCLEO64_F091RC | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | - | ST_STM32F769I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | ORGPAL_PALTHREE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | - | MBN_QUAIL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | - | NETDUINO3_WIFI | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | - | TI_CC1352R1_LAUNCHXL_868 | :heavy_check_mark: | | | | | | | | | | | | | - | TI_CC1352R1_LAUNCHXL_915 | :heavy_check_mark: | | | | | | | | | | | | | - | TI_CC3220SF_LAUNCHXL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | :heavy_check_mark: | | :heavy_check_mark: | | | - | NXP_MIMXRT1060_EVK | :heavy_check_mark: | | | | | | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | + | Target | Gpio | Spi | I2c | Pwm | Adc | Dac | Serial | OneWire | Events | SWO | Networking | Bluetooth BLE | Large Heap | UI | + |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: |:-: | + | ESP32_WROOM_32 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | | + | ESP32_WROOM_32_BLE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | + | ESP32_WROOM_32_V3_BLE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | + | ESP_WROVER_KIT | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | + | ESP32_PICO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | | | + | ESP32_LILYGO | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: Wifi + Ethernet | :heavy_check_mark: | | | + | ST_STM32F429I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | | + | ST_NUCLEO64_F091RC | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | + | ST_STM32F769I_DISCOVERY | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | + | ORGPAL_PALTHREE | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | | + | MBN_QUAIL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | | + | NETDUINO3_WIFI | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | | | + | TI_CC1352R1_LAUNCHXL | :heavy_check_mark: | | | | | | | | | | | | | | + | TI_CC3220SF_LAUNCHXL | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | :heavy_check_mark: | | :heavy_check_mark: | | | | + | NXP_MIMXRT1060_EVK | :heavy_check_mark: | | | | | | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | | :heavy_check_mark: | |
diff --git a/azure-pipelines-templates/build-chibios-stm32.yml b/azure-pipelines-templates/build-chibios-stm32.yml index 1e6d69bcf7..b9ccaecf33 100644 --- a/azure-pipelines-templates/build-chibios-stm32.yml +++ b/azure-pipelines-templates/build-chibios-stm32.yml @@ -7,21 +7,35 @@ parameters: steps: - task: CMake@1 + displayName: Setup CMake (DFU, no SRecord) + condition: and(eq(variables['NeedsDFU'], true), eq(variables['NeedsSRECORD'], 'false')) inputs: - cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.arm-none-eabi.cmake -DTOOLCHAIN_PREFIX=$(GNU_GCC_TOOLCHAIN_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) $(BuildOptions) -DTARGET_NAME=$(TargetPublishName) -DTOOL_HEX2DFU_PREFIX=$(HEX2DFU_PATH) ..' + cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.arm-none-eabi.cmake -DTOOLCHAIN_PREFIX=$(GNU_GCC_TOOLCHAIN_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) -DTARGET_NAME=$(TargetPublishName) -DTOOL_HEX2DFU_PREFIX=$(HEX2DFU_PATH) $(BuildOptions) ..' workingDirectory: ${{ parameters.buildDirectory }} - displayName: Setup build with CMake and DFU - condition: eq(variables['NeedsDFU'], true) - task: CMake@1 + displayName: Setup CMake build (SRecord, no DFU) + condition: and(eq(variables['NeedsSRECORD'], true), eq(variables['NeedsDFU'], false)) + inputs: + cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.arm-none-eabi.cmake -DTOOLCHAIN_PREFIX=$(GNU_GCC_TOOLCHAIN_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) -DTARGET_NAME=$(TargetPublishName) -DTOOL_SRECORD_PREFIX=$(SRECORD_PATH)/srecord/ $(BuildOptions) ..' + workingDirectory: ${{ parameters.buildDirectory }} + + - task: CMake@1 + displayName: Setup CMake build (DFU and SRecord) + condition: and(eq(variables['NeedsDFU'], true), eq(variables['NeedsSRECORD'], true)) + inputs: + cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.arm-none-eabi.cmake -DTOOLCHAIN_PREFIX=$(GNU_GCC_TOOLCHAIN_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) -DTARGET_NAME=$(TargetPublishName) -DTOOL_HEX2DFU_PREFIX=$(HEX2DFU_PATH) -DTOOL_SRECORD_PREFIX=$(SRECORD_PATH)/srecord/ $(BuildOptions) ..' + workingDirectory: ${{ parameters.buildDirectory }} + + - task: CMake@1 + displayName: Setup CMake build (no DFU, no SRecord) + condition: and(eq(variables['NeedsDFU'], false), eq(variables['NeedsSRECORD'], false)) inputs: cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.arm-none-eabi.cmake -DTOOLCHAIN_PREFIX=$(GNU_GCC_TOOLCHAIN_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) -DTARGET_NAME=$(TargetPublishName) $(BuildOptions) ..' workingDirectory: ${{ parameters.buildDirectory }} - displayName: Setup build with CMake without DFU - condition: eq(variables['NeedsDFU'], false) - task: CMake@1 + displayName: Build with CMake inputs: cmakeArgs: '--build ${{ parameters.buildDirectory }} --target all --config MinSizeRel' workingDirectory: ${{ parameters.buildDirectory }} - displayName: Build with CMake diff --git a/azure-pipelines-templates/build-esp32.yml b/azure-pipelines-templates/build-esp32.yml index 83f13960a8..6a7216c860 100644 --- a/azure-pipelines-templates/build-esp32.yml +++ b/azure-pipelines-templates/build-esp32.yml @@ -8,7 +8,7 @@ parameters: steps: - task: CMake@1 inputs: - cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.xtensa-esp32-elf.cmake -DTOOLCHAIN_PREFIX=$(ESP32_TOOLCHAIN_PATH) -DESP32_IDF_PATH=$(ESP32_IDF_PATH) -DESP32_LIBS_PATH=$(ESP32_LIBS_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) $(BuildOptions) ..' + cmakeArgs: '-G Ninja -DCMAKE_TOOLCHAIN_FILE=CMake/toolchain.xtensa-esp32-elf.cmake -DTOOLCHAIN_PREFIX=$(ESP32_TOOLCHAIN_PATH) -DESP32_IDF_PATH=$(ESP32_IDF_PATH) -DESP32_LIBS_PATH=$(ESP32_LIBS_PATH) -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_VERSION=$(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(TARGET_BUILD_COUNTER) -DTARGET_BOARD=$(TargetBoard) -DTARGET_NAME=$(TargetPublishName) $(BuildOptions) ..' workingDirectory: ${{ parameters.buildDirectory }} displayName: Setup build with CMake @@ -25,7 +25,7 @@ steps: displayName: Generate nanoCLR bin file for deployment inputs: scriptSource: 'filePath' - scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.1\components\esptool_py\esptool\esptool.py' + scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.5\components\esptool_py\esptool\esptool.py' arguments: '--chip esp32 elf2image --flash_mode dio --flash_freq 40m --flash_size 4MB -o ${{ parameters.buildDirectory }}\nanoCLR.bin ${{ parameters.buildDirectory }}\nanoCLR.elf' - task: PythonScript@0 @@ -33,14 +33,14 @@ steps: displayName: Generate Esp32 Partition tables for 16MB flash inputs: scriptSource: 'filePath' - scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.1\components\partition_table\gen_esp32part.py' + scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.5\components\partition_table\gen_esp32part.py' arguments: '--verify ${{ parameters.partitionsDirectory }}\IDF\partitions_nanoclr_16mb.csv ${{ parameters.buildDirectory }}\partitions_16mb.bin' - task: PythonScript@0 condition: succeeded() displayName: Generate Esp32 Partition tables for 8MB flash inputs: scriptSource: 'filePath' - scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.1\components\partition_table\gen_esp32part.py' + scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.5\components\partition_table\gen_esp32part.py' arguments: '--verify ${{ parameters.partitionsDirectory }}\IDF\partitions_nanoclr_8mb.csv ${{ parameters.buildDirectory }}\partitions_8mb.bin' - task: PythonScript@0 @@ -48,7 +48,7 @@ steps: displayName: Generate Esp32 Partition tables for 4MB flash inputs: scriptSource: 'filePath' - scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.1\components\partition_table\gen_esp32part.py' + scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.5\components\partition_table\gen_esp32part.py' arguments: '--verify ${{ parameters.partitionsDirectory }}\IDF\partitions_nanoclr_4mb.csv ${{ parameters.buildDirectory }}\partitions_4mb.bin' - task: PythonScript@0 @@ -56,7 +56,7 @@ steps: displayName: Generate Esp32 Partition tables for 2MB flash inputs: scriptSource: 'filePath' - scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.1\components\partition_table\gen_esp32part.py' + scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.5\components\partition_table\gen_esp32part.py' arguments: '--verify ${{ parameters.partitionsDirectory }}\IDF\partitions_nanoclr_2mb.csv ${{ parameters.buildDirectory }}\partitions_2mb.bin' - task: PythonScript@0 @@ -64,5 +64,5 @@ steps: displayName: List flash 4Mb Esp32 Partition tables inputs: scriptSource: 'filePath' - scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.1\components\partition_table\gen_esp32part.py' + scriptPath: '$(Agent.TempDirectory)\ESP32_Tools\esp-idf-v3.3.5\components\partition_table\gen_esp32part.py' arguments: '${{ parameters.buildDirectory }}\partitions_4mb.bin' diff --git a/azure-pipelines-templates/download-install-esp32-build-components.yml b/azure-pipelines-templates/download-install-esp32-build-components.yml index 1adda34c78..b5bd869321 100644 --- a/azure-pipelines-templates/download-install-esp32-build-components.yml +++ b/azure-pipelines-templates/download-install-esp32-build-components.yml @@ -4,8 +4,8 @@ steps: - task: Cache@2 inputs: - key: '3-3-1 | esp331ToolsKey' - restoreKeys: esp331ToolchainKey + key: '3-3-5V2 | esp335ToolsKey' + restoreKeys: esp335ToolchainKey path: $(Agent.TempDirectory)\ESP32_Tools cacheHitVar: ESP_TOOLS_CACHE_RESTORED displayName: Cache ESP32 tools @@ -40,6 +40,22 @@ steps: destinationFolder: '$(Agent.TempDirectory)\ESP32_Tools\libs' cleanDestinationFolder: false + - task: ExtractFiles@1 + condition: ne(variables.ESP_TOOLS_CACHE_RESTORED, 'true') + displayName: Installing ESP32 pre-compiled libs BLE + inputs: + archiveFilePatterns: '$(Agent.TempDirectory)\esp-idf-libs_BLE.zip' + destinationFolder: '$(Agent.TempDirectory)\ESP32_Tools\libs_BLE' + cleanDestinationFolder: false + + - task: ExtractFiles@1 + condition: ne(variables.ESP_TOOLS_CACHE_RESTORED, 'true') + displayName: Installing ESP32 pre-compiled libs V3 + inputs: + archiveFilePatterns: '$(Agent.TempDirectory)\esp-idf-libs_V3.zip' + destinationFolder: '$(Agent.TempDirectory)\ESP32_Tools\libs_V3' + cleanDestinationFolder: false + - task: PowerShell@2 displayName: Downloading & install ESP32 IDF inputs: diff --git a/azure-pipelines-templates/download-install-llvm.yml b/azure-pipelines-templates/download-install-llvm.yml index 74bf78a870..1558e9ec7f 100644 --- a/azure-pipelines-templates/download-install-llvm.yml +++ b/azure-pipelines-templates/download-install-llvm.yml @@ -2,23 +2,32 @@ # See LICENSE file in the project root for full license information. steps: - - task: PowerShell@2 - displayName: Downloading LLVM 10.0 + - task: Cache@2 condition: eq(variables['Build.Reason'], 'PullRequest') + displayName: Cache LLVM + inputs: + key: 'llvm_12_0_0_0 | llvmUpdateKey' + restoreKeys: llvmUpdateKey + path: $(Agent.TempDirectory)\llvm + cacheHitVar: LLVM_CACHE_RESTORED + + - task: PowerShell@2 + displayName: Downloading LLVM 12.0 + condition: and(eq(variables['Build.Reason'], 'PullRequest'), ne(variables.LLVM_CACHE_RESTORED, 'true')) inputs: targetType: 'inline' script: | - $url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe" - $output = "$(Agent.TempDirectory)\LLVM-10.0.0-win64.exe" + $url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/LLVM-12.0.0-win64.exe" + $output = "$(Agent.TempDirectory)\LLVM-12.0.0-win64.exe" (New-Object Net.WebClient).DownloadFile($url, $output) errorActionPreference: 'stop' failOnStderr: 'true' - task: ExtractFiles@1 - displayName: Install LLVM 10 - condition: eq(variables['Build.Reason'], 'PullRequest') + displayName: Install LLVM 12 + condition: and(eq(variables['Build.Reason'], 'PullRequest'), ne(variables.LLVM_CACHE_RESTORED, 'true')) inputs: - archiveFilePatterns: '$(Agent.TempDirectory)\LLVM-10.0.0-win64.exe' + archiveFilePatterns: '$(Agent.TempDirectory)\LLVM-12.0.0-win64.exe' destinationFolder: '$(Agent.TempDirectory)\llvm' - script: echo "##vso[task.prependpath]$(Agent.TempDirectory)\llvm\bin" diff --git a/azure-pipelines-templates/nb-gitversioning.yml b/azure-pipelines-templates/nb-gitversioning.yml index ca9d69554d..71e8bef73a 100644 --- a/azure-pipelines-templates/nb-gitversioning.yml +++ b/azure-pipelines-templates/nb-gitversioning.yml @@ -3,7 +3,7 @@ steps: - task: DotNetCoreCLI@2 - condition: ne(variables['system.pullrequest.isfork'], true) + condition: succeeded() displayName: Install NBGV tool inputs: command: custom @@ -11,24 +11,21 @@ steps: arguments: install --tool-path . nbgv - script: nbgv cloud -a -c - condition: ne(variables['system.pullrequest.isfork'], true) + condition: succeeded() displayName: Set build number - # Currently Azure pipelines won't let PRs from forks setting the build ID - # so we need to come up with a version number to use for the build + # Force version number for PRs - task: PowerShell@2 - condition: eq(variables['system.pullrequest.isfork'], true) + condition: ne(variables['system.pullrequest.pullRequestId'], '') displayName: Set temporary build number inputs: targetType: 'inline' script: | Write-Host "$("##vso[task.setvariable variable=NBGV_Version]")0.0.0" Write-Host "$("##vso[task.setvariable variable=NBGV_VersionMajor]")0" - Write-Host "$("##vso[task.setvariable variable=NBGV_VersionMinor]")0" - Write-Host "$("##vso[task.setvariable variable=NBGV_BuildNumber]")0" - Write-Host "$("##vso[task.setvariable variable=NBGV_VersionHeight]")$env:System_PullRequest_PullRequestNumber" + Write-Host "$("##vso[task.setvariable variable=NBGV_VersionMinor]")$env:System_PullRequest_PullRequestNumber" Write-Host "$("##vso[task.setvariable variable=NBGV_AssemblyInformationalVersion]")00000000000" - Write-Host "$("##vso[task.setvariable variable=NBGV_NuGetPackageVersion]")0.0.0-alpha.$env:System_PullRequest_PullRequestNumber" + Write-Host "$("##vso[task.setvariable variable=NBGV_NuGetPackageVersion]")0.0.$env:System_PullRequest_PullRequestNumber-alpha.$env:NBGV_BuildNumber" - task: PowerShell@2 displayName: Get target build counter @@ -47,4 +44,3 @@ steps: { Write-Host "$("##vso[task.setvariable variable=TARGET_BUILD_COUNTER]")$version" } - diff --git a/azure-pipelines-templates/publish-cloudsmith.yml b/azure-pipelines-templates/publish-cloudsmith.yml index 274a0f7231..71a5af752b 100644 --- a/azure-pipelines-templates/publish-cloudsmith.yml +++ b/azure-pipelines-templates/publish-cloudsmith.yml @@ -42,7 +42,7 @@ steps: inputs: sourceFolder: $(Agent.TempDirectory) Contents: | - *.zip + $(Agent.TempDirectory)\$(TargetPublishName)-$(NBGV_SimpleVersion)-preview.$(TARGET_BUILD_COUNTER).zip TargetFolder: '$(Build.ArtifactStagingDirectory)\$(TargetPublishName)' flattenFolders: true @@ -115,6 +115,8 @@ steps: # install Cloudsmith CLI python -m pip install --upgrade cloudsmith-cli + Write-Host "Uploading $(PUBLISHING_PACKAGE_NAME) v$(PACKAGE_VERSION)" + cloudsmith push raw net-nanoframework/$(CLOUDSMITH_REPO) $(Agent.TempDirectory)\$(PUBLISHING_PACKAGE_NAME).zip --name $(TargetPublishName) --version $(PACKAGE_VERSION) -k $(CLOUDSMITH_KEY) errorActionPreference: 'stop' diff --git a/azure-pipelines-templates/publish-win32-nanoclr.yml b/azure-pipelines-templates/publish-win32-nanoclr.yml index 018b9fab5b..a9236502ca 100644 --- a/azure-pipelines-templates/publish-win32-nanoclr.yml +++ b/azure-pipelines-templates/publish-win32-nanoclr.yml @@ -8,7 +8,7 @@ steps: # execute on 'ForceUpload' parameter - task: PowerShell@2 - condition: or( eq(variables['ForceUpload'], true), and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), or( eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], ''), contains(variables['Build.SourceBranchName'], 'release') ) ) ) + condition: or( eq(variables['ForceUpload'], true), and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), or( eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], ''), contains(variables['Build.SourceBranchName'], 'release') ) ) ) displayName: Set Cloudsmith repo path inputs: targetType: 'inline' @@ -22,14 +22,14 @@ steps: if( $env:Build_SourceBranchName -match "^develop*" -or $env:Build_SourceBranchName -match "^release*" ) { - # this a dev or release branch, publish to Bintray dev repo + # this a dev or release branch, publish to Cloudsmith dev repo Write-Host "$("##vso[task.setvariable variable=CLOUDSMITH_REPO]")nanoframework-images-dev" # set version Write-Host "$("##vso[task.setvariable variable=PACKAGE_VERSION]")$(NBGV_NuGetPackageVersion)" } else { - # this branch, publish to Bintray stable repo + # this main branch, publish to Cloudsmith stable repo Write-Host "$("##vso[task.setvariable variable=CLOUDSMITH_REPO]")nanoframework-images" # set version Write-Host "$("##vso[task.setvariable variable=PACKAGE_VERSION]")$(NBGV_AssemblyVersion)" @@ -38,7 +38,7 @@ steps: failOnStderr: 'true' - task: PowerShell@2 - condition: or( eq(variables['ForceUpload'], true), and( succeeded(), ne(variables['Build.Reason'], 'PullRequest'), or( eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], ''), contains(variables['Build.SourceBranchName'], 'release') ) ) ) + condition: or( eq(variables['ForceUpload'], true), and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), or( eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], ''), contains(variables['Build.SourceBranchName'], 'release') ) ) ) displayName: Upload WIN32 nanoCLR to Cloudsmith inputs: targetType: 'inline' @@ -50,6 +50,8 @@ steps: # install Cloudsmith CLI python -m pip install --upgrade cloudsmith-cli + Write-Host "Uploading nanoFramework.nanoCLR.exe v$(PACKAGE_VERSION)" + cloudsmith push raw net-nanoframework/$(CLOUDSMITH_REPO) $(Build.ArtifactStagingDirectory)\$(TargetPublishName)\nanoFramework.nanoCLR.exe --name $(TargetPublishName) --version $(PACKAGE_VERSION) -k $(CLOUDSMITH_KEY) errorActionPreference: 'stop' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 036f57d52c..d23bab64bd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,6 +22,9 @@ jobs: pool: vmImage: 'windows-2019' + variables: + DOTNET_NOLOGO: true + steps: - checkout: self fetchDepth: 1 @@ -266,31 +269,37 @@ jobs: matrix: NETDUINO3_WIFI: TargetBoard: NETDUINO3_WIFI - BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=OFF -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON + BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=OFF -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON GccArm_Version: NeedsDFU: true + NeedsSRECORD: false ORGPAL_PALTHREE: TargetBoard: ORGPAL_PALTHREE - BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DCHIBIOS_CONTRIB_REQUIRED=ON -DSTM32_CUBE_PACKAGE_REQUIRED=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_USB_MSD=ON -DNF_FEATURE_HAS_SDCARD=ON -DNF_FEATURE_USE_SPIFFS=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON + BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DCHIBIOS_CONTRIB_REQUIRED=ON -DSTM32_CUBE_PACKAGE_REQUIRED=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_USB_MSD=ON -DNF_FEATURE_HAS_SDCARD=ON -DNF_FEATURE_USE_SPIFFS=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON GccArm_Version: NeedsDFU: true + NeedsSRECORD: false ST_STM32F429I_DISCOVERY: TargetBoard: ST_STM32F429I_DISCOVERY - BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON + BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON GccArm_Version: NeedsDFU: false + NeedsSRECORD: false ST_NUCLEO64_F091RC: TargetBoard: ST_NUCLEO64_F091RC - BuildOptions: -DTARGET_SERIES=STM32F0xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DUSE_RNG=OFF -DNF_PLATFORM_NO_CLR_TRACE=ON -DNF_CLR_NO_IL_INLINE=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_nanoFramework.System.Text=ON + BuildOptions: -DTARGET_SERIES=STM32F0xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DUSE_RNG=OFF -DNF_PLATFORM_NO_CLR_TRACE=ON -DNF_CLR_NO_IL_INLINE=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_nanoFramework.System.Text=ON GccArm_Version: NeedsDFU: false + NeedsSRECORD: true ST_STM32F769I_DISCOVERY: TargetBoard: ST_STM32F769I_DISCOVERY - BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON -DAPI_System.IO.FileSystem=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Graphics=ON -DGRAPHICS_MEMORY=Graphics_Memory.cpp -DGRAPHICS_DISPLAY=Otm8009a_DSI_Video_Mode.cpp -DGRAPHICS_DISPLAY_INTERFACE=DSI_To_Display_Video_Mode.cpp -DTOUCHPANEL_DEVICE=ft6x06_I2C.cpp -DTOUCHPANEL_INTERFACE=I2C_To_TouchPanel.cpp + BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Device.Dac=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON -DAPI_System.IO.FileSystem=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Graphics=ON -DGRAPHICS_MEMORY=Graphics_Memory.cpp -DGRAPHICS_DISPLAY=Otm8009a_DSI_Video_Mode.cpp -DGRAPHICS_DISPLAY_INTERFACE=DSI_To_Display_Video_Mode.cpp -DTOUCHPANEL_DEVICE=ft6x06_I2C.cpp -DTOUCHPANEL_INTERFACE=I2C_To_TouchPanel.cpp GccArm_Version: - NeedsDFU: false + NeedsDFU: false + NeedsSRECORD: true variables: + DOTNET_NOLOGO: true # creates a counter and assigns it to the revision variable REVISION: $[counter('STM32_versioncounter', 0)] GNU_GCC_TOOLCHAIN_PATH: $(Agent.TempDirectory)\GNU_Tools_ARM_Embedded @@ -301,6 +310,7 @@ jobs: - template: azure-pipelines-templates/nb-gitversioning.yml - template: azure-pipelines-templates/download-install-arm-gcc-toolchain.yml - template: azure-pipelines-templates/download-install-ninja.yml + - template: azure-pipelines-templates/download-srecord.yml - template: azure-pipelines-templates/download-hexdfu.yml - template: azure-pipelines-templates/build-chibios-stm32.yml - template: azure-pipelines-templates/pack-publish-artifacts.yml @@ -324,21 +334,30 @@ jobs: matrix: ESP32_WROOM_32: TargetBoard: ESP32_WROOM_32 - BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON + BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.IO.FileSystem=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON + ESP32_WROOM_32_BLE: + TargetBoard: ESP32_WROOM_32 + BuildOptions: -DTARGET_SERIES=ESP32 -DTARGET_VARIANT=BLE -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.IO.FileSystem=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON -DAPI_nanoFramework.Hardware.Esp32.Ble=ON + PackageName: ESP32_WROOM_32_BLE + ESP32_WROOM_32_V3: + TargetBoard: ESP32_WROOM_32 + BuildOptions: -DTARGET_SERIES=ESP32 -DTARGET_VARIANT=V3 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.IO.FileSystem=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON -DAPI_nanoFramework.Hardware.Esp32.Ble=ON + PackageName: ESP32_WROOM_32_V3_BLE ESP_WROVER_KIT: TargetBoard: ESP32_WROOM_32 - BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_nanoFramework.Graphics=ON -DGRAPHICS_DISPLAY="ILI9341_240x320_SPI.cpp" -DTOUCHPANEL_DEVICE="XPT2046.cpp" -DGRAPHICS_DISPLAY_INTERFACE="Spi_To_Display.cpp" -DTOUCHPANEL_INTERFACE="Spi_To_TouchPanel.cpp" -DAPI_System.Device.Dac=ON + BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.IO.FileSystem=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_nanoFramework.Graphics=ON -DGRAPHICS_DISPLAY="ILI9341_240x320_SPI.cpp" -DTOUCHPANEL_DEVICE="XPT2046.cpp" -DGRAPHICS_DISPLAY_INTERFACE="Spi_To_Display.cpp" -DTOUCHPANEL_INTERFACE="Spi_To_TouchPanel.cpp" -DAPI_System.Device.Dac=ON PackageName: ESP_WROVER_KIT ESP32_PICO: TargetBoard: ESP32_WROOM_32 - BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DTARGET_SERIAL_BAUDRATE=115200 -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON + BuildOptions: -DTARGET_SERIES=ESP32 -DTARGET_VARIANT=BLE -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DTARGET_SERIAL_BAUDRATE=115200 -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.IO.FileSystem=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON -DAPI_nanoFramework.Hardware.Esp32.Ble=ON PackageName: ESP32_PICO ESP32_LILYGO: TargetBoard: ESP32_WROOM_32 - BuildOptions: -DTARGET_SERIES=ESP32 -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON -DESP32_ETHERNET_SUPPORT=ON -DESP32_CONFIG_PIN_PHY_POWER=5 -DESP32_CONFIG_PHY_CLOCK_MODE=ETH_CLOCK_GPIO17_OUT + BuildOptions: -DTARGET_SERIES=ESP32 -DTARGET_VARIANT=BLE -DRTOS=FREERTOS_ESP32 -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.IO.FileSystem=ON -DAPI_System.Math=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_System.Device.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.Wifi=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_Hardware.Esp32=ON -DSUPPORT_ANY_BASE_CONVERSION=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON -DAPI_nanoFramework.Hardware.Esp32.Rmt=ON -DAPI_System.Device.Dac=ON -DAPI_nanoFramework.Hardware.Esp32.Ble=ON -DESP32_ETHERNET_SUPPORT=ON -DESP32_CONFIG_PIN_PHY_POWER=5 -DESP32_CONFIG_PHY_CLOCK_MODE=ETH_CLOCK_GPIO17_OUT PackageName: ESP32_LILYGO variables: + DOTNET_NOLOGO: true # creates a counter and assigns it to the revision variable REVISION: $[counter('ESP32_versioncounter', 0)] ESP32_TOOLCHAIN_PATH: $(Agent.TempDirectory)\ESP32_Tools\xtensa-esp32-elf @@ -379,11 +398,12 @@ jobs: matrix: NXP_MIMXRT1060_EVK: TargetBoard: NXP_MIMXRT1060_EVK - BuildOptions: -DTARGET_SERIES=IMXRT10xx -DRTOS=FREERTOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON + BuildOptions: -DTARGET_SERIES=IMXRT10xx -DRTOS=FREERTOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_SDCARD=ON -DAPI_System.Math=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_System.Net=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_System.IO.Ports=ON -DAPI_Windows.Devices.I2c=ON -DAPI_System.Device.I2c=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.System.Text=ON GccArm_Version: NeedsSRECORD: true variables: + DOTNET_NOLOGO: true # creates a counter and assigns it to the revision variable REVISION: $[counter('NXP_versioncounter', 0)] GNU_GCC_TOOLCHAIN_PATH: $(Agent.TempDirectory)\GNU_Tools_ARM_Embedded @@ -422,15 +442,16 @@ jobs: TI_CC1352R1_LAUNCHXL_868: TargetBoard: TI_CC1352R1_LAUNCHXL PackageName: TI_CC1352R1_LAUNCHXL_868 - BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DRADIO_FREQUENCY=868 -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON + BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DRADIO_FREQUENCY=868 -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_System.IO.Ports=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON GccArm_Version: TI_CC1352R1_LAUNCHXL_915: TargetBoard: TI_CC1352R1_LAUNCHXL PackageName: TI_CC1352R1_LAUNCHXL_915 - BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DRADIO_FREQUENCY=915 -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON + BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DRADIO_FREQUENCY=915 -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_System.IO.Ports=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON GccArm_Version: variables: + DOTNET_NOLOGO: true # creates a counter and assigns it to the revision variable REVISION: $[counter('TI_versioncounter', 0)] GNU_GCC_TOOLCHAIN_PATH: $(Agent.TempDirectory)\GNU_Tools_ARM_Embedded @@ -459,6 +480,7 @@ jobs: vmImage: 'windows-2019' variables: + DOTNET_NOLOGO: true TargetPublishName: WIN32_nanoCLR # creates a counter and assigns it to the revision variable REVISION: $[counter('WIN32_versioncounter', 0)] @@ -466,10 +488,7 @@ jobs: steps: - template: azure-pipelines-templates/nb-gitversioning.yml - - task: NuGetToolInstaller@0 - inputs: - versionSpec: '5.8.0' - displayName: 'Install specific version of NuGet' + - template: azure-pipelines-templates/install-nuget.yml@templates - task: VSBuild@1 inputs: @@ -503,7 +522,7 @@ jobs: - task: NuGetCommand@2 condition: succeeded() - displayName: Pack managed helpers NuGet + displayName: Pack nanoCLR WIN32 inputs: command: 'custom' arguments: 'pack targets\win32\nanoFramework.nanoCLR.Win32.nuspec -Version $(NBGV_NuGetPackageVersion)' @@ -545,7 +564,7 @@ jobs: # publish artifacts (only possible if this is not a PR originated on a fork) - task: PublishBuildArtifacts@1 - condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) ) + condition: succeeded() displayName: Publish deployables artifacts inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' @@ -554,7 +573,7 @@ jobs: # push NuGet packages to Azure Artifacts feed (always happens except on PR builds) - task: NuGetCommand@2 - condition: and( succeeded(), ne( variables['StartReleaseCandidate'], true ) ) + condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') ) continueOnError: true displayName: Push NuGet packages to Azure Artifacts inputs: @@ -681,10 +700,10 @@ jobs: githubRepositoryName: nf-interpreter githubTag: v$(NBGV_AssemblyVersion) githubReleaseTitle: 'nf Interpreter v$(NBGV_AssemblyVersion)' - githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).

Download images from our Bintray repo. See the available images [here](https://github.com/nanoframework/nf-interpreter/tree/main#firmware-for-reference-boards).' + githubReleaseNotes: 'Check the [changelog]($(Build.Repository.Uri)/blob/$(Build.SourceBranchName)/CHANGELOG.md).

Download images from our Cloudsmith repo. See the available images [here](https://github.com/nanoframework/nf-interpreter/tree/main#firmware-for-reference-boards).' githubTargetCommitsh: $(Build.SourceVersion) githubReleaseDraft: false - githubReleasePrerelease: true + githubReleasePrerelease: false githubReuseDraftOnly: false githubReuseRelease: true githubEditRelease: true diff --git a/install-scripts/Initialize-VSCode.ps1 b/install-scripts/Initialize-VSCode.ps1 index a123cd1f0a..37c2cf168e 100644 --- a/install-scripts/Initialize-VSCode.ps1 +++ b/install-scripts/Initialize-VSCode.ps1 @@ -94,7 +94,7 @@ function Main { Main # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAeOGy/owfZYFDE # gTa2efiijcH6YjCvgf/Ysojsbnz8DKCCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -172,7 +172,7 @@ Main # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxz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gHAuj1QVPMk62uR1GaEob/nyy4ZuLKlqcZG6b +# NYfUjQPalW3kKQWlDrJb14d+PUMSlIBTfSbvFddJf05ZIWXUBGNduqKHOPD04uFc +# lG+ioLvdQqN9aIr0YM4JJiM4SvWxCWjjkT5NqfU4f9G+awXgWc2Hu+i6H/Xnh2Q= # SIG # End signature block diff --git a/install-scripts/Set-PathVariable.ps1 b/install-scripts/Set-PathVariable.ps1 index 747b94de08..1957c48d1f 100644 --- a/install-scripts/Set-PathVariable.ps1 +++ b/install-scripts/Set-PathVariable.ps1 @@ -78,7 +78,7 @@ Process { #> # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDFUKebt6WOPibV # 7sup6j+cocD6NAZxrqMcn5YBKZR3YKCCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -156,7 +156,7 @@ Process { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFBy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2bzMBerEYJm1nwRn5bTHpZmqaJo25cSN9ufsznsZZkUgXim2AF1i0I +# /+QUbriIglyn3cIp7ySGSM35R8aOnIuX4XPGGFE3kRh40wsGROtrLD1mKh8Eib/R +# m+O3XuC2jED9Ctpo3GXYsRbHa35XWM1yO3yFVlIq3MqTxExpfPl7G8EywlPolNg= # SIG # End signature block diff --git a/install-scripts/Set-VSCode-CMakes.ps1 b/install-scripts/Set-VSCode-CMakes.ps1 index 309beb0abc..1309cde4d9 100644 --- a/install-scripts/Set-VSCode-CMakes.ps1 +++ b/install-scripts/Set-VSCode-CMakes.ps1 @@ -113,7 +113,7 @@ function Set-VSCode-CMakes { } # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD7Vb/DmDSoL6QJ # OvnV8QLzeC8NhFmkGT/GqRrJw0TuL6CCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -191,7 +191,7 @@ function Set-VSCode-CMakes { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQ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DJwfZZpJdargnzdYy5uG4hCybwt/riFPGVrAtOS06dgJKI59boDbgkvFNlxU07+L +# gPXMREbhokLYK4Tun4pVRIQpOEgZhV+dQU3GiX0dcOfTzl1kmst3qeu8+NLNXEf2 +# 2mKLDEN6AtX5dL5Ip4mem31SO+uEEsYdSZh5S5L/u2kVcwgDNh4RMxaPGH+3eQz5 +# V3J7jHXMkAqZZMLRNe90eFDz5GG2RKw4fsVZHZmFpk/o/OlxFjnS+1ZAgxJE+g== # SIG # End signature block diff --git a/install-scripts/Set-VSCode-Launch.ps1 b/install-scripts/Set-VSCode-Launch.ps1 index 988e4c9f6e..103e3bf83c 100644 --- a/install-scripts/Set-VSCode-Launch.ps1 +++ b/install-scripts/Set-VSCode-Launch.ps1 @@ -107,7 +107,7 @@ function Set-VSCode-Launch { } # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCor13pVxCCNYwc # 2tiM7lwpXP22101GYFImiXRqU+OLMqCCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -185,7 +185,7 @@ function Set-VSCode-Launch { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA @@ -197,10 +197,10 @@ function Set-VSCode-Launch { # B1wqYr20yeP68uDKHY+b1zop4GeZz/U0UXhwCr/YFo5xvpXEc384Yjb4U83l0Ap8 # hybCu/4r9Qiuj25fQX4Nxhm+ivOWi47ykVG3874piQ9QP01wzyfsk5rV7ItCgqXk # h8aSWsjn/sD3oIyTVjo9JxRIXaWit5yKeCAhA9/qlYnMAZwu48qCq2s55+6LoYIN -# RDCCDUAGCisGAQQBgjcDAwExgg0wMIINLAYJKoZIhvcNAQcCoIINHTCCDRkCAQMx +# fTCCDXkGCisGAQQBgjcDAwExgg1pMIINZQYJKoZIhvcNAQcCoIINVjCCDVICAQMx # DzANBglghkgBZQMEAgEFADB3BgsqhkiG9w0BCRABBKBoBGYwZAIBAQYJYIZIAYb9 # bAcBMDEwDQYJYIZIAWUDBAIBBQAEIKY2L65t8KrFCc8RCcVAiJawaJCxQ/NiN7XA -# 8YqL26rAAhAjUGWs1y+3b/EFKrMAqS5ZGA8yMDIxMDMxNzE1MDAzNVqgggo3MIIE +# 8YqL26rAAhBBM6w4R04B29EKCuWGlUwXGA8yMDIxMDYxNzEzMTQ1NVqgggo3MIIE # /jCCA+agAwIBAgIQDUJK4L46iP9gQCHOFADw3TANBgkqhkiG9w0BAQsFADByMQsw # CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu # ZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQgSUQg @@ -255,17 +255,18 @@ function Set-VS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GbrM+VUVBUXF43VVaIULFaB5teqHZ4JYMeg== +# aW5nIENBAhANQkrgvjqI/2BAIc4UAPDdMA0GCWCGSAFlAwQCAQUAoIHRMBoGCSqG +# SIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjEwNjE3MTMx +# NDU1WjArBgsqhkiG9w0BCRACDDEcMBowGDAWBBTh14Ko4ZG+72vKFpG1qrSUpiSb +# 8zAvBgkqhkiG9w0BCQQxIgQgV28UV6gOiZYZxd1VoMJEFRc5GgPvi5sREEW51nGE +# NYgwNwYLKoZIhvcNAQkQAi8xKDAmMCQwIgQgsxCQBrwK2YMHkVcp4EQDQVyD4ykr +# YU8mlkyNNXHs9akwDQYJKoZIhvcNAQEBBQAEggEAnLjSQB4H0AeNIp8pcr7Z77zI +# vtMEq6FYyS6QHOJkWLOpyX5yvCujvqE+PDQNOkPiRyQ7xchFnXwG0Rp0wdJK60Th +# 4sOffm/c/MMq3JMyPnjZwDuVLyJdM8YOS6/5wtmrYQnUr5OwuhnWP2WH6JrsIvV5 +# 5//8zKcdUf9cdrfYINVkL0lwn+Vq+Alt0ova7EEaTSUDZ8cCuxpuSLz/tqNDUzUE +# W4SXKdJg0Q52CpT9hSTbwSWvMSvopmCQ2os9cOmTT0Vd6hgc+5NnK4dhewGpiv+s +# Pyna4XUPLqhrgwqo03vaUVsD9piYf6Gk1LBYh1u9kA/j9mQBbXCkKMpXNg7GkA== # SIG # End signature block diff --git a/install-scripts/Set-VSCode-Tasks.ps1 b/install-scripts/Set-VSCode-Tasks.ps1 index b08c32e6db..91d2f455b5 100644 --- a/install-scripts/Set-VSCode-Tasks.ps1 +++ b/install-scripts/Set-VSCode-Tasks.ps1 @@ -152,7 +152,7 @@ function Set-VSCode-Tasks { } # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDpTqK6euCLSXy0 # SYWnFO9x/YKNOdmRLmhWCYu7zC7or6CCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -230,7 +230,7 @@ function Set-VSCode-Tasks { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA @@ -242,75 +242,76 @@ function Set-VSCode-Tasks { # xP5Ec87MWCa3oiwkmveunJoq0hEw5pRa33HRN/vUiJp10G6ryAk94uAx8PAg4l6s # XU/WK+N4IR580nq2/1h1qpq+3mCASld5OjBt64i2Bz2l4lkNIVItxpHzLeDXhsp/ # G9YnS5GL9xj1Dxu+2e2X6Y+nyP2DNIOyFJXZlOHsgsUV9PfqgIJhRlYYtIxioYIN -# RDCCDUAGCisGAQQBgjcDAwExgg0wMIINLAYJKoZIhvcNAQcCoIINHTCCDRkCAQMx -# DzANBglghkgBZQMEAgEFAD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gNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3LmRpZ2ljZXJ0 +# LmNvbTExMC8GA1UEAxMoRGlnaUNlcnQgU0hBMiBBc3N1cmVkIElEIFRpbWVzdGFt +# cGluZyBDQQIQDUJK4L46iP9gQCHOFADw3TANBglghkgBZQMEAgEFAKCB0TAaBgkq +# hkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTIxMDYxNzEz +# MTQ1NlowKwYLKoZIhvcNAQkQAgwxHDAaMBgwFgQU4deCqOGRvu9ryhaRtaq0lKYk +# m/MwLwYJKoZIhvcNAQkEMSIEIJAb25fPVYdKgSMv31Ah+XM08eDGl4nnTr4f28iU +# /TrpMDcGCyqGSIb3DQEJEAIvMSgwJjAkMCIEILMQkAa8CtmDB5FXKeBEA0Fcg+Mp +# K2FPJpZMjTVx7PWpMA0GCSqGSIb3DQEBAQUABIIBAEOf6YH+14lVRkCcrRHkWKI0 +# B9nU9Fm24e6ZvW7x06Y1g80U7Oc6nQ+KMRaFM2HnE0aEPAfPl6Y2pmpGSamVRTGI +# W1B9X8MY78mloh08SWFFLr5cfNz00EkA5ivIonQBM+vwYZ0GWhhJlmd3MUF3Slhm +# k9ct8ICTmVs4vB2NXB+Ulo8dU/pPXI5DxsDWG+Kw4qUfQ3Y7hgC2T7z0rsGaVBB3 +# LdvKFE4ObLMcWzqleYuWV5EJ2Yzkoyh1pXpwL8SnKeuIy9YF/byxy5IC6gafQh49 +# yayvxMQF2QRQLPvJdTpPGxqRysG7M2TtvJwxjtifzRChdThA8FhIUC+YSyC9npA= # SIG # End signature block diff --git a/install-scripts/install-arm-gcc-toolchain.ps1 b/install-scripts/install-arm-gcc-toolchain.ps1 index 901362d2df..620e16777f 100644 --- a/install-scripts/install-arm-gcc-toolchain.ps1 +++ b/install-scripts/install-arm-gcc-toolchain.ps1 @@ -1,7 +1,7 @@ # Copyright (c) .NET Foundation and Contributors # See LICENSE file in the project root for full license information. -# This PS installs the ARM GNU GCC toolchain from our Bintray repository if it's not already available +# This PS installs the ARM GNU GCC toolchain from our Cloudsmith repository if it's not already available [CmdletBinding(SupportsShouldProcess = $true)] param ( @@ -91,18 +91,24 @@ if ($IsAzurePipelines -eq $False) { # need to replace forward slash for paths to work with GCC and CMake $Path = "$Path".Replace('\', '/') + "Setting User Environment Variable GNU_GCC_TOOLCHAIN_PATH='" + $env:GNU_GCC_TOOLCHAIN_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:GNU_GCC_TOOLCHAIN_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("GNU_GCC_TOOLCHAIN_PATH", $env:GNU_GCC_TOOLCHAIN_PATH, "User") - "Set User Environment GNU_GCC_TOOLCHAIN_PATH='" + $env:GNU_GCC_TOOLCHAIN_PATH + "'" | Write-Host -ForegroundColor Yellow + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("GNU_GCC_TOOLCHAIN_PATH", $env:GNU_GCC_TOOLCHAIN_PATH, "User") + } + catch { + "Failed to set User Environment Variable GNU_GCC_TOOLCHAIN_PATH. Make sure to manually add 'GNU_GCC_TOOLCHAIN_PATH' with '" + $env:GNU_GCC_TOOLCHAIN_PATH + "'." | Write-Host -ForegroundColor Red + } } # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAp6pRav8soGXz0 -# IMlxBGUfuBDj2Sp7Ut3T+He+tw8p06CCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCCh+blVBUjzDYL +# F7ZyfBHcbRCiJdUaf8PfP8wAWax9/qCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -177,22 +183,22 @@ if ($IsAzurePipelines -eq $False) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA # MBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAMBgor -# BgEEAYI3AgEVMC8GCSqGSIb3DQEJBDEiBCBLHKtS9DIFEIW/txhtr2QNUdRYpRum -# /X7GSrHcbybSIjANBgkqhkiG9w0BAQEFAASCAQAPPtebZ9t511mSkv/IpYDfpeFA -# Po5/iSWg4oNweLI4+0ZgsGNe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IBZo/ffVSZ6mYgau +# hHw+IKdPexTdgFizVawkAf2DgNRVZypCycINRINzLI2rCHnA6CNuZz/MJFkmDg== # SIG # End signature block diff --git a/install-scripts/install-cmake.ps1 b/install-scripts/install-cmake.ps1 index 884663b5e8..866fe4cc99 100644 --- a/install-scripts/install-cmake.ps1 +++ b/install-scripts/install-cmake.ps1 @@ -3,9 +3,6 @@ # This PS installs CMake -# requires this module -Install-Module -Name WebKitDev -Scope CurrentUser - # default version is: [version]$version="3.15.7" @@ -23,19 +20,41 @@ if($cmake) "Installing CMake v$version..." | Write-Host -ForegroundColor White -$url = ('https://cmake.org/files/v{0}.{1}/cmake-{0}.{1}.{2}-win64-x64.msi' -f $version.Major, $version.Minor, $version.Build); +$url = ('https://cmake.org/files/v{0}.{1}/cmake-{0}.{1}.{2}-win64-x64.msi' -f $version.Major, $version.Minor, $version.Build) +$installerFile = ('cmake-{0}.{1}.{2}-win64-x64.msi' -f $version.Major, $version.Minor, $version.Build) $options = @( - 'ADD_CMAKE_TO_PATH="System"' -); + 'ADD_CMAKE_TO_PATH="User"' + 'ALLUSERS=""' +) + +[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 + +$installerPath = "$env:TEMP\$installerFile" + +$webClient = new-object System.Net.WebClient +$webClient.DownloadFile($url, $installerPath) + +$msiArgs = @('/i', $installerPath, '/quiet', '/qn'); +$msiArgs += $options; -Install-FromMsi -Name 'cmake' -Url $url -Options $options +Start-Process msiexec -Wait -ArgumentList $msiArgs + +# need to update PATH to grab changes +$env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::User) + +$cmake2 = (Get-Command "cmake.exe" -ErrorAction SilentlyContinue) + +if($null -eq $cmake2) +{ + "Failed to install CMake! Please download and run the installer from https://cmake.org/download" | Write-Host -ForegroundColor Red +} # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBvLQCEzOI4sfZt -# nVGxtHP2NUGYvi70X4H8fUjOdSc926CCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDzXhPbV1X/68mJ +# WZTTzIJZk7AxfvshL8o3P09+SRNwM6CCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -110,87 +129,88 @@ Install-FromMsi -Name 'cmake' -Url $url -Options $options # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyB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A/j +# b7UBJrZspe6HUSHkWGCbugwtK22ixH67xCUrRwIIfEmuE7bhfEJCKMYYVs9BNLZm +# XbZ0e/VWMyIvIjayS6JKldj1po5SMYIChjCCAoICAQEwgYYwcjELMAkGA1UEBhMC +# VVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3LmRpZ2ljZXJ0 +# LmNvbTExMC8GA1UEAxMoRGlnaUNlcnQgU0hBMiBBc3N1cmVkIElEIFRpbWVzdGFt +# cGluZyBDQQIQDUJK4L46iP9gQCHOFADw3TANBglghkgBZQMEAgEFAKCB0TAaBgkq +# hkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTIxMDYxNzEz +# MTQ1M1owKwYLKoZIhvcNAQkQAgwxHDAaMBgwFgQU4deCqOGRvu9ryhaRtaq0lKYk +# m/MwLwYJKoZIhvcNAQkEMSIEIG1cIKAVLuf+Jgswq3H/3SyAXqDtRY43i18mTBDn +# AtPvMDcGCyqGSIb3DQEJEAIvMSgwJjAkMCIEILMQkAa8CtmDB5FXKeBEA0Fcg+Mp +# K2FPJpZMjTVx7PWpMA0GCSqGSIb3DQEBAQUABIIBAABjqZ0LVA5EvvEMlKjwpigT +# Gng8/7YrPyN37W7Z6jN/Q53MLMn7pUh7KkgZ0OYDIy9ArDAqeJ7pLDlwBWUJK90T +# ZLCMfJ647Wbb/TeEp4GTMYPelUMS9LkXLrgrLcsDuWHPJ9Q6IGUbbfmAZndF/v9A +# 5KUTfsFHDKk43Colfvgnu1pDiY79kPbyiwK1Oaz4LpVZqDHnSrLF4H7bR8Mzy/r7 +# ws82indcVjzaLYKxPnOiDdUHU1N3d1HvmbvhMO55A2EmgFOa2pZUR9qnUeHogUBs +# 1teWu79zZha+FGLROryxiBoYvz7AyiQiFnsH1quQVPRY2bJNWci9KFASmXY1SMI= # SIG # End signature block diff --git a/install-scripts/install-esp32-idf.ps1 b/install-scripts/install-esp32-idf.ps1 index c6a7b5b596..8a0fa8bc70 100644 --- a/install-scripts/install-esp32-idf.ps1 +++ b/install-scripts/install-esp32-idf.ps1 @@ -9,7 +9,7 @@ param ( [switch]$force = $false ) -$idfVersion = "esp-idf-v3.3.1" +$idfVersion = "esp-idf-v3.3.5" # check if running on Azure Pipelines by looking at this two environment variables $IsAzurePipelines = $env:Agent_HomeDirectory -and $env:Build_BuildNumber @@ -94,11 +94,17 @@ if ($IsAzurePipelines -eq $False) { # need to replace forward slash for paths to work with GCC and CMake $Path = "$Path".Replace('\', '/') + "Setting User Environment Variable ESP32_IDF_PATH='" + $env:ESP32_IDF_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:ESP32_IDF_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("ESP32_IDF_PATH", $env:ESP32_IDF_PATH, "User") - "Set User Environment ESP32_IDF_PATH='" + $env:ESP32_IDF_PATH + "'" | Write-Host -ForegroundColor Yellow + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("ESP32_IDF_PATH", $env:ESP32_IDF_PATH, "User") + } + catch { + "Failed to set User Environment Variable ESP32_IDF_PATH. Make sure to manually add 'ESP32_IDF_PATH' with '" + $env:ESP32_IDF_PATH + "'." | Write-Host -ForegroundColor Red + } } # install python pyserial, if not on Azure @@ -119,10 +125,10 @@ if ($IsAzurePipelines -eq $True) { } # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCS1YBpCvgawrCu -# 0f5POC01KaQsR2mQqa5FyUg3NtFfkqCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCADgmPZSckVEB9w +# fYUYQp1n9+ZixZdtjT1VYaDS/fpoW6CCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -197,87 +203,88 @@ if ($IsAzurePipelines -eq $True) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA # MBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAMBgor -# BgEEAYI3AgEVMC8GCSqGSIb3DQEJBDEiBCAemON/meVz/krG6SGsiyZe71I8Q1Tl -# QcX+geLF3ZK0DzANBgkqhkiG9w0BAQEFAASCAQB9I8MOj+cL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VkIElEIFRpbWVzdGFt +# cGluZyBDQQIQDUJK4L46iP9gQCHOFADw3TANBglghkgBZQMEAgEFAKCB0TAaBgkq +# hkiG9w0BCQMxDQYLKoZIhvcNAQkQAQQwHAYJKoZIhvcNAQkFMQ8XDTIxMDYxNzEz +# MTQ1NFowKwYLKoZIhvcNAQkQAgwxHDAaMBgwFgQU4deCqOGRvu9ryhaRtaq0lKYk +# m/MwLwYJKoZIhvcNAQkEMSIEIHJ72vwczVxjLFag5W3Kv2huYXIfzM28XJBVWaUn +# SLhdMDcGCyqGSIb3DQEJEAIvMSgwJjAkMCIEILMQkAa8CtmDB5FXKeBEA0Fcg+Mp +# K2FPJpZMjTVx7PWpMA0GCSqGSIb3DQEBAQUABIIBAJ2cp14fa71l6cLLguOnTJZV +# Ans1qWkWvn36jDoCTp1N98ww4r6l5Cpzzzy+3nW0AAlx77kT7FCOdIq3RD1P8N6O +# Bnx3B2YCwnkS3WjfW4yudscbgP+A4gYHIAulogxSIZl9w7lTIFb5H1Nut3ycxTb+ +# QI3LFBuzmJPp6/VKQE36/b15ixfEy4fJRocAm8yPo/rH5oRMs9WRoiMJSSDrAbt0 +# 4+xWnV/+spv4woY75JedJI/QShsSfiwGZNp29Ha1kf5iQksAkXURvOg1jr0dmitu +# LGbPLd/+Q0XAGAs4mWWW3nrudhRiuiJ2YiVlXs1u6JMAaCdRPI8kXrVDhlJQ3Lc= # SIG # End signature block diff --git a/install-scripts/install-esp32-libs.ps1 b/install-scripts/install-esp32-libs.ps1 index 4d4302e0cd..ea0c5bdc82 100644 --- a/install-scripts/install-esp32-libs.ps1 +++ b/install-scripts/install-esp32-libs.ps1 @@ -1,7 +1,7 @@ # Copyright (c) .NET Foundation and Contributors # See LICENSE file in the project root for full license information. -# This PS installs the pre-compiled EPS32 libraries from our Bintray repository +# This PS installs the pre-compiled EPS32 libraries from our Cloudsmith repository [CmdletBinding(SupportsShouldProcess = $true)] param ( @@ -9,7 +9,7 @@ param ( [switch]$force = $false ) -$libsVersion = "libs-v3.3.1" +$libsVersion = "libs-v3.3.5" # check if running on Azure Pipelines by looking at this two environment variables $IsAzurePipelines = $env:Agent_HomeDirectory -and $env:Build_BuildNumber @@ -42,36 +42,41 @@ if ([string]::IsNullOrEmpty($Path) -or $force) { $Path = $Path + "\$libsVersion" } -# check if path already exists -$esp32LibPathExists = Test-Path $Path -ErrorAction SilentlyContinue +$Libs = "", "_BLE", "_V3" -If ($esp32LibPathExists -eq $False -or $force) { - $url = "https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.1/IDF_$libsVersion.zip" - $output = "$zipRoot\esp-idf-libs.zip" +foreach($Libvar in $Libs) +{ + # check if path already exists + $esp32LibPathExists = Test-Path ($Path+$Libvar) -ErrorAction SilentlyContinue - # Don't download again if already exists. User can remove from zips to force... - if (![System.IO.File]::Exists($output) -or $force) { - "Downloading ESP32 pre-compiled libs..." | Write-Host -ForegroundColor White -NoNewline + If ($esp32LibPathExists -eq $False -or $force) { + $url = "https://dl.cloudsmith.io/public/net-nanoframework/internal-build-tools/raw/names/IDF_libs/versions/v3.3.5"+$Libvar+"/IDF_$libsVersion" + $Libvar + ".zip" + $output = "$zipRoot\esp-idf-libs" + $Libvar + ".zip" - # Stop security tripping us up - [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" + # Don't download again if already exists. User can remove from zips to force... + if (![System.IO.File]::Exists($output) -or $force) { + "Downloading ESP32 pre-compiled lib..." | Write-Host -ForegroundColor White -NoNewline - # download zip IDF - (New-Object Net.WebClient).DownloadFile($url, $output) - } + # Stop security tripping us up + [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" + + # download zip IDF + (New-Object Net.WebClient).DownloadFile($url, $output) + } - # unzip to install path, if not on Azure - if ($IsAzurePipelines -eq $False) { - "Installing ESP32 pre-compiled libs @ '$Path'..." | Write-Host -ForegroundColor White -NoNewline + # unzip to install path, if not on Azure + if ($IsAzurePipelines -eq $False) { + "Installing ESP32 pre-compiled lib @ '" + $Path + $Libvar + "'..." | Write-Host -ForegroundColor White -NoNewline - # unzip - Expand-Archive -Path $output -DestinationPath $Path + # unzip + Expand-Archive -Path $output -DestinationPath ($Path + $Libvar) - "OK" | Write-Host -ForegroundColor Green + "OK" | Write-Host -ForegroundColor Green + } + } + else { + "Skipping install of ESP32 pre-compiled libs" | Write-Host -ForegroundColor Yellow } -} -else { - "Skipping install of ESP32 pre-compiled libs" | Write-Host -ForegroundColor Yellow } # set env variable, if not on Azure @@ -79,11 +84,17 @@ if ($IsAzurePipelines -eq $False) { # need to replace forward slash for paths to work with GCC and CMake $Path = "$Path".Replace('\', '/') - $env:ESP32_LIBS_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("ESP32_LIBS_PATH", $env:ESP32_LIBS_PATH, "User") + "Setting User Environment Variable ESP32_LIBS_PATH='" + $env:ESP32_LIBS_PATH + "'" | Write-Host -ForegroundColor Yellow - "Set User Environment ESP32_LIBS_PATH='" + $env:ESP32_LIBS_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:ESP32_LIBS_PATH = $Path + + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("ESP32_LIBS_PATH", $env:ESP32_LIBS_PATH, "User") + } + catch { + "Failed to set User Environment Variable ESP32_LIBS_PATH. Make sure to manually add 'ESP32_LIBS_PATH' with '" + $env:ESP32_LIBS_PATH + "'." | Write-Host -ForegroundColor Red + } } # on Azure, adjust libs path @@ -95,10 +106,10 @@ if ($IsAzurePipelines -eq $True) { } # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBtCSqpetlOsnwQ -# I4v0Ud3uZQXemvBTd8ir/U0XQePGhaCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBcK7FQPX1YsKaf +# zRmMY9cJYW1H+CrmUlAURxzOHSjtwKCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -173,22 +184,22 @@ if ($IsAzurePipelines -eq $True) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA # MBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAMBgor -# BgEEAYI3AgEVMC8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P +# knYI9v5XSAgeEGXd6I5aok9yR6YhlKHS52pbImECJYrgMOP3qmF4gfv4nSg00QZF +# sUE0Ir2I8tTEwyc6lza4g9/tveKezTNWcbo0346FnYWCJkYoi3VqSrakPqzK3HZY +# VRFotDb+mixYEpzAr/yWf63NPnhqN+i34yEXO/XoLorxCa/UfKSccIfNsw1yffjk +# 1paN9Qwblyqkyx1BcYWBjW4N25+iMOPfFpOt2tkGnZuy0r3uQHUSZ4aL/f0i+EE= # SIG # End signature block diff --git a/install-scripts/install-esp32-openocd.ps1 b/install-scripts/install-esp32-openocd.ps1 index 8ce4add3dc..7e0de013ca 100644 --- a/install-scripts/install-esp32-openocd.ps1 +++ b/install-scripts/install-esp32-openocd.ps1 @@ -35,7 +35,7 @@ if ([string]::IsNullOrEmpty($Path) -or $force) { $openOCDPathExists = Test-Path $Path -ErrorAction SilentlyContinue If ($openOCDPathExists -eq $False -or $force) { - $url = "https://github.com/espressif/openocd-esp32/releases/download/v0.10.0-esp32-20190212/openocd-esp32-win32-0.10.0-esp32-20190212.zip" + $url = "https://github.com/espressif/openocd-esp32/releases/download/v0.10.0-esp32-20210401/openocd-esp32-win32-0.10.0-esp32-20210401.zip" $output = "$zipRoot\openocd-esp32.zip" # Don't download again if already exists @@ -66,17 +66,23 @@ else { "Skipping instal of OpenOCD for ESP32" | Write-Host -ForegroundColor Yellow } +"Setting User Environment Variable ESP32_OPENOCD_PATH='" + $env:ESP32_OPENOCD_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:ESP32_OPENOCD_PATH = $Path -# this call can fail if the script is not run with appropriate permissions -[System.Environment]::SetEnvironmentVariable("ESP32_OPENOCD_PATH", $env:ESP32_OPENOCD_PATH, "User") -"Set User Environment ESP32_OPENOCD_PATH='" + $env:ESP32_OPENOCD_PATH + "'" | Write-Host -ForegroundColor Yellow +try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("ESP32_OPENOCD_PATH", $env:ESP32_OPENOCD_PATH, "User") +} +catch { + "Failed to set User Environment Variable ESP32_OPENOCD_PATH. Make sure to manually add 'ESP32_OPENOCD_PATH' with '" + $env:ESP32_OPENOCD_PATH + "'." | Write-Host -ForegroundColor Red +} # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCARzQSUIe9+pJzC -# R7j/Qpjqs+Xm1bXWdCBJCIQL9Nct7qCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBV80AW45e6/yFU +# KW5uQ/llTxFqEHyRqlWupwGgBoC6/qCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -151,87 +157,88 @@ $env:ESP32_OPENOCD_PATH = $Path # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# E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5155LL9DcR05GG+iZGNrVi6/lNuz67HZ/0yU3d5R +# sCOYMcXQyrcUC0EM4MtKMeSpol0llRnKy85FssLmcghVJoZno1pMjMj9OIt8Gw== # SIG # End signature block diff --git a/install-scripts/install-esp32-toolchain.ps1 b/install-scripts/install-esp32-toolchain.ps1 index 65b94c722a..d8013eb360 100644 --- a/install-scripts/install-esp32-toolchain.ps1 +++ b/install-scripts/install-esp32-toolchain.ps1 @@ -53,7 +53,7 @@ else { If ($xtensaPathExists -eq $False -or $force) { # Download xtensa ESP32 toolchain and install - $url = "https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip" + $url = "https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-97-gc752ad5-5.2.0.zip" $output = "$zipRoot\xtensa-esp32-elf-win32.zip" # Don't download again if already exists @@ -94,18 +94,24 @@ if ($IsAzurePipelines -eq $False) { # need to replace forward slash for paths to work with GCC and CMake $Path = "$Path".Replace('\', '/') + "Setting User Environment Variable ESP32_TOOLCHAIN_PATH='" + $env:ESP32_TOOLCHAIN_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:ESP32_TOOLCHAIN_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("ESP32_TOOLCHAIN_PATH", $env:ESP32_TOOLCHAIN_PATH, "User") - "Set User Environment ESP32_TOOLCHAIN_PATH='" + $env:ESP32_TOOLCHAIN_PATH + "'" | Write-Host -ForegroundColor Yellow + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("ESP32_TOOLCHAIN_PATH", $env:ESP32_TOOLCHAIN_PATH, "User") + } + catch { + "Failed to set User Environment Variable ESP32_TOOLCHAIN_PATH. Make sure to manually add 'ESP32_TOOLCHAIN_PATH' with '" + $env:ESP32_TOOLCHAIN_PATH + "'." | Write-Host -ForegroundColor Red + } } # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCEn5V24oeJyhPt -# z9SUZe4UsDetLJrALex8xujbQBOut6CCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCz9822Fs/Nj2B3 +# xXnNFMcJG8qcAr2fr2O6QFKkkOh7JaCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -180,87 +186,88 @@ if ($IsAzurePipelines -eq $False) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnb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WGkNfMgBsbkodbeZY4UijGHKeZR+WfyMD+Nv +# tQEmtmyl7odRIeRYYJu6DC0rbaLEfrvEJStHAgh8Sa4TtuF8QkIoxhhWz0E0tmZd +# tnR79VYzIi8iNrJLokqV2PWmjlIxggKGMIICggIBATCBhjByMQswCQYDVQQGEwJV +# UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu +# Y29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQgSUQgVGltZXN0YW1w +# aW5nIENBAhANQkrgvjqI/2BAIc4UAPDdMA0GCWCGSAFlAwQCAQUAoIHRMBoGCSqG +# SIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjEwNjE3MTMx +# NDUzWjArBgsqhkiG9w0BCRACDDEcMBowGDAWBBTh14Ko4ZG+72vKFpG1qrSUpiSb +# 8zAvBgkqhkiG9w0BCQQxIgQgGSsBHdNW/naIpRBxAz0HsIb0oWxR63UPLk0miNZw +# xxkwNwYLKoZIhvcNAQkQAi8xKDAmMCQwIgQgsxCQBrwK2YMHkVcp4EQDQVyD4ykr +# YU8mlkyNNXHs9akwDQYJKoZIhvcNAQEBBQAEggEAgTbugqPsU36TdP7lAN3FuMgS +# JFnGD8oUkfyvnae5mFzEVXpFAOZXTsQKae4u9XuLcGGHvAqh6Bxl3p9YPAD5cWdT +# OHNk4lR64DM+841s3dK0CLj+opQBu1FxlTCNXaiuSVTzRqR0Jvv8Va/Sx8D9iZwN +# U6oT1RvF/+ZBfrRKWDApeJxTljKOsZqoeB/LsgpYCsZ8gbU3I7qaATgLTS44LpWe +# 3eMQXhfF5AHHY8UywlP/OdyMeXKumolEsyCNcUMvCGhd0dG8jcq0+A5Iz4BsuPdH +# dXalXEpNsUYIAl/cDwqv8Q6Ibq0621wWyUIKoogWMrtIh3X8rBT3JciP12wltQ== # SIG # End signature block diff --git a/install-scripts/install-esp32-tools.ps1 b/install-scripts/install-esp32-tools.ps1 index e7e5f1d017..3d5287ae73 100644 --- a/install-scripts/install-esp32-tools.ps1 +++ b/install-scripts/install-esp32-tools.ps1 @@ -3,13 +3,13 @@ [CmdletBinding(SupportsShouldProcess = $true)] param ( - [Parameter(HelpMessage = "Enter the path to the folder where the tools should be installed.")][string]$Path, - [Parameter(HelpMessage = "Please enter the COM port for ESP32 flash utility [e.g. COM1].")][string]$COMPort, - [switch]$force = $false + [Parameter(HelpMessage = "Enter the path to the folder where the tools should be installed.")][string]$Path, + [Parameter(HelpMessage = "Please enter the COM port for ESP32 flash utility [e.g. COM1].")][string]$COMPort, + [switch]$force = $false ) If ([string]::IsNullOrEmpty($COMPort)) { - "Please use parameter -COMPort to set COM port for ESP32 flash utility [e.g. -COMPort COM1], or edit tasks.json" | Write-Host -ForegroundColor Yellow + "Please use parameter -COMPort to set COM port for ESP32 flash utility [e.g. -COMPort COM1], or edit tasks.json" | Write-Host -ForegroundColor Yellow } $env:NANOCLR_COMPORT = $COMPort @@ -18,8 +18,7 @@ $env:NANOCLR_COMPORT = $COMPort if ([string]::IsNullOrEmpty($Path) -or $force) { # check if there is already a path set - if($env:NF_TOOLS_PATH) - { + if ($env:NF_TOOLS_PATH) { $Path = $env:NF_TOOLS_PATH } else { @@ -27,18 +26,21 @@ if ([string]::IsNullOrEmpty($Path) -or $force) { } } -"Set User Environment NF_TOOLS_PATH='" + $Path + "'" | Write-Host -ForegroundColor White +"Setting User Environment variable NF_TOOLS_PATH='" + $Path + "'" | Write-Host -ForegroundColor Yellow # set environment variable $env:NF_TOOLS_PATH = $Path -[System.Environment]::SetEnvironmentVariable("NF_TOOLS_PATH", $Path, "User") -# this call can fail if the script is not run with appropriate permissions -[System.Environment]::SetEnvironmentVariable("NF_TOOLS_PATH", $Path, "Machine") +try { + [System.Environment]::SetEnvironmentVariable("NF_TOOLS_PATH", $Path, "User") +} +catch { + "Failed to set User Environment Variable NF_TOOLS_PATH. Make sure to manually add 'NF_TOOLS_PATH' with '" + $env:NF_TOOLS_PATH + "'." | Write-Host -ForegroundColor Red +} # need to pass the 'force' switch? if ($force) { - $localCommandArgs = " -force" + $localCommandArgs = " -force" } # call the script for each of the tools @@ -72,10 +74,10 @@ Invoke-Expression "$PSScriptRoot\install-esp32-openocd.ps1 $localCommandArgs" #> # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBjBzJSUGLx5W1K -# P9QP5stMS+D4NiqnGa2ruVyeYTnTUKCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBWaRlm2WM9jCac +# CEE/BXZl1YTTENpgmZfFdFjjHFeVjqCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -150,87 +152,88 @@ Invoke-Expression "$PSScriptRoot\install-esp32-openocd.ps1 $localCommandArgs" # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe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SNKQC2OJ +# 7Dn2xOrKlN0NOwwBO2j8uB668yJaymuL+eTlgeEhz8U+KWkxFBLob7I5UkidMYlk +# yZlTUa4NAy6K31yoAIve/GGtgf6L2wvqRpKPSH3s5vSpM0AbfAJgkPkXQOirZqmx +# XWsqEoqc9rGNl5M3nsjc3+ksU9/01k7dzOtawy2NA+caLvT27Z7uZMQTzXNlUnA= # SIG # End signature block diff --git a/install-scripts/install-nf-hex2dfu.ps1 b/install-scripts/install-nf-hex2dfu.ps1 index 5ea0a0ce0b..68c7d31a28 100644 --- a/install-scripts/install-nf-hex2dfu.ps1 +++ b/install-scripts/install-nf-hex2dfu.ps1 @@ -76,18 +76,24 @@ if ($IsAzurePipelines -eq $False) { # need to replace forward slash for paths to work with GCC and CMake $Path = "$Path".Replace('\', '/') + "Setting User Environment Variable HEX2DFU_PATH='" + $env:HEX2DFU_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:HEX2DFU_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("HEX2DFU_PATH", $env:HEX2DFU_PATH, "User") - "Set User Environment HEX2DFU_PATH='" + $env:HEX2DFU_PATH + "'" | Write-Host -ForegroundColor Yellow + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("HEX2DFU_PATH", $env:HEX2DFU_PATH, "User") + } + catch { + "Failed to set User Environment Variable HEX2DFU_PATH. Make sure to manually add 'HEX2DFU_PATH' with '" + $env:HEX2DFU_PATH + "'." | Write-Host -ForegroundColor Red + } } # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDtLoG/uF9B7CFQ -# QY2HAe1WiJUF4k6X3QYElmdI2oiM7KCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBnjUI2E/GZRQJj +# 9lW0oO98hVtVFYuS9qnS66Bm8poZdqCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -162,22 +168,22 @@ if ($IsAzurePipelines -eq $False) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Iwgg+eAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA # MBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAMBgor -# BgEEAYI3AgEVMC8GCSqGSIb3DQEJBDEiBC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CU8UkspEHgHmc8MbjqgFoOboqnK1GL1 +# SV6n4C+D1ZFLXvqKG3q3c+S4pk5w03srRsBb/1LFlWjOzeAqyS9aK22eJ9CCuXo3 +# 6v1rMgDLz4xIRKfh6MjaNtP4ZyXi6fG16FEx21Vaxb/UNYqfyi3BRFLv3cFRcx/i +# gwYvxFc0EC8Nz2hK9yQWQGplZqW+0iUvERDCiu18HTVqkTPkpfk+li/wSXBMAZM= # SIG # End signature block diff --git a/install-scripts/install-nf-tools.ps1 b/install-scripts/install-nf-tools.ps1 index 1e3000dbd5..d4aa65f78a 100644 --- a/install-scripts/install-nf-tools.ps1 +++ b/install-scripts/install-nf-tools.ps1 @@ -41,7 +41,7 @@ else { } # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB/ZpzjUyy9BTaQ # IIB0Cmb5vC8D7HI3B6xToy0RqirgiKCCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -119,7 +119,7 @@ else { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA @@ -131,10 +131,10 @@ else { # +/CmEtJGQ9grLc+DHQx4j2IPRO+L3ImtZ68sM+W+6JTnimBtEFut0PKCumku/uX3 # pBR2XV2+J251dHQeenUSRExmu6GmlNqaOQEVuaQVInkwMy5LfiTWnhTu0VUEFFct # 7wpz5l/M9DPC2MG2r0phJzLfGFP2/XqGEYEs4um2k6aG+EptoH0QjeSu/Sr8oYIN -# RDCCDUAGCisGAQQBgjcDAwExgg0wMIINLAYJKoZIhvcNAQcCoIINHTCCDRkCAQMx +# fTCCDXkGCisGAQQBgjcDAwExgg1pMIINZQYJKoZIhvcNAQcCoIINVjCCDVICAQMx # DzANBglghkgBZQMEAgEFADB3BgsqhkiG9w0BCRABBKBoBGYwZAIBAQYJYIZIAYb9 # bAcBMDEwDQYJYIZIAWUDBAIBBQAEIH7MmEL+eoX842V3HyaptY3hk8b0wWFR1mP2 -# pSp4HTjzAhB64ycd6+7NbIYuWA64GhOQGA8yMDIxMDMxNzE1MDAzMlqgggo3MIIE +# pSp4HTjzAhAsWnStSaQI1RSKs3YbMr7fGA8yMDIxMDYxNzEzMTQ1Mlqgggo3MIIE # /jCCA+agAwIBAgIQDUJK4L46iP9gQCHOFADw3TANBgkqhkiG9w0BAQsFADByMQsw # CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu # ZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQgSUQg @@ -189,17 +189,18 @@ else { # NUMEaLLbdQLgcseY1jxk5R9IEBhfiThhTWJGJIdjjJFSLK8pieV4H9YLFKWA1xJH # cLN11ZOFk362k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CWCGSAFlAwQCAQUAoIHRMBoGCSqG +# SIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjEwNjE3MTMx +# NDUyWjArBgsqhkiG9w0BCRACDDEcMBowGDAWBBTh14Ko4ZG+72vKFpG1qrSUpiSb +# 8zAvBgkqhkiG9w0BCQQxIgQgiV0gO/8C6wIiqt5cwobi4BtJuqlhT+joRIOP0gZA +# D+YwNwYLKoZIhvcNAQkQAi8xKDAmMCQwIgQgsxCQBrwK2YMHkVcp4EQDQVyD4ykr +# YU8mlkyNNXHs9akwDQYJKoZIhvcNAQEBBQAEggEANSbMY4rskXk/pEWA+JS9Tqtm +# nHOdh9/dgiKE6lA26O95kRw4KFai1VCAKJIYYsJotNm8uvuhQhjL9WiLmAZRPHUF +# 1k+5flLYTsdDmur/32j6Q4Jf4pIuphD2OHSW8ZAY4HfJcKf4cV4S3P6CoanUK9Ce +# 71BZNyK4wnaLOP6T1odxZVtBsnnMQBPkwLz8Ldyn4Y8RRbLiB3TpfWChA8bmA8YK +# fAKwhJQmyUgBkp5CGdfoSCkMzJ+uXhediillMZF599OMBqnSgwVSJ5XrlTxCdWVo +# 2dnGDBCsyWRAMx0mk63IVrJ8bJG1N6Q3NC+ijWZDNy/XiLUC/3BCHpi+C4FwYw== # SIG # End signature block diff --git a/install-scripts/install-ninja.ps1 b/install-scripts/install-ninja.ps1 index e3644ad246..3d4b1d5f46 100644 --- a/install-scripts/install-ninja.ps1 +++ b/install-scripts/install-ninja.ps1 @@ -76,10 +76,16 @@ else { # set env variable, if not on Azure if ($IsAzurePipelines -eq $False) { $env:NINJA_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("NINJA_PATH", $env:NINJA_PATH, "User") - "Set User Environment NINJA_PATH='" + $env:NINJA_PATH + "'" | Write-Host -ForegroundColor Yellow + "Setting User Environment Variable NINJA_PATH='" + $env:NINJA_PATH + "'" | Write-Host -ForegroundColor Yellow + + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("NINJA_PATH", $env:NINJA_PATH, "User") + } + catch { + "Failed to set User Environment Variable NINJA_PATH. Make sure to manually add 'NINJA_PATH' with '" + $env:NINJA_PATH + "'." | Write-Host -ForegroundColor Red + } } # if not on Azure, add ninja to the PATH @@ -94,37 +100,23 @@ if ($IsAzurePipelines -eq $False) { # add to path try { + "Adding ninja to User PATH" | Write-Host -ForegroundColor Yellow + [Environment]::SetEnvironmentVariable( "Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$Path", "User") - - "Add ninja to User PATH" | Write-Host -ForegroundColor White - } - catch { - "Fail to update User PATH environment variable. Make sure to manually add '$Path' to the User PATH." | Write-Host -ForegroundColor Red - } - - # add to path - try { - # this call can fail if the script is not run with appropriate permissions - [Environment]::SetEnvironmentVariable( - "Path", - [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";$Path", - "Machine") - - "Add ninja to System PATH" | Write-Host -ForegroundColor White } catch { - "Fail to update System PATH environment variable. Make sure to manually add '$Path' to the System PATH." | Write-Host -ForegroundColor Red + "Failed to update User PATH environment variable. Make sure to manually add '$Path' to the User PATH." | Write-Host -ForegroundColor Red } } # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDg/NBH0Poyv5CK -# 1MEi1DFnI9s2cgbGC/vFh/aNo+wMPqCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDDP/F6p5W14o1v +# WsxiWf/p07scvYXM+HrB+sWYgm/HAaCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -199,87 +191,88 @@ if ($IsAzurePipelines -eq $False) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA # MBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAMBgor -# BgEEAYI3AgEVMC8GCSqGSIb3DQEJBDEiBCA2gJ8slw4fJ6XcbLXwH+2whaYh5kWW -# A8yDzEkot8TwyDANBgkqhkiG9w0BAQEFAASCAQCzMhyIvR3JX0qiyE5eQT9cjIPp -# aRVp2NwK107NULCt71gqeEgktGuuHfY09bT6lEAw7AJ/K+9HX5p3WEjKFKD7p3wU -# e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IHRMBoGCSqG +# SIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjEwNjE3MTMx +# NDUzWjArBgsqhkiG9w0BCRACDDEcMBowGDAWBBTh14Ko4ZG+72vKFpG1qrSUpiSb +# 8zAvBgkqhkiG9w0BCQQxIgQgKvhFdoLJWS9modjnmxiVn17nz9M5sfWfiwTgu3Of +# jXkwNwYLKoZIhvcNAQkQAi8xKDAmMCQwIgQgsxCQBrwK2YMHkVcp4EQDQVyD4ykr +# YU8mlkyNNXHs9akwDQYJKoZIhvcNAQEBBQAEggEAZv2vUWdJ+5fRoOI89ZKQQaRD +# THLclpqem30UHO3zjTKgtyt/f6b7VTmpqnqkSQlKXa/Agx1hWoU30VfiehFTqUp0 +# pvlobwbVz8YKC/WQm747+J2vbnlr7Ovstt1DxE0pGJv1xrJPeM8qq7ny3EC8R5H7 +# LRxVwALRszbi5kUcJwFlSadC29EQIzJabXe8hBkkmd/5UQy1lENHJ5Gey9A+yjH/ +# nLBpb0IBIv6vLF3uq/utxgGkSmg5/v42+4wxFSq/tUcjJJ805pUBxfVPurQtMJLC +# Vdr5dXMB9d0sdfGB8KOKUy1DL1Jx+IfCe+z1KRpMsRBh0pnb2wcU93/oDiJSTg== # SIG # End signature block diff --git a/install-scripts/install-openocd.ps1 b/install-scripts/install-openocd.ps1 index e13bf36b0f..39568f8a4a 100644 --- a/install-scripts/install-openocd.ps1 +++ b/install-scripts/install-openocd.ps1 @@ -35,7 +35,7 @@ if ([string]::IsNullOrEmpty($Path) -or $force) { $openOCDPathExists = Test-Path $Path -ErrorAction SilentlyContinue If ($openOCDPathExists -eq $False -or $force) { - $url = "https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.10.0-13/xpack-openocd-0.10.0-13-win32-x64.zip" + $url = "https://github.com/xpack-dev-tools/openocd-xpack/releases/download/v0.11.0-1/xpack-openocd-0.11.0-1-win32-x64.zip" $output = "$zipRoot\openocd.zip" # Don't download again if already exists @@ -60,7 +60,7 @@ If ($openOCDPathExists -eq $False -or $force) { Expand-Archive -Path $output -DestinationPath "$Path\temp" # move to final location - Get-ChildItem -Path "$Path\temp\xPack\OpenOCD\0.10.0-13" -Recurse | Move-Item -Destination "$Path" + Get-ChildItem -Path "$Path\temp\xPack\OpenOCD\xpack-openocd-0.11.0-1" -Recurse | Move-Item -Destination "$Path" # remove temp directory Remove-Item $Path\temp -Recurse -Force @@ -71,17 +71,23 @@ else { "Skipping instal of OpenOCD" | Write-Host -ForegroundColor Yellow } +"Setting User Environment Variable OPENOCD_PATH='" + $env:OPENOCD_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:OPENOCD_PATH = $Path -# this call can fail if the script is not run with appropriate permissions -[System.Environment]::SetEnvironmentVariable("OPENOCD_PATH", $env:OPENOCD_PATH, "User") -"Set User Environment OPENOCD_PATH='" + $env:OPENOCD_PATH + "'" | Write-Host -ForegroundColor Yellow +try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("OPENOCD_PATH", $env:OPENOCD_PATH, "User") +} +catch { + "Failed to set User Environment Variable OPENOCD_PATH. Make sure to manually add 'OPENOCD_PATH' with '" + $env:OPENOCD_PATH + "'." | Write-Host -ForegroundColor Red +} # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC+mx44cvygm5tP -# EyQVyqTKXAlXz9ZzP6kYSFUAcrjYQKCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCpzOTmVV1Gefnn +# L+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R55kVxbdKsloS2I1fgICjxaLXrBDeVP8oHEtGbbMjDgCSzWtrUag9mSIZwc= # SIG # End signature block diff --git a/install-scripts/install-python.ps1 b/install-scripts/install-python.ps1 index de92b2189b..aadb6217da 100644 --- a/install-scripts/install-python.ps1 +++ b/install-scripts/install-python.ps1 @@ -32,7 +32,7 @@ $options = @( Install-FromExe -Name 'python' -Url $url -Options $options # SIG # Begin signature block -# MIIeIgYJKoZIhvcNAQcCoIIeEzCCHg8CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBVNVO7GgcUDvBs # ysXGD+Oy9X88kz6KgvsjYbuI/8X+dqCCDg8wggPFMIICraADAgECAhACrFwmagtA @@ -110,7 +110,7 @@ Install-FromExe -Name 'python' -Url $url -Options $options # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2kwgg9lAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA @@ -122,75 +122,76 @@ Install-FromExe -Name 'python' -Url $url -Options $options # N26nmq3JQmjYC527F1BWUovVEbYP9KaLVnHM9FKcXRs8cbjKxdvgf8F9bK+71J77 # jJKQRScDmNfJ5Wl0QLwWNW3nKPt83RrTcfid5qkiNaGGwac2w9tjI/zmfk0A0P89 # ijWFUpgfwrBtysW2zZL9oCpuQg0vAgMxwb1w6Fpil9pBlg+i0oAQRapp6ul4oYIN -# RTCCDUEGCisGAQQBgjcDAwExgg0xMIINLQYJKoZIhvcNAQcCoIINHjCCDRoCAQMx -# DzANBglghkgBZQMEAgEFADB4BgsqhkiG9w0BCRABBKBpBGcwZQIBAQYJYIZIAYb9 +# fTCCDXkGCisGAQQBgjcDAwExgg1pMIINZQYJKoZIhvcNAQcCoIINVjCCDVICAQMx +# DzANBglghkgBZQMEAgEFADB3BgsqhkiG9w0BCRABBKBoBGYwZAIBAQYJYIZIAYb9 # bAcBMDEwDQYJYIZIAWUDBAIBBQAEIIDbbIZlSNJMmL/AkeE80ExUWtD85zbtKpQr -# WV/ouUaMAhEAtBtUyV6aF7OwDjXpWh+Y9hgPMjAyMTAzMTcxNTAwMzFaoIIKNzCC -# BP4wggPmoAMCAQICEA1CSuC+Ooj/YEAhzhQA8N0wDQYJKoZIhvcNAQELBQAwcjEL -# MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 -# LmRpZ2ljZXJ0LmNvbTExMC8GA1UEAxMoRGlnaUNlcnQgU0hBMiBBc3N1cmVkIElE -# IFRpbWVzdGFtcGluZyBDQTAeFw0yMTAxMDEwMDAwMDBaFw0zMTAxMDYwMDAwMDBa -# MEgxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwgSW5jLjEgMB4GA1UE -# AxMXRGlnaUNlcnQgVGltZXN0YW1wIDIwMjEwggEiMA0GCSqGSIb3DQEBAQUAA4IB -# DwAwggEK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UD26CcW3zcobH75tG+Wng/M/kPCod5E66ZsRSV80oMTcud54/PQdYR/QWwKdwLiy +# 6dDWmmiuzJ+ZV3dZ36FZ2PVF3eZMJFjfkYeuGp9XgXcsgp0fMhcA4iEoam9RDA== # SIG # End signature block diff --git a/install-scripts/install-srecord.ps1 b/install-scripts/install-srecord.ps1 index fcbc57d430..51df758c3c 100644 --- a/install-scripts/install-srecord.ps1 +++ b/install-scripts/install-srecord.ps1 @@ -78,11 +78,17 @@ if ($IsAzurePipelines -eq $False) { # need to replace forward slash for paths to work with GCC and CMake $Path = "$Path".Replace('\', '/') + "Setting User Environment Variable SRECORD_PATH='" + $env:SRECORD_PATH + "'" | Write-Host -ForegroundColor Yellow + $env:SRECORD_PATH = $Path - # this call can fail if the script is not run with appropriate permissions - [System.Environment]::SetEnvironmentVariable("SRECORD_PATH", $env:SRECORD_PATH, "User") - "Set User Environment SRECORD_PATH='" + $env:SRECORD_PATH + "'" | Write-Host -ForegroundColor Yellow + try { + # this call can fail if the script is not run with appropriate permissions + [System.Environment]::SetEnvironmentVariable("SRECORD_PATH", $env:SRECORD_PATH, "User") + } + catch { + "Failed to set User Environment Variable SRECORD_PATH. Make sure to manually add 'SRECORD_PATH' with '" + $env:SRECORD_PATH + "'." | Write-Host -ForegroundColor Red + } } # on Azure, adjust SRecord path @@ -93,10 +99,10 @@ if ($IsAzurePipelines -eq $True) { } # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWgYJKoZIhvcNAQcCoIIeSzCCHkcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCxDdEYfhiv4z8K -# XnvnQu2XNH3qkrsGFSHSMJtrYgPis6CCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC/oOQbNwQJRe0a +# yai1yHMXv5JFKQpPRo9ymQYwDS6EJKCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -171,22 +177,22 @@ if ($IsAzurePipelines -eq $True) { # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1UE +# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD6Ewgg+dAgEBMG4wWjELMAkGA1UE # BhMCVVMxGDAWBgNVBAoTDy5ORVQgRm91bmRhdGlvbjExMC8GA1UEAxMoLk5FVCBG # b3VuZGF0aW9uIFByb2plY3RzIENvZGUgU2lnbmluZyBDQQIQDP8BdPDQJNgmxzG3 # FCJmOTANBglghkgBZQMEAgEFAKCBhDAYBgorBgEEAYI3AgEMMQowCKACgAChAoAA # MBkGCSqGSIb3DQEJAzEMBgorBgEEAYI3AgEEMBwGCisGAQQBgjcCAQsxDjAMBgor -# BgEEAYI3AgEVMC8GCSqGSIb3DQEJBDEiBCBxSyDTDV4jNdn3udiR+g7Kw7CGLgIR -# z00FLFT815GCkzANBgkqhkiG9w0BAQEFAASCAQBNzGxeD3Qwk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/i1bagIcW -# IXcYpO0XAhAm1vrERymxGmVCFRApBZJMGA8yMDIxMDMyNDEwNDk0NVqgggo3MIIE +# bAcBMDEwDQYJYIZIAWUDBAIBBQAEIAVF0TcPcmmwFbcklKa57xqmG+putZihslmm +# eDqZWtB7AhBQDH3lmI32B7NR3//3cJSuGA8yMDIxMDYxNzEzMTQ1Mlqgggo3MIIE # /jCCA+agAwIBAgIQDUJK4L46iP9gQCHOFADw3TANBgkqhkiG9w0BAQsFADByMQsw # CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu # ZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQgSUQg @@ -241,17 +247,18 @@ if ($IsAzurePipelines -eq $True) { # NUMEaLLbdQLgcseY1jxk5R9IEBhfiThhTWJGJIdjjJFSLK8pieV4H9YLFKWA1xJH # cLN11ZOFk362kmf7U2GJqPVrlsD0WGkNfMgBsbkodbeZY4UijGHKeZR+WfyMD+Nv # tQEmtmyl7odRIeRYYJu6DC0rbaLEfrvEJStHAgh8Sa4TtuF8QkIoxhhWz0E0tmZd -# tnR79VYzIi8iNrJLokqV2PWmjlIxggJNMIICSQIBATCBhjByMQswCQYDVQQGEwJV +# tnR79VYzIi8iNrJLokqV2PWmjlIxggKGMIICggIBATCBhjByMQswCQYDVQQGEwJV # UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQu # Y29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQgSUQgVGltZXN0YW1w -# aW5nIENBAhANQkrgvjqI/2BAIc4UAPDdMA0GCWCGSAFlAwQCAQUAoIGYMBoGCSqG -# SIb3DQEJAzENBgsqhkiG9w0BCRABBDAcBgkqhkiG9w0BCQUxDxcNMjEwMzI0MTA0 -# OTQ1WjArBgsqhkiG9w0BCRACDDEcMBowGDAWBBTh14Ko4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Edh6NgN4Z7Kwi +# 8bzBtRUwjRQqZ3G3/1bWYkFTHTq5WC/TRrn3ic/X9FYEmTd6P2u0f/V9afc0yWMF +# OXQugdgFZ/qO0MZBwK+ZEDziUGtafh5McjSlM4G7qJcNqmGtjMvAUT9FJIjhig== # SIG # End signature block diff --git a/install-scripts/install-stm32-tools.ps1 b/install-scripts/install-stm32-tools.ps1 index 32fced9eaf..38e7bddbee 100644 --- a/install-scripts/install-stm32-tools.ps1 +++ b/install-scripts/install-stm32-tools.ps1 @@ -11,8 +11,7 @@ param ( if ([string]::IsNullOrEmpty($Path) -or $force) { # check if there is already a path set - if($env:NF_TOOLS_PATH) - { + if ($env:NF_TOOLS_PATH) { $Path = $env:NF_TOOLS_PATH } else { @@ -23,11 +22,14 @@ if ([string]::IsNullOrEmpty($Path) -or $force) { # set environment variable $env:NF_TOOLS_PATH = $Path -"Set User Environment NF_TOOLS_PATH='" + $Path + "'" | Write-Host -ForegroundColor White -[System.Environment]::SetEnvironmentVariable("NF_TOOLS_PATH", $Path, "User") +"Setting user Environment variable NF_TOOLS_PATH='" + $Path + "'" | Write-Host -ForegroundColor Yellow -# this call can fail if the script is not run with appropriate permissions -[System.Environment]::SetEnvironmentVariable("NF_TOOLS_PATH", $Path, "Machine") +try { + [System.Environment]::SetEnvironmentVariable("NF_TOOLS_PATH", $Path, "User") +} +catch { + "Failed to set User Environment Variable NF_TOOLS_PATH. Make sure to manually add 'NF_TOOLS_PATH' with '" + $env:NF_TOOLS_PATH + "'." | Write-Host -ForegroundColor Red +} # need to pass the 'force' switch? if ($force) { @@ -39,6 +41,7 @@ Invoke-Expression $PSScriptRoot\install-cmake.ps1 Invoke-Expression "$PSScriptRoot\install-arm-gcc-toolchain.ps1 $localCommandArgs" Invoke-Expression "$PSScriptRoot\install-ninja.ps1 $localCommandArgs" Invoke-Expression "$PSScriptRoot\install-nf-hex2dfu.ps1 $localCommandArgs" +Invoke-Expression "$PSScriptRoot\install-srecord.ps1 $localCommandArgs" Invoke-Expression "$PSScriptRoot\install-openocd.ps1 $localCommandArgs" <# @@ -59,10 +62,10 @@ Invoke-Expression "$PSScriptRoot\install-openocd.ps1 $localCommandArgs" #> # SIG # Begin signature block -# MIIeIQYJKoZIhvcNAQcCoIIeEjCCHg4CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# MIIeWwYJKoZIhvcNAQcCoIIeTDCCHkgCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG -# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAS8ZkAuS0450zt -# /eo37mnQEzPoYb8T1ZhFQlx7bKJvNaCCDg8wggPFMIICraADAgECAhACrFwmagtA +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD+ixsJgHLK3ve8 +# 5h5fEkuT4vQYRRFJEFgv1WKpn96fQKCCDg8wggPFMIICraADAgECAhACrFwmagtA # m48LefKuRiV3MA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xKzApBgNV # BAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNlIEVWIFJvb3QgQ0EwHhcNMDYxMTEw @@ -137,87 +140,88 @@ Invoke-Expression "$PSScriptRoot\install-openocd.ps1 $localCommandArgs" # fbrFicrII5VQXMus77/h7JfCAxMy4IKym0IOPEA+4wo1+mGNyGzsdTd4fqLibuUB # SFhQry8tS8JFAnil8J6F9WK3GvJn6gZhbavPZr442KUsb0EomhYmni25kaotNrmQ # D7Q+k2GMyx7DtgKF86uIbyfSoMavS4Yf9N7hVXmLeTeGrC5GqqcyDfe+reWOPDU6 -# EIEZMcWHkoyvJNRFXACjvNV4MK6u282mMjGCD2gwgg9kAgEBMG4wWjELMAkGA1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ibJPjwmiaEbBnvK/nbiJ9rJoWTUhUWjj90DxreIGTCBydp+pLL +# Cf2vmyGue+QvsY1SJ1vh4O7DvqB7oqLXfKlHDGCzNF22A9lKvsoIb/2GZJzRnAk= # SIG # End signature block diff --git a/src/CLR/CorLib/CorLib-vs2019.vcxproj b/src/CLR/CorLib/CorLib-vs2019.vcxproj deleted file mode 100644 index 3e072b6c83..0000000000 --- a/src/CLR/CorLib/CorLib-vs2019.vcxproj +++ /dev/null @@ -1,211 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {58E950CC-2FF6-423C-B006-A70A19272F20} - Win32Proj - CorLib - 10.0.17763.0 - CorLib - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - - - Level3 - Disabled - NANOCLR_REFLECTION=TRUE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\..\HAL\Include;..\..\PAL\Include;..\..\CLR\Helpers\Base64 - - - Windows - - - - - - - Level3 - Disabled - NANOCLR_REFLECTION=TRUE;_DEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - - - - - Level3 - - - MaxSpeed - true - true - NANOCLR_REFLECTION=TRUE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\..\HAL\Include;..\..\PAL\Include;..\..\CLR\Helpers\Base64 - - - Windows - true - true - - - - - Level3 - - - MaxSpeed - true - true - NANOCLR_REFLECTION=TRUE;NDEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/CorLib/CorLib-vs2019.vcxproj.filters b/src/CLR/CorLib/CorLib-vs2019.vcxproj.filters deleted file mode 100644 index 648a383678..0000000000 --- a/src/CLR/CorLib/CorLib-vs2019.vcxproj.filters +++ /dev/null @@ -1,186 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/src/CLR/CorLib/CorLib.vcxproj b/src/CLR/CorLib/CorLib.vcxproj index 2065ebc375..28fb4fbee8 100644 --- a/src/CLR/CorLib/CorLib.vcxproj +++ b/src/CLR/CorLib/CorLib.vcxproj @@ -65,6 +65,7 @@ + @@ -77,7 +78,7 @@ {58E950CC-2FF6-423C-B006-A70A19272F20} Win32Proj CorLib - 10.0.18362.0 + 10.0.19041.0 @@ -150,7 +151,7 @@ Level3 Disabled - NANOCLR_REFLECTION=TRUE;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + NANOCLR_REFLECTION=TRUE;SUPPORT_ANY_BASE_CONVERSION;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\..\CLR\Helpers\nanoprintf;..\Include;..\..\HAL\Include;..\..\PAL\Include;..\..\CLR\Helpers\Base64 @@ -177,7 +178,7 @@ MaxSpeed true true - NANOCLR_REFLECTION=TRUE;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + NANOCLR_REFLECTION=TRUE;SUPPORT_ANY_BASE_CONVERSION;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\..\CLR\Helpers\nanoprintf;..\Include;..\..\HAL\Include;..\..\PAL\Include;..\..\CLR\Helpers\Base64 diff --git a/src/CLR/CorLib/CorLib.vcxproj.filters b/src/CLR/CorLib/CorLib.vcxproj.filters index 46baabe485..94b8a4c749 100644 --- a/src/CLR/CorLib/CorLib.vcxproj.filters +++ b/src/CLR/CorLib/CorLib.vcxproj.filters @@ -170,5 +170,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/src/CLR/CorLib/corlib_native.cpp b/src/CLR/CorLib/corlib_native.cpp index fbff2912ce..e3b495dfab 100644 --- a/src/CLR/CorLib/corlib_native.cpp +++ b/src/CLR/CorLib/corlib_native.cpp @@ -147,6 +147,9 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_String::Trim___STRING, NULL, NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_String::Equals___STATIC__BOOLEAN__STRING__STRING, Library_corlib_native_System_String::op_Equality___STATIC__BOOLEAN__STRING__STRING, Library_corlib_native_System_String::op_Inequality___STATIC__BOOLEAN__STRING__STRING, @@ -342,10 +345,10 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN, NULL, + Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN, + Library_corlib_native_System_Convert::FromBase64String___STATIC__SZARRAY_U1__STRING, NULL, - Library_corlib_native_System_Convert::FromBase64CharArray___STATIC__SZARRAY_U1__SZARRAY_CHAR__I4, NULL, NULL, NULL, @@ -525,6 +528,9 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_GC::AnyPendingFinalizers___STATIC__BOOLEAN, NULL, Library_corlib_native_System_GC::SuppressFinalize___STATIC__VOID__OBJECT, @@ -736,6 +742,9 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_Threading_ManualResetEvent::Set___BOOLEAN, Library_corlib_native_System_Threading_Monitor::Enter___STATIC__VOID__OBJECT, Library_corlib_native_System_Threading_Monitor::Exit___STATIC__VOID__OBJECT, + Library_corlib_native_System_Threading_SpinWait::SpinOnce___VOID, + Library_corlib_native_System_Threading_SpinWait::SpinUntil___STATIC__VOID__SystemTimeSpan, + Library_corlib_native_System_Threading_SpinWait::SpinUntil___STATIC__VOID__I4, Library_corlib_native_System_Threading_Thread::_ctor___VOID__SystemThreadingThreadStart, Library_corlib_native_System_Threading_Thread::Start___VOID, Library_corlib_native_System_Threading_Thread::Abort___VOID, @@ -751,6 +760,7 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_Threading_Thread::get_ThreadState___SystemThreadingThreadState, Library_corlib_native_System_Threading_Thread::Sleep___STATIC__VOID__I4, NULL, + Library_corlib_native_System_Threading_Thread::SpinWait___STATIC__VOID__I4, Library_corlib_native_System_Threading_Thread::get_CurrentThread___STATIC__SystemThreadingThread, NULL, NULL, @@ -778,6 +788,9 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_ValueType::Equals___BOOLEAN__OBJECT, NULL, NULL, @@ -888,6 +901,9 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_String::Trim___STRING, NULL, NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_String::Equals___STATIC__BOOLEAN__STRING__STRING, Library_corlib_native_System_String::op_Equality___STATIC__BOOLEAN__STRING__STRING, Library_corlib_native_System_String::op_Inequality___STATIC__BOOLEAN__STRING__STRING, @@ -1079,10 +1095,10 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN, NULL, + Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN, + Library_corlib_native_System_Convert::FromBase64String___STATIC__SZARRAY_U1__STRING, NULL, - Library_corlib_native_System_Convert::FromBase64CharArray___STATIC__SZARRAY_U1__SZARRAY_CHAR__I4, NULL, NULL, NULL, @@ -1240,6 +1256,9 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_GC::AnyPendingFinalizers___STATIC__BOOLEAN, NULL, Library_corlib_native_System_GC::SuppressFinalize___STATIC__VOID__OBJECT, @@ -1410,6 +1429,7 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_Threading_Thread::get_ThreadState___SystemThreadingThreadState, Library_corlib_native_System_Threading_Thread::Sleep___STATIC__VOID__I4, NULL, + Library_corlib_native_System_Threading_Thread::SpinWait___STATIC__VOID__I4, Library_corlib_native_System_Threading_Thread::get_CurrentThread___STATIC__SystemThreadingThread, NULL, NULL, @@ -1440,6 +1460,9 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_ValueType::Equals___BOOLEAN__OBJECT, NULL, NULL, @@ -1467,18 +1490,18 @@ const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_mscorlib = #if (NANOCLR_REFLECTION == TRUE) - 0x7B586F51, + 0x132BDB6F, #elif (NANOCLR_REFLECTION == FALSE) - 0x670A0475, + 0x9F36C4A2, #else #error "NANOCLR_REFLECTION has to be define either TRUE or FALSE. Check the build options." #endif method_lookup, - { 100, 5, 0, 6 } + { 100, 5, 0, 12 } }; // clang-format on diff --git a/src/CLR/CorLib/corlib_native.h b/src/CLR/CorLib/corlib_native.h index f29c47c036..4873254caf 100644 --- a/src/CLR/CorLib/corlib_native.h +++ b/src/CLR/CorLib/corlib_native.h @@ -490,7 +490,7 @@ struct Library_corlib_native_System_Convert NANOCLR_NATIVE_DECLARE(NativeToInt64___STATIC__I8__STRING__BOOLEAN__I8__I8__I4); NANOCLR_NATIVE_DECLARE(NativeToDouble___STATIC__R8__STRING); NANOCLR_NATIVE_DECLARE(ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN); - NANOCLR_NATIVE_DECLARE(FromBase64CharArray___STATIC__SZARRAY_U1__SZARRAY_CHAR__I4); + NANOCLR_NATIVE_DECLARE(FromBase64String___STATIC__SZARRAY_U1__STRING); //--// @@ -787,6 +787,7 @@ struct Library_corlib_native_System_Number static int Format_G( char *buffer, CLR_RT_HeapBlock *value, + char formatChar, int precision, char *negativeSign, char *decimalSeparator); @@ -1046,6 +1047,17 @@ struct Library_corlib_native_System_Threading_Monitor //--// }; +struct Library_corlib_native_System_Threading_SpinWait +{ + NANOCLR_NATIVE_DECLARE(SpinOnce___VOID); + NANOCLR_NATIVE_DECLARE(SpinUntil___STATIC__VOID__SystemTimeSpan); + NANOCLR_NATIVE_DECLARE(SpinUntil___STATIC__VOID__I4); + + //--// + + static HRESULT Spin(CLR_RT_StackFrame &stack, bool isTimeSpan); +}; + struct Library_corlib_native_System_Threading_Thread { @@ -1069,6 +1081,7 @@ struct Library_corlib_native_System_Threading_Thread NANOCLR_NATIVE_DECLARE(Join___BOOLEAN__SystemTimeSpan); NANOCLR_NATIVE_DECLARE(get_ThreadState___SystemThreadingThreadState); NANOCLR_NATIVE_DECLARE(Sleep___STATIC__VOID__I4); + NANOCLR_NATIVE_DECLARE(SpinWait___STATIC__VOID__I4); NANOCLR_NATIVE_DECLARE(get_CurrentThread___STATIC__SystemThreadingThread); #if (NANOCLR_REFLECTION == TRUE) NANOCLR_NATIVE_DECLARE(GetDomain___STATIC__SystemAppDomain); diff --git a/src/CLR/CorLib/corlib_native_System_Convert.cpp b/src/CLR/CorLib/corlib_native_System_Convert.cpp index 50090e6c7d..4f4a0a55ac 100644 --- a/src/CLR/CorLib/corlib_native_System_Convert.cpp +++ b/src/CLR/CorLib/corlib_native_System_Convert.cpp @@ -8,115 +8,225 @@ #include #include -HRESULT Library_corlib_native_System_Convert::NativeToInt64___STATIC__I8__STRING__BOOLEAN__I8__I8__I4( CLR_RT_StackFrame& stack ) +// when running with lwip the use of errno is affected by _REENT_ONLY - see below. LWIP is included via corlib_native.h +// and lower (HAL). Win32 does not use it +#include + +HRESULT Library_corlib_native_System_Convert::NativeToInt64___STATIC__I8__STRING__BOOLEAN__I8__I8__I4( + CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); { int64_t result = 0; - char* str = (char*)stack.Arg0().RecoverString(); + char *str = (char *)stack.Arg0().RecoverString(); signed int radix = stack.Arg4().NumericByRef().s4; - -#if (SUPPORT_ANY_BASE_CONVERSION == TRUE) - // suport for conversion from any base - char* endptr = NULL; - bool isUInt64 = false; bool isSigned = (bool)stack.Arg1().NumericByRef().u1; + bool negReturnExpected = false; + long long minValue = stack.Arg2().NumericByRef().s8; long long maxValue = stack.Arg3().NumericByRef().s8; - - // UInt64? => use also strtoull the result will be casted to Int64 - if (minValue == 0 && maxValue == 0) { + if (minValue == 0 && maxValue == 0) + { isUInt64 = true; isSigned = false; + } - //allow spaces before digits - while (*str == ' ') { - str++; - } + // allow spaces before digits + while (*str == ' ') + { + str++; + } + char *endptr = NULL; - //UInt64 can't begin with minus - if (*str == '-' ) { - NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); - } + // empty string gets a format exception + if (*str == 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); + } + +#if (SUPPORT_ANY_BASE_CONVERSION == TRUE) + // suport for conversion from any base + + if (*str == '-') + { + negReturnExpected = true; } // convert via strtoll / strtoull - result = isSigned ? strtoll(str, &endptr, radix) : (long long) strtoull(str, &endptr, radix); + int error_code; + + // Have to use reentrant version of strtoll because lwip sets _REENT_ONLY to require all stdlib calls + // to be reentrant +#ifdef _REENT_ONLY + + _reent reent_data; + reent_data._errno = 0; + result = isSigned ? _strtoll_r(&reent_data, str, &endptr, radix) + : (long long)_strtoull_r(&reent_data, str, &endptr, radix); + error_code = (int)reent_data._errno; - // TODO: - // If the value in input string is out of the range of representable values - // by a long long int / unsigned long int, the function returns - // LLONG_MAX or LLONG_MIN for signed conversion - // and ULONG_MAX for unsigned conversion - // It is necessary to add a check +#else + + errno = 0; + result = isSigned ? strtoll(str, &endptr, radix) : (long long)strtoull(str, &endptr, radix); + error_code = errno; + +#endif //_REENT_ONLY + + // catch the case of exceeding signed/unsigned int64. Catch formatting errors in the next statement + if (error_code == ERANGE) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } // if no valid conversion endptr is equal str - if (str == endptr) { - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + if (str == endptr) + { + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } // allow spaces after digits - while (*endptr == ' ') { + while (*endptr == ' ') + { endptr++; } // should reach end of string no aditional chars - if (*endptr != 0) { - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + if (*endptr != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } - + // the signed values for SByte, Int16 and Int32 are always positive for base 2, 8 or 16 conversions // because the 64-bit function strtoll is used; need the post process the value // if the result is greater max and smaller (max + 1) * 2 this value should be subtracted - if (radix == 2 || radix == 8 || radix == 16) { - if (isSigned && result > maxValue && result < (maxValue + 1) * 2) result -= (maxValue + 1) * 2; + if (radix == 2 || radix == 8 || radix == 16) + { + if (isSigned && result > maxValue && result < (maxValue + 1) * 2) + { + result -= (maxValue + 1) * 2; + } } - if (!isUInt64 && !isSigned && (uint64_t)result > (uint64_t)maxValue) { + if (negReturnExpected && isSigned == false && result != 0) + { NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); - } else if (!isUInt64 && (result > maxValue || result < minValue)) { + } + + // Check min and max values for the smaller integers - the stroll and stroull will catch int64 excesses + if (!isUInt64 && !isSigned && (uint64_t)result > (uint64_t)maxValue) + { NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); - } else { + } + else if (!isUInt64 && (result > maxValue || result < minValue)) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } + else + { stack.SetResult_I8(result); } } NANOCLR_NOCLEANUP(); #else // support for conversion from base 10 and 16 (partial) - - if(radix == 10) + if (radix == 10) { // conversion from base 10 // check for minus sign - if(*str == '-') + if (*str == '-') + { + negReturnExpected = true; + str++; + } + else if (*str == '+') + { + str++; + } + + uint64_t intPart = 0; + uint64_t lastValue = 0; + + // guess at no more than 99 characters + for (int i = 0; i < 99; i++) { - // call GetIntegerPart() in 'guess' mode by throwing a crazy number for the length - result = GetIntegerPart((str + 1), 99); + if (*str < '0' || *str > '9') + { + endptr = str; + + // allow spaces after digits + while (*endptr == ' ') + { + endptr++; + } - // is negative - result *= -1; + // should reach end of string no aditional chars + if (*endptr == 0) + { + break; + } + + // non-numeric (and not trailing space) + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); + } + + // advance the digits and add the current number + intPart = (intPart * 10) + (*str - '0'); + + if (intPart < lastValue) + { + // the above operation overflowed the value + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } + + lastValue = intPart; + + str++; + if (*str == '\0') + { + break; + } } - // check for plus sign - else if(*str == '+') + + // intPart now holds a positive number from the string. + if (negReturnExpected) { - // call GetIntegerPart() in 'guess' mode by throwing a crazy number for the length - result = GetIntegerPart((str + 1), 99); + // it's ok to use -0 even for unsigned types, but otherwise - NO. + if (isSigned == false && intPart > 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } + + // too big to make a negative value? + if (intPart > (uint64_t)(minValue * -1)) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } + + result = intPart * -1; } else { - // call GetIntegerPart() in 'guess' mode by throwing a crazy number for the length - result = GetIntegerPart(str, 99); - } + // result will be negative for large uints, and we checked for overflow above + if (isUInt64 == false && intPart > (uint64_t)maxValue) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } + // this MAY have made the result negative by overflowing the buffer - which we do + // for uint64 logic. The c# code will cast the int64 to uint64 removing the sign + result = (int64_t)intPart; + } } - else if(radix == 16) + else if (radix == 16) { // conversion from base 16 result = GetIntegerFromHexString(str); + //??? check against min/max? Signed possible? } else { @@ -125,26 +235,60 @@ HRESULT Library_corlib_native_System_Convert::NativeToInt64___STATIC__I8__STRING } stack.SetResult_I8(result); + NANOCLR_NOCLEANUP(); } - NANOCLR_NOCLEANUP_NOLABEL(); + #endif // defined(SUPPORT_ANY_BASE_CONVERSION) - } -HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRING( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRING(CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); { - char* str = (char*)stack.Arg0().RecoverString(); + char *str = (char *)stack.Arg0().RecoverString(); + // skip spaces before digits + while (*str == ' ') + { + str++; + } - #if (SUPPORT_ANY_BASE_CONVERSION == TRUE) + // empty string gets a format exception + if (*str == 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); + } + +#if (SUPPORT_ANY_BASE_CONVERSION == TRUE) // suport for conversion from any base - stack.SetResult_R8 (strtod(str, nullptr)); + char *endptr = str; + + // notice we don't try to catch errno=ERANGE - IEEE574 says overflows should just convert to infinity values + double returnValue = strtod(str, &endptr); + + if (endptr == str) + { + // didn't parse the string completely + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); + } + + // allow spaces after digits + while (*endptr == ' ') + { + endptr++; + } + + // should reach end of string no aditional chars + if (*endptr != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); + } + + stack.SetResult_R8(returnValue); } - NANOCLR_NOCLEANUP_NOLABEL(); + NANOCLR_NOCLEANUP(); - #else +#else // support for conversion from base 10 and 16 (partial) // in this particular function the base isn't relevant @@ -158,7 +302,7 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN double returnValue = 0.0; // first pass, get count of decimal places, integer part and check for valid chars - char* temp = str; + char *temp = str; while (*temp != '\0') { switch (*temp) @@ -166,14 +310,20 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN case '-': if (exponentialSign == -1) { - if (length == 0) + if (length == 0 && hasMinusSign == false) { hasMinusSign = true; + + // point past the leading sign + str++; + + // don't count this in the length + length--; } - else + else { // found a minus signal NOT at the start of the string - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } } else @@ -182,10 +332,10 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN { hasMinusExponentialSign = true; } - else + else { // found a minus signal NOT at the start of the exponent - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } } break; @@ -193,14 +343,20 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN case '+': if (exponentialSign == -1) { - if (length == 0) + if (length == 0 && hasPlusSign == false) { hasPlusSign = true; + + // point past the leading sign + str++; + + // don't count this in the length + length--; } - else + else { // found a plus signal NOT at the start of the string - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } } else @@ -209,10 +365,10 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN { hasPlusExponentialSign = true; } - else + else { // found a plus signal NOT at the start of the exponent - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } } break; @@ -225,7 +381,7 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN else { // already found a decimal point, can't have another - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } break; @@ -238,15 +394,15 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN else { // already found a exponential sign, can't have another - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } break; default: - if (*temp < '0' && *temp > '9') + if (*temp < '0' || *temp > '9') { // there is an invalid char in the string - NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + NANOCLR_SET_AND_LEAVE(CLR_E_FORMAT_EXCEPTION); } } length++; @@ -263,124 +419,113 @@ HRESULT Library_corlib_native_System_Convert::NativeToDouble___STATIC__R8__STRIN else if (decimalPoint == 0) { // string starts with the decimal point, only has fractional part - returnValue = GetDoubleFractionalPart((str+decimalPoint+1), (endOrExponentialPart-decimalPoint-1)); + returnValue = GetDoubleFractionalPart((str + decimalPoint + 1), (endOrExponentialPart - decimalPoint - 1)); } - else if (hasMinusSign || hasPlusSign) + else { - // string starts with sign and... - - if(decimalPoint == 1) - { - // ... is followed by a decimal point, only has fractional part - returnValue = GetDoubleFractionalPart((str+decimalPoint+1), (endOrExponentialPart-decimalPoint-1)); - } - else - { - // ... has integer and fractional parts - returnValue = GetIntegerPart(str+1, decimalPoint-1); - returnValue = (returnValue + GetDoubleFractionalPart((str+decimalPoint+1), (endOrExponentialPart-decimalPoint-1))); - } - + // string has integer and fractional parts + returnValue = GetIntegerPart(str, decimalPoint); + returnValue = returnValue + + GetDoubleFractionalPart((str + decimalPoint + 1), (endOrExponentialPart - decimalPoint - 1)); if (hasMinusSign) { returnValue *= -1; } } - else - { - // string has integer and fractional parts - returnValue = GetIntegerPart(str, decimalPoint); - returnValue = returnValue + GetDoubleFractionalPart((str+decimalPoint+1), (endOrExponentialPart-decimalPoint-1)); - } // exponential part found? if (exponentialSign != -1) { // advance by one if a sign (+ or -) is after the exponential sign - if (hasMinusExponentialSign || hasPlusExponentialSign) exponentialSign++; + if (hasMinusExponentialSign || hasPlusExponentialSign) + { + exponentialSign++; + } + // get the exponential part - int exponent = GetIntegerPart((str+exponentialSign+1), (length-exponentialSign-1)); - // each time multiply or divide by 10 - for (int i = 0; i < exponent; i++) + int exponent = GetIntegerPart((str + exponentialSign + 1), (length - exponentialSign - 1)); + double outExponent = pow(10, exponent); + + if (hasMinusExponentialSign) { - if (hasMinusExponentialSign) - { - returnValue /= 10; - } - else - { - returnValue *= 10; - } + returnValue = returnValue / outExponent; + } + else + { + returnValue = returnValue * outExponent; } } stack.SetResult_R8(returnValue); - } - NANOCLR_NOCLEANUP(); + } - #endif // defined(SUPPORT_ANY_BASE_CONVERSION) + NANOCLR_NOCLEANUP(); +#endif // defined(SUPPORT_ANY_BASE_CONVERSION) } -HRESULT Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN( + CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); +#if (SUPPORT_ANY_BASE_CONVERSION == TRUE) + size_t outputLength; - char* outArray = NULL; - char* outArrayWitLineBreak = NULL; - uint8_t* inArrayPointer = NULL; + char *outArray = NULL; + char *outArrayWitLineBreak = NULL; + uint8_t *inArrayPointer = NULL; uint8_t lineBreakCount; uint16_t offsetIndex = 0; uint8_t count = 0; uint16_t result; - CLR_RT_HeapBlock_Array* inArray = stack.Arg0().DereferenceArray(); + CLR_RT_HeapBlock_Array *inArray = stack.Arg0().DereferenceArray(); size_t offset = (size_t)stack.Arg1().NumericByRef().s4; size_t length = (size_t)stack.Arg2().NumericByRef().s4; bool insertLineBreaks = (bool)stack.Arg3().NumericByRefConst().u1; - if(inArray == NULL) NANOCLR_SET_AND_LEAVE(CLR_E_ARGUMENT_NULL); + FAULT_ON_NULL_ARG(inArray); - inArrayPointer = (uint8_t*)inArray->GetFirstElement(); + inArrayPointer = (uint8_t *)inArray->GetFirstElement(); inArrayPointer += (offset * sizeof(uint8_t)); // compute base64 string length outputLength = 4 * ((length + 2) / 3); // need malloc with base64 string length plus string terminator (+1) - outArray = (char*)platform_malloc(outputLength + 1); + outArray = (char *)platform_malloc(outputLength + 1); // check if have allocation - if (outArray == NULL) NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + if (outArray == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + } // perform the operation // need to tweak the parameter with the output length because it includes room for the terminator - result = mbedtls_base64_encode( - (unsigned char*)outArray, - (outputLength + 1), - &outputLength, - inArrayPointer, - length ); - - if(result != 0) + result = + mbedtls_base64_encode((unsigned char *)outArray, (outputLength + 1), &outputLength, inArrayPointer, length); + + if (result != 0) { // internal error occurred NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); } - if(insertLineBreaks) + if (insertLineBreaks) { // get line break count (line break every 76 chars) lineBreakCount = outputLength / 76; - // need malloc with base64 string length plus line breaks (line break is 2 char long: CR + LF) plus final line break - outArrayWitLineBreak = (char*)platform_malloc(outputLength + (lineBreakCount * 2) + 2); + // need malloc with base64 string length plus line breaks (line break is 2 char long: CR + LF) plus final line + // break + outArrayWitLineBreak = (char *)platform_malloc(outputLength + (lineBreakCount * 2) + 2); - for(int i = 0; i <= lineBreakCount; i++) + for (int i = 0; i <= lineBreakCount; i++) { // how many chars to copy - if(outputLength > 76) + if (outputLength > 76) { // first/next 76 chars count = 76; @@ -396,7 +541,7 @@ HRESULT Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__S memcpy(outArrayWitLineBreak + offsetIndex, outArray + (offsetIndex - (i * 2)), count); // remove copied chars from original output length if more than 76 chars still to be copied - if(outputLength >= 76) + if (outputLength >= 76) { // more chars @@ -418,99 +563,86 @@ HRESULT Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__S outArrayWitLineBreak[offsetIndex] = 0; } } - // set a return result in the stack argument using the appropriate SetResult according to the variable type (a string here) + // set a return result in the stack argument using the appropriate SetResult according to the variable type (a + // string here) NANOCLR_CHECK_HRESULT(stack.SetResult_String(outArrayWitLineBreak)); } else { - // set a return result in the stack argument using the appropriate SetResult according to the variable type (a string here) + // set a return result in the stack argument using the appropriate SetResult according to the variable type (a + // string here) NANOCLR_CHECK_HRESULT(stack.SetResult_String(outArray)); } // need to free memory from arrays - platform_free((void*)outArray); + platform_free((void *)outArray); - if(outArrayWitLineBreak != NULL) + if (outArrayWitLineBreak != NULL) { - platform_free((void*)outArrayWitLineBreak); + platform_free((void *)outArrayWitLineBreak); } +#else + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + +#endif + NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Convert::FromBase64CharArray___STATIC__SZARRAY_U1__SZARRAY_CHAR__I4( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Convert::FromBase64String___STATIC__SZARRAY_U1__STRING(CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); +#if (SUPPORT_ANY_BASE_CONVERSION == TRUE) + + CLR_RT_HeapBlock_String *inString = NULL; size_t outputLength; - char* outArray = NULL; - uint16_t* inArrayPointerTmp = NULL; - uint8_t* inArrayPointer = NULL; - uint8_t charValue; - CLR_UINT8* returnArray; - int16_t i = 0; + char *outArray = NULL; + CLR_UINT8 *returnArray; uint16_t result; + size_t length; - CLR_RT_HeapBlock_Array* inArray = stack.Arg0().DereferenceArray(); - size_t length = (size_t)stack.Arg1().NumericByRef().s4; + inString = stack.Arg0().DereferenceString(); + FAULT_ON_NULL(inString); - if(inArray == NULL) NANOCLR_SET_AND_LEAVE(CLR_E_ARGUMENT_NULL); + FAULT_ON_NULL_ARG(inString->StringText()); - outputLength = length / 4 * 3; + length = (size_t)hal_strlen_s(inString->StringText()); - // transform the 16 bits inArray to a 8 bits array so mbed knows how to convert it - inArrayPointerTmp = (uint16_t*)inArray->GetFirstElementUInt16(); - inArrayPointer = (uint8_t*)inArray->GetFirstElement(); - for(i = 0; i < (int16_t)length; i++) - { - *inArrayPointer = *inArrayPointerTmp; - inArrayPointer++; - inArrayPointerTmp++; - } - - // pointer is pointing to the end - // point to last char in array and get it - inArrayPointer--; - charValue = *inArrayPointer; - // adjust output length - if (charValue == '=') - { - outputLength--; - } + // estimate output length + outputLength = length / 4 * 3; - // point to before last char and get it - inArrayPointer--; - charValue = *inArrayPointer; - // adjust output length - if (charValue == '=') + // alloc output array + outArray = (char *)platform_malloc(outputLength + 1); + // check malloc success + if (outArray == NULL) { - outputLength--; + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); } - // reset pointer position (-2 because above we already went back two positions) - inArrayPointer -= length - 2; - - outArray = (char*)platform_malloc(outputLength + 1); - // check malloc success - if (outArray == NULL) NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); - // perform the operation // need to tweak the parameter with the output length because it includes room for the terminator - result = mbedtls_base64_decode( - (unsigned char*)outArray, - (outputLength + 1), - &outputLength, - inArrayPointer, - length ); - - if(result != 0) + result = mbedtls_base64_decode( + (unsigned char *)outArray, + (outputLength + 1), + &outputLength, + (const unsigned char *)inString->StringText(), + length); + + if (result != 0) { // internal error occurred NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); } - // create heap block array instance with appropriate size (the length of the output array) and type (byte which is uint8_t) - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( stack.PushValueAndClear() , outputLength, g_CLR_RT_WellKnownTypes.m_UInt8 )); + // create heap block array instance with appropriate size (the length of the output array) + // and type (byte which is uint8_t) + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( + stack.PushValueAndClear(), + outputLength, + g_CLR_RT_WellKnownTypes.m_UInt8)); // get a pointer to the array in the heap block array just created returnArray = stack.TopValue().DereferenceArray()->GetFirstElement(); @@ -518,13 +650,26 @@ HRESULT Library_corlib_native_System_Convert::FromBase64CharArray___STATIC__SZAR // copy outArray to the returnArray memcpy(returnArray, outArray, outputLength); - // need to free memory from outArray - platform_free(outArray); + NANOCLR_CLEANUP(); + + if (outArray) + { + // need to free memory from outArray + platform_free(outArray); + } + + NANOCLR_CLEANUP_END(); + +#else + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); NANOCLR_NOCLEANUP(); + +#endif } -double Library_corlib_native_System_Convert::GetDoubleFractionalPart(char* str, int length) +double Library_corlib_native_System_Convert::GetDoubleFractionalPart(char *str, int length) { double place = 1; double returnValue = 0.0; @@ -540,7 +685,7 @@ double Library_corlib_native_System_Convert::GetDoubleFractionalPart(char* str, return returnValue; } -int64_t Library_corlib_native_System_Convert::GetIntegerPart(char* str, int length) +int64_t Library_corlib_native_System_Convert::GetIntegerPart(char *str, int length) { int64_t returnValue = 0; @@ -550,7 +695,7 @@ int64_t Library_corlib_native_System_Convert::GetIntegerPart(char* str, int leng str++; // check for terminator, in case this is being called in 'guess' mode - if(*str == '\0') + if (*str == '\0') { break; } @@ -559,35 +704,35 @@ int64_t Library_corlib_native_System_Convert::GetIntegerPart(char* str, int leng return returnValue; } -int64_t Library_corlib_native_System_Convert::GetIntegerFromHexString(char* str) +int64_t Library_corlib_native_System_Convert::GetIntegerFromHexString(char *str) { int64_t returnValue = 0; - if ((*str == '0') && (*(str+1) == 'x')) + if ((*str == '0') && (*(str + 1) == 'x')) { // there a 0x at the begining of the string, so move pointer forward 2 notches str += 2; } - while (*str != '\0') - { - char c = toupper(*str++); + while (*str != '\0') + { + char c = toupper(*str++); - if ((c < '0') || (c > 'F') || ((c > '9') && (c < 'A'))) + if ((c < '0') || (c > 'F') || ((c > '9') && (c < 'A'))) { // there is an invalid char in the string break; } - c -= '0'; + c -= '0'; - if (c > 9) + if (c > 9) { - c -= 7; + c -= 7; } - returnValue = (returnValue << 4) + c; - } + returnValue = (returnValue << 4) + c; + } - return returnValue; + return returnValue; } diff --git a/src/CLR/CorLib/corlib_native_System_Exception.cpp b/src/CLR/CorLib/corlib_native_System_Exception.cpp index 860ba8a970..4cc1caff22 100644 --- a/src/CLR/CorLib/corlib_native_System_Exception.cpp +++ b/src/CLR/CorLib/corlib_native_System_Exception.cpp @@ -8,79 +8,89 @@ struct ExceptionLookup { HRESULT hr; - CLR_RT_TypeDef_Index* ptr; + CLR_RT_TypeDef_Index *ptr; }; -static const ExceptionLookup c_ExceptionLookup[] = -{ -#define EL(hr,fld) { hr, &g_CLR_RT_WellKnownTypes.fld } - EL(CLR_E_APPDOMAIN_EXITED , m_AppDomainUnloadedException ), - EL(CLR_E_INVALID_PARAMETER , m_ArgumentException ), - EL(CLR_E_ARGUMENT_NULL , m_ArgumentNullException ), - EL(CLR_E_OUT_OF_RANGE , m_ArgumentOutOfRangeException), - EL(CLR_E_INDEX_OUT_OF_RANGE , m_IndexOutOfRangeException ), - EL(CLR_E_INVALID_CAST , m_InvalidCastException ), - EL(CLR_E_INVALID_OPERATION , m_InvalidOperationException ), - EL(CLR_E_NOT_SUPPORTED , m_NotSupportedException ), - EL(CLR_E_NOTIMPL , m_NotImplementedException ), - EL(CLR_E_NULL_REFERENCE , m_NullReferenceException ), - EL(CLR_E_OUT_OF_MEMORY , m_OutOfMemoryException ), - EL(CLR_E_OBJECT_DISPOSED , m_ObjectDisposedException ), - EL(CLR_E_WATCHDOG_TIMEOUT , m_WatchdogException ), +static const ExceptionLookup c_ExceptionLookup[] = { +#define EL(hr, fld) \ + { \ + hr, &g_CLR_RT_WellKnownTypes.fld \ + } + EL(CLR_E_APPDOMAIN_EXITED, m_AppDomainUnloadedException), + EL(CLR_E_INVALID_PARAMETER, m_ArgumentException), + EL(CLR_E_ARGUMENT_NULL, m_ArgumentNullException), + EL(CLR_E_OUT_OF_RANGE, m_ArgumentOutOfRangeException), + EL(CLR_E_INDEX_OUT_OF_RANGE, m_IndexOutOfRangeException), + EL(CLR_E_INVALID_CAST, m_InvalidCastException), + EL(CLR_E_FORMAT_EXCEPTION, m_FormatException), + EL(CLR_E_INVALID_OPERATION, m_InvalidOperationException), + EL(CLR_E_NOT_SUPPORTED, m_NotSupportedException), + EL(CLR_E_NOTIMPL, m_NotImplementedException), + EL(CLR_E_NULL_REFERENCE, m_NullReferenceException), + EL(CLR_E_OUT_OF_MEMORY, m_OutOfMemoryException), + EL(CLR_E_TIMEOUT, m_TimeoutException), + EL(CLR_E_OBJECT_DISPOSED, m_ObjectDisposedException), + EL(CLR_E_WATCHDOG_TIMEOUT, m_WatchdogException), #undef EL }; //--// -HRESULT Library_corlib_native_System_Exception::get_StackTrace___STRING( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Exception::get_StackTrace___STRING(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_HeapBlock_Array* pArray; - StackTrace* pStackTrace; - CLR_RT_HeapBlock* pBlkString; - char buf[ 512 ]; - char* strName; - size_t iName; - CLR_RT_HeapBlock tmpArray; tmpArray.SetObjectReference( NULL ); - CLR_RT_ProtectFromGC gc(tmpArray); - int depth = 0; - CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis); - - pArray = pThis[ FIELD___stackTrace ].DereferenceArray(); - - if(pArray) + CLR_RT_HeapBlock_Array *pArray; + StackTrace *pStackTrace; + CLR_RT_HeapBlock *pBlkString; + char buf[512]; + char *strName; + size_t iName; + CLR_RT_HeapBlock tmpArray; + tmpArray.SetObjectReference(NULL); + CLR_RT_ProtectFromGC gc(tmpArray); + int depth = 0; + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + pArray = pThis[FIELD___stackTrace].DereferenceArray(); + + if (pArray) { _ASSERTE(pArray->m_typeOfElement == DATATYPE_U1); - depth = pArray->m_numOfElements / sizeof(StackTrace); + depth = pArray->m_numOfElements / sizeof(StackTrace); } - if(depth == 0) NANOCLR_SET_AND_LEAVE(stack.SetResult_String(NULL)); - - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( tmpArray, depth, g_CLR_RT_WellKnownTypes.m_String )); + if (depth == 0) + NANOCLR_SET_AND_LEAVE(stack.SetResult_String(NULL)); + + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance(tmpArray, depth, g_CLR_RT_WellKnownTypes.m_String)); - pStackTrace = (StackTrace*)pArray->GetFirstElement(); - pBlkString = (CLR_RT_HeapBlock*)tmpArray.DereferenceArray()->GetFirstElement(); + pStackTrace = (StackTrace *)pArray->GetFirstElement(); + pBlkString = (CLR_RT_HeapBlock *)tmpArray.DereferenceArray()->GetFirstElement(); - for(int i = 0; i < depth; i++) + for (int i = 0; i < depth; i++) { - strName = &buf[ 0 ]; - iName = MAXSTRLEN(buf) - 2 ; + strName = &buf[0]; + iName = MAXSTRLEN(buf) - 2; + + NANOCLR_CHECK_HRESULT(g_CLR_RT_TypeSystem.BuildMethodName(pStackTrace->m_md, strName, iName)); - NANOCLR_CHECK_HRESULT(g_CLR_RT_TypeSystem.BuildMethodName( pStackTrace->m_md, strName, iName )); - memcpy(strName, "\r\n\0", 3); - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_String::CreateInstance( *pBlkString, buf )); + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_String::CreateInstance(*pBlkString, buf)); pStackTrace++; pBlkString++; - } + } - NANOCLR_SET_AND_LEAVE(Library_corlib_native_System_String::Concat( stack, (CLR_RT_HeapBlock*)tmpArray.DereferenceArray()->GetFirstElement(), depth )); + NANOCLR_SET_AND_LEAVE(Library_corlib_native_System_String::Concat( + stack, + (CLR_RT_HeapBlock *)tmpArray.DereferenceArray()->GetFirstElement(), + depth)); NANOCLR_NOCLEANUP(); } @@ -89,90 +99,98 @@ HRESULT Library_corlib_native_System_Exception::get_StackTrace___STRING( CLR_RT_ /* This function will always succeed. - Return values - - S_OK. + Return values + - S_OK. - S_FALSE. ref points to the pre-allocated OutOfMemory exception */ -HRESULT Library_corlib_native_System_Exception::CreateInstance( CLR_RT_HeapBlock& ref, const CLR_RT_TypeDef_Index& cls, HRESULT hrIn, CLR_RT_StackFrame* stack ) +HRESULT Library_corlib_native_System_Exception::CreateInstance( + CLR_RT_HeapBlock &ref, + const CLR_RT_TypeDef_Index &cls, + HRESULT hrIn, + CLR_RT_StackFrame *stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); #if defined(NANOCLR_APPDOMAINS) - CLR_RT_AppDomain* appDomainSav = g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( stack->m_appDomain ); + CLR_RT_AppDomain *appDomainSav = g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(stack->m_appDomain); #endif - - CLR_RT_HeapBlock* obj; - _ASSERTE(CLR_RT_ExecutionEngine::IsInstanceOf( cls, g_CLR_RT_WellKnownTypes.m_Exception )); + CLR_RT_HeapBlock *obj; + + _ASSERTE(CLR_RT_ExecutionEngine::IsInstanceOf(cls, g_CLR_RT_WellKnownTypes.m_Exception)); - if(FAILED(hr = g_CLR_RT_ExecutionEngine.NewObjectFromIndex( ref, cls ))) + if (FAILED(hr = g_CLR_RT_ExecutionEngine.NewObjectFromIndex(ref, cls))) { #if defined(NANOCLR_APPDOMAINS) - ref.SetObjectReference( g_CLR_RT_ExecutionEngine.GetCurrentAppDomain()->m_outOfMemoryException ); + ref.SetObjectReference(g_CLR_RT_ExecutionEngine.GetCurrentAppDomain()->m_outOfMemoryException); #else - ref.SetObjectReference( g_CLR_RT_ExecutionEngine.m_outOfMemoryException ); + ref.SetObjectReference(g_CLR_RT_ExecutionEngine.m_outOfMemoryException); #endif - hrIn = CLR_E_OUT_OF_MEMORY; - hr = S_FALSE; + hrIn = CLR_E_OUT_OF_MEMORY; + hr = S_FALSE; } obj = ref.Dereference(); - obj[ FIELD__HResult ].SetInteger( (CLR_UINT32)hrIn ); + obj[FIELD__HResult].SetInteger((CLR_UINT32)hrIn); - if(hr == S_OK) + if (hr == S_OK) { - (void)SetStackTrace( ref, stack ); + (void)SetStackTrace(ref, stack); } - + #if defined(NANOCLR_APPDOMAINS) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( appDomainSav ); + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(appDomainSav); #endif NANOCLR_NOCLEANUP_NOLABEL(); } -HRESULT Library_corlib_native_System_Exception::CreateInstance( CLR_RT_HeapBlock& ref, HRESULT hrIn, CLR_RT_StackFrame* stack ) +HRESULT Library_corlib_native_System_Exception::CreateInstance( + CLR_RT_HeapBlock &ref, + HRESULT hrIn, + CLR_RT_StackFrame *stack) { NATIVE_PROFILE_CLR_CORE(); - CLR_RT_TypeDef_Index* cls = &g_CLR_RT_WellKnownTypes.m_Exception; + CLR_RT_TypeDef_Index *cls = &g_CLR_RT_WellKnownTypes.m_Exception; _ASSERTE(FAILED(hrIn)); - for(uint32_t i = 0; i < ARRAYSIZE(c_ExceptionLookup); i++) + for (uint32_t i = 0; i < ARRAYSIZE(c_ExceptionLookup); i++) { - if(c_ExceptionLookup[ i ].hr == hrIn) + if (c_ExceptionLookup[i].hr == hrIn) { - cls = c_ExceptionLookup[ i ].ptr; + cls = c_ExceptionLookup[i].ptr; break; } } - - return CreateInstance( ref, *cls, hrIn, stack ); + + return CreateInstance(ref, *cls, hrIn, stack); } -HRESULT Library_corlib_native_System_Exception::SetStackTrace( CLR_RT_HeapBlock& ref, CLR_RT_StackFrame* stack ) +HRESULT Library_corlib_native_System_Exception::SetStackTrace(CLR_RT_HeapBlock &ref, CLR_RT_StackFrame *stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - if(stack) + if (stack) { - CLR_RT_HeapBlock* obj; - CLR_RT_HeapBlock_Array* array; - StackTrace* dst; - CLR_UINT32 depth; + CLR_RT_HeapBlock *obj; + CLR_RT_HeapBlock_Array *array; + StackTrace *dst; + CLR_UINT32 depth; - if(CLR_RT_ExecutionEngine::IsInstanceOf( ref, g_CLR_RT_WellKnownTypes.m_Exception ) == false) NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); + if (CLR_RT_ExecutionEngine::IsInstanceOf(ref, g_CLR_RT_WellKnownTypes.m_Exception) == false) + NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); //--// - obj = ref.Dereference(); + obj = ref.Dereference(); depth = 0; - NANOCLR_FOREACH_NODE_BACKWARD__DIRECT(CLR_RT_StackFrame,stackSub,stack) + NANOCLR_FOREACH_NODE_BACKWARD__DIRECT(CLR_RT_StackFrame, stackSub, stack) { depth++; } @@ -180,16 +198,19 @@ HRESULT Library_corlib_native_System_Exception::SetStackTrace( CLR_RT_HeapBlock& //--// - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( obj[ FIELD___stackTrace ], depth * sizeof(StackTrace), g_CLR_RT_WellKnownTypes.m_UInt8 )); + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( + obj[FIELD___stackTrace], + depth * sizeof(StackTrace), + g_CLR_RT_WellKnownTypes.m_UInt8)); //--// - array = obj[ FIELD___stackTrace ].DereferenceArray(); - dst = (StackTrace*)array->GetFirstElement(); + array = obj[FIELD___stackTrace].DereferenceArray(); + dst = (StackTrace *)array->GetFirstElement(); - NANOCLR_FOREACH_NODE_BACKWARD__DIRECT(CLR_RT_StackFrame,stackSub,stack) + NANOCLR_FOREACH_NODE_BACKWARD__DIRECT(CLR_RT_StackFrame, stackSub, stack) { - dst->m_md = stackSub->m_call; + dst->m_md = stackSub->m_call; dst->m_IP = (CLR_UINT32)(stackSub->m_IP - stackSub->m_IPstart); dst++; @@ -197,36 +218,38 @@ HRESULT Library_corlib_native_System_Exception::SetStackTrace( CLR_RT_HeapBlock& NANOCLR_FOREACH_NODE_BACKWARD_END(); #if !defined(BUILD_RTM) - //shutting down the EE happens by Thread->Abort. These exceptions are by design, and - //don't need to be logged, or written to the console.... - if(!g_CLR_RT_ExecutionEngine.m_fShuttingDown) + // shutting down the EE happens by Thread->Abort. These exceptions are by design, and + // don't need to be logged, or written to the console.... + if (!g_CLR_RT_ExecutionEngine.m_fShuttingDown) #endif { - CLR_RT_DUMP::EXCEPTION( *stack, ref ); + CLR_RT_DUMP::EXCEPTION(*stack, ref); } } NANOCLR_NOCLEANUP(); } -CLR_RT_HeapBlock* Library_corlib_native_System_Exception::GetTarget( CLR_RT_HeapBlock& ref ) +CLR_RT_HeapBlock *Library_corlib_native_System_Exception::GetTarget(CLR_RT_HeapBlock &ref) { NATIVE_PROFILE_CLR_CORE(); - return CLR_RT_ExecutionEngine::IsInstanceOf( ref, g_CLR_RT_WellKnownTypes.m_Exception ) ? ref.Dereference() : NULL; + return CLR_RT_ExecutionEngine::IsInstanceOf(ref, g_CLR_RT_WellKnownTypes.m_Exception) ? ref.Dereference() : NULL; } -Library_corlib_native_System_Exception::StackTrace* Library_corlib_native_System_Exception::GetStackTrace( CLR_RT_HeapBlock* obj, CLR_UINT32& depth ) +Library_corlib_native_System_Exception::StackTrace *Library_corlib_native_System_Exception::GetStackTrace( + CLR_RT_HeapBlock *obj, + CLR_UINT32 &depth) { NATIVE_PROFILE_CLR_CORE(); - if(obj) + if (obj) { - CLR_RT_HeapBlock_Array* array = obj[ FIELD___stackTrace ].DereferenceArray(); + CLR_RT_HeapBlock_Array *array = obj[FIELD___stackTrace].DereferenceArray(); - if(array) + if (array) { depth = array->m_numOfElements / sizeof(StackTrace); - return (StackTrace*)array->GetFirstElement(); + return (StackTrace *)array->GetFirstElement(); } } diff --git a/src/CLR/CorLib/corlib_native_System_Number.cpp b/src/CLR/CorLib/corlib_native_System_Number.cpp index 241294899c..7f18a4d786 100644 --- a/src/CLR/CorLib/corlib_native_System_Number.cpp +++ b/src/CLR/CorLib/corlib_native_System_Number.cpp @@ -283,7 +283,7 @@ int Library_corlib_native_System_Number::InsertGroupSeparators( int dotIndex = GetDotIndex(buffer, bufferContentLength); if (dotIndex != -1) { - significantDigitCount = dotIndex; + significantDigitCount = dotIndex - 1; } if (buffer[0] == '-') { @@ -312,7 +312,7 @@ int Library_corlib_native_System_Number::InsertGroupSeparators( for (;;) { - if ((srcIdx - significantDigitsStartAtIndex) < groupSize) + if ((srcIdx - significantDigitsStartAtIndex) <= groupSize) break; tgtIdx -= groupSize; @@ -331,6 +331,7 @@ int Library_corlib_native_System_Number::InsertGroupSeparators( int Library_corlib_native_System_Number::Format_G( char *buffer, CLR_RT_HeapBlock *value, + char formatChar, int precision, char *negativeSign, char *decimalSeparator) @@ -422,6 +423,10 @@ int Library_corlib_native_System_Number::Format_G( { ret = i + 1; char first_lost_digit = buffer[ret]; + if (first_lost_digit == '.' && (ret + 1) < savedResultLength) + { + first_lost_digit = buffer[ret + 1]; + } buffer[ret] = 0; if (first_lost_digit >= '5') { @@ -468,7 +473,14 @@ int Library_corlib_native_System_Number::Format_G( // append 'E+exp' int exponent = (dotIndex == -1) ? savedResultLength - 1 : dotIndex - 1; exponent -= offsetBecauseOfNegativeSign; - ret += snprintf(&buffer[ret], FORMAT_RESULT_BUFFER_SIZE - ret, "E+%02d", exponent); + if (formatChar == 'g') + { + ret += snprintf(&buffer[ret], FORMAT_RESULT_BUFFER_SIZE - ret, "e+%02d", exponent); + } + else + { + ret += snprintf(&buffer[ret], FORMAT_RESULT_BUFFER_SIZE - ret, "E+%02d", exponent); + } } } @@ -838,7 +850,7 @@ HRESULT Library_corlib_native_System_Number:: { case 'g': case 'G': - resultLength = Format_G(result, value, precision, negativeSign, numberDecimalSeparator); + resultLength = Format_G(result, value, formatChar, precision, negativeSign, numberDecimalSeparator); break; case 'x': case 'X': diff --git a/src/CLR/CorLib/corlib_native_System_Reflection_Assembly.cpp b/src/CLR/CorLib/corlib_native_System_Reflection_Assembly.cpp index fb13a47169..2ac651ccf7 100644 --- a/src/CLR/CorLib/corlib_native_System_Reflection_Assembly.cpp +++ b/src/CLR/CorLib/corlib_native_System_Reflection_Assembly.cpp @@ -282,49 +282,115 @@ HRESULT Library_corlib_native_System_Reflection_Assembly::Load___STATIC__SystemR CLR_RT_HeapBlock_Array *array = NULL; CLR_RT_Assembly *assm = NULL; - CLR_RT_HeapBlock &top = stack.PushValueAndClear(); CLR_RT_HeapBlock *hbObj; CLR_RECORD_ASSEMBLY *header; + CLR_RT_Assembly_Index idx; + CLR_RT_HeapBlock hbTimeout; + + CLR_INT64 *timeoutTicks; + bool eventResult = true; array = stack.Arg0().DereferenceArray(); FAULT_ON_NULL(array); header = (CLR_RECORD_ASSEMBLY *)array->GetFirstElement(); - if (header->GoodAssembly()) + // !! need to cast to CLR_INT64 otherwise it wont setup a proper timeout + hbTimeout.SetInteger((CLR_INT64)2 * CLR_RT_Thread::c_TimeQuantum_Milliseconds * TIME_CONVERSION__TO_MILLISECONDS); + + // setup timeout + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // parsing step only required in the first step + if (stack.m_customState == 1) { - // - // Sorry, you'll have to reboot to load this assembly. - // - if (header->flags & CLR_RECORD_ASSEMBLY::c_Flags_NeedReboot) + if (header->GoodAssembly()) { - NANOCLR_SET_AND_LEAVE(CLR_E_BUSY); - } + // + // Sorry, you'll have to reboot to load this assembly. + // + if (header->flags & CLR_RECORD_ASSEMBLY::c_Flags_NeedReboot) + { + NANOCLR_SET_AND_LEAVE(CLR_E_BUSY); + } - NANOCLR_CHECK_HRESULT(CLR_RT_Assembly::CreateInstance(header, assm)); + NANOCLR_CHECK_HRESULT(CLR_RT_Assembly::CreateInstance(header, assm)); - assm->m_pFile = array; + assm->m_pFile = array; - g_CLR_RT_TypeSystem.Link(assm); + g_CLR_RT_TypeSystem.Link(assm); - NANOCLR_CHECK_HRESULT(g_CLR_RT_TypeSystem.ResolveAll()); - NANOCLR_CHECK_HRESULT(g_CLR_RT_TypeSystem.PrepareForExecution()); + NANOCLR_CHECK_HRESULT(g_CLR_RT_TypeSystem.ResolveAll()); + NANOCLR_CHECK_HRESULT(g_CLR_RT_TypeSystem.PrepareForExecution()); + + if (assm->m_iStaticFields > 0) + { + // need to execute static constructors + g_CLR_RT_ExecutionEngine.SpawnStaticConstructor(g_CLR_RT_ExecutionEngine.m_cctorThread); + + // bump custom state so the read value above is pushed only once + stack.m_customState = 2; + } + else + { + // no need to execute static constructors + eventResult = false; + } + + // push assembly index onto the eval stack + stack.PushValueU4(assm->m_idx); + } + else + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + } + else + { + // get assembly index from the eval stack + idx.Set(stack.m_evalStack[1].NumericByRef().u4); + + assm = g_CLR_RT_TypeSystem.m_assemblies[idx.Assembly() - 1]; } - if (assm) + while (eventResult) { - CLR_RT_Assembly_Index idx; - idx.Set(assm->m_idx); + if (assm->m_flags & CLR_RT_Assembly::StaticConstructorsExecuted) + { + // static constructors executed, we are good here + break; + } - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(top, g_CLR_RT_WellKnownTypes.m_Assembly)); + // non-blocking wait allowing other threads to run while we wait for the Tx operation to complete + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeoutTicks, Event_NoEvent, eventResult)) - hbObj = top.Dereference(); + // check for failure + if (!eventResult) + { + // can't happen! + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + } + + // pop assembly index from stack + stack.PopValue(); + + // pop timeout heap block from stack + stack.PopValue(); + + if (assm->m_flags & CLR_RT_Assembly::StaticConstructorsExecuted) + { + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.NewObjectFromIndex(stack.PushValue(), g_CLR_RT_WellKnownTypes.m_Assembly)); + + hbObj = stack.TopValue().Dereference(); hbObj->SetReflection(idx); } NANOCLR_CLEANUP(); - if (FAILED(hr)) + if (FAILED(hr) && hr != CLR_E_THREAD_WAITING) { if (assm) { diff --git a/src/CLR/CorLib/corlib_native_System_Threading_SpinWait.cpp b/src/CLR/CorLib/corlib_native_System_Threading_SpinWait.cpp new file mode 100644 index 0000000000..de817109bc --- /dev/null +++ b/src/CLR/CorLib/corlib_native_System_Threading_SpinWait.cpp @@ -0,0 +1,119 @@ +//----------------------------------------------------------------------------- +// +// ** WARNING! ** +// This file was generated automatically by a tool. +// Re-running the tool will overwrite this file. +// You should copy this file to a custom location +// before adding any customization in the copy to +// prevent loss of your changes when the tool is +// re-run. +// +//----------------------------------------------------------------------------- + +#include "corlib_native.h" + +HRESULT Library_corlib_native_System_Threading_SpinWait::SpinOnce___VOID(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); + + (void)stack; + + // basically... do nothing! + + NANOCLR_NOCLEANUP_NOLABEL(); +} + +HRESULT Library_corlib_native_System_Threading_SpinWait::SpinUntil___STATIC__VOID__SystemTimeSpan( + CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); + + NANOCLR_CHECK_HRESULT(Spin(stack, true)); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_corlib_native_System_Threading_SpinWait::SpinUntil___STATIC__VOID__I4(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); + + NANOCLR_CHECK_HRESULT(Spin(stack, true)); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_corlib_native_System_Threading_SpinWait::Spin(CLR_RT_StackFrame &stack, bool isTimeSpan) +{ + NANOCLR_HEADER(); + + CLR_INT64 *timeout; + CLR_INT64 timeoutMiliseconds; + CLR_RT_HeapBlock hbTimeout; + bool longRunning; + bool eventResult = true; + + if (isTimeSpan) + { + timeout = Library_corlib_native_System_TimeSpan::GetValuePtr(stack.Arg0()); + FAULT_ON_NULL_ARG(timeout); + + if (*timeout < -1) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + } + + if (*timeout == -1) + { + // this is infinite timeout + timeoutMiliseconds = *timeout; + } + else + { + // convert to milliseconds + timeoutMiliseconds = *timeout / TIME_CONVERSION__TO_MILLISECONDS; + } + } + else + { + timeoutMiliseconds = stack.Arg0().NumericByRef().s4; + } + + longRunning = timeoutMiliseconds > (CLR_INT64)CLR_RT_Thread::c_TimeQuantum_Milliseconds; + + if (longRunning) + { + // this is longer than the thread time quantum + hbTimeout.SetInteger(timeoutMiliseconds * TIME_CONVERSION__TO_MILLISECONDS); + + // if m_customState == 0 then push timeout on to eval stack[0] then move to m_customState = 1 + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeout)); + + if (stack.m_customState == 1) + { + // bump custom state + stack.m_customState = 2; + } + + while (eventResult) + { + // non-blocking wait allowing other threads to run while we wait for the timeout to occur + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeout, Event_NoEvent, eventResult)); + + // don't bother checking the result, it will be a timeout for sure + } + + // pop timeout heap block from stack + stack.PopValue(); + } + else + { + // just delay + OS_DELAY(timeoutMiliseconds); + } + + NANOCLR_NOCLEANUP(); +} diff --git a/src/CLR/CorLib/corlib_native_System_Threading_Thread.cpp b/src/CLR/CorLib/corlib_native_System_Threading_Thread.cpp index 879cc49287..e6552ace38 100644 --- a/src/CLR/CorLib/corlib_native_System_Threading_Thread.cpp +++ b/src/CLR/CorLib/corlib_native_System_Threading_Thread.cpp @@ -7,77 +7,81 @@ //--// -HRESULT Library_corlib_native_System_Threading_Thread::_ctor___VOID__SystemThreadingThreadStart( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::_ctor___VOID__SystemThreadingThreadStart( + CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_HeapBlock* pThis = stack.This(); + CLR_RT_HeapBlock *pThis = stack.This(); + + pThis[FIELD___delegate].Assign(stack.Arg1()); - pThis[ FIELD___delegate ].Assign ( stack.Arg1() ); - // Thread is always constructed with normal priority. - pThis[ FIELD___priority ].NumericByRef().s4 = ThreadPriority::Normal; - + pThis[FIELD___priority].NumericByRef().s4 = ThreadPriority::Normal; + // Book a Thread ID - pThis[ FIELD___id ].NumericByRef().s4 = g_CLR_RT_ExecutionEngine.GetNextThreadId(); - - + pThis[FIELD___id].NumericByRef().s4 = g_CLR_RT_ExecutionEngine.GetNextThreadId(); + #if defined(NANOCLR_APPDOMAINS) - NANOCLR_CHECK_HRESULT(CLR_RT_ObjectToEvent_Source::CreateInstance( g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(), *pThis, pThis[ FIELD___appDomain ] )); + NANOCLR_CHECK_HRESULT(CLR_RT_ObjectToEvent_Source::CreateInstance( + g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(), + *pThis, + pThis[FIELD___appDomain])); NANOCLR_NOCLEANUP(); #else NANOCLR_NOCLEANUP_NOLABEL(); #endif - } -HRESULT Library_corlib_native_System_Threading_Thread::Start___VOID( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Start___VOID(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; - CLR_RT_HeapBlock* pThis; - CLR_RT_HeapBlock_Delegate* dlg; - int pri; + CLR_RT_Thread *th; + CLR_RT_HeapBlock *pThis; + CLR_RT_HeapBlock_Delegate *dlg; + int pri; // // Don't start twice... // - NANOCLR_CHECK_HRESULT(GetThread( stack, th, false, false )); - if(th != NULL) + NANOCLR_CHECK_HRESULT(GetThread(stack, th, false, false)); + if (th != NULL) { NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); } - pThis = stack.This(); FAULT_ON_NULL(pThis); - dlg = pThis[ FIELD___delegate ].DereferenceDelegate(); FAULT_ON_NULL(dlg ); - + pThis = stack.This(); + FAULT_ON_NULL(pThis); + dlg = pThis[FIELD___delegate].DereferenceDelegate(); + FAULT_ON_NULL(dlg); + // Set priority of new sub-thread to the priority stored in the thread C# object. - // The new sub-thread becames the current one, it should always match priority stored in Thread C# object + // The new sub-thread becames the current one, it should always match priority stored in Thread C# object - pri = pThis[ FIELD___priority ].NumericByRef().s4; + pri = pThis[FIELD___priority].NumericByRef().s4; - pThis->ResetFlags( CLR_RT_HeapBlock::HB_Signaled ); + pThis->ResetFlags(CLR_RT_HeapBlock::HB_Signaled); - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewThread( th, dlg, pri, pThis[ FIELD___id ].NumericByRef().s4 )); + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewThread(th, dlg, pri, pThis[FIELD___id].NumericByRef().s4)); - NANOCLR_SET_AND_LEAVE(SetThread( stack, th )); + NANOCLR_SET_AND_LEAVE(SetThread(stack, th)); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Abort___VOID( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Abort___VOID(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; + CLR_RT_Thread *th; - NANOCLR_CHECK_HRESULT(GetThread( stack, th, true, true )); + NANOCLR_CHECK_HRESULT(GetThread(stack, th, true, true)); - if(th == stack.m_owningThread) + if (th == stack.m_owningThread) { NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); } @@ -87,43 +91,43 @@ HRESULT Library_corlib_native_System_Threading_Thread::Abort___VOID( CLR_RT_Stac NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Suspend___VOID( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Suspend___VOID(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - + // Test if this the call from managed Thread.Suspend() or second call on resume. - switch( stack.m_customState ) + switch (stack.m_customState) { // This is the normal call from managed code. - case 0: - { - CLR_RT_Thread* th; + case 0: + { + CLR_RT_Thread *th; - NANOCLR_CHECK_HRESULT(GetThread( stack, th, true, true )); + NANOCLR_CHECK_HRESULT(GetThread(stack, th, true, true)); - NANOCLR_CHECK_HRESULT(th->Suspend()); - - // If the thread suspends itself, then we need to re-schedule. - if ( stack.m_owningThread == th ) - { // Set flag in thread stack that thread is re-scheduled. - stack.m_customState = 1; - - // Call to th->Suspend() was successful and moved thread to suspended list. - // Now the threads should be re-scheduled to make suspension effective immidiately. - // In order to do it we return CLR_E_RESCHEDULE from this function - Suspend___VOID - NANOCLR_SET_AND_LEAVE( CLR_E_RESCHEDULE ); - } + NANOCLR_CHECK_HRESULT(th->Suspend()); + + // If the thread suspends itself, then we need to re-schedule. + if (stack.m_owningThread == th) + { // Set flag in thread stack that thread is re-scheduled. + stack.m_customState = 1; + + // Call to th->Suspend() was successful and moved thread to suspended list. + // Now the threads should be re-scheduled to make suspension effective immidiately. + // In order to do it we return CLR_E_RESCHEDULE from this function - Suspend___VOID + NANOCLR_SET_AND_LEAVE(CLR_E_RESCHEDULE); } - break; - + } + break; + // This is the case when thread is resumed, brought back from suspended state. case 1: - { - stack.m_customState = 0; - NANOCLR_SET_AND_LEAVE(S_OK); - } - break; + { + stack.m_customState = 0; + NANOCLR_SET_AND_LEAVE(S_OK); + } + break; default: NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); @@ -133,96 +137,104 @@ HRESULT Library_corlib_native_System_Threading_Thread::Suspend___VOID( CLR_RT_St NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Resume___VOID( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Resume___VOID(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; + CLR_RT_Thread *th; - NANOCLR_CHECK_HRESULT(GetThread( stack, th, true, true )); + NANOCLR_CHECK_HRESULT(GetThread(stack, th, true, true)); NANOCLR_SET_AND_LEAVE(th->Resume()); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::get_Priority___SystemThreadingThreadPriority( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::get_Priority___SystemThreadingThreadPriority( + CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; + CLR_RT_Thread *th; int pri; // Get C# thread object - CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis); - - // Reads priority stored in C# object. - pri = pThis[ FIELD___priority ].NumericByRef().s4; + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Reads priority stored in C# object. + pri = pThis[FIELD___priority].NumericByRef().s4; // Here we check consistency of values stored in C# and internal thread objects. // Get thread associated with C# thread object. It might be NULL if thread was not started. - NANOCLR_CHECK_HRESULT(GetThread( stack, th, false, false )); - + NANOCLR_CHECK_HRESULT(GetThread(stack, th, false, false)); + // If thread was started, then we use priority from the CLR_RT_Thread. // There are 2 reasons it might be different from priority from C# object: // 1. The manager C# object was garbage collected and then re-created. - // 2. Sub-thread with different priority may have been created in Library_spot_native_Microsoft_SPOT_ExecutionConstraint::Install___STATIC__VOID__I4__I4 + // 2. Sub-thread with different priority may have been created in + // Library_spot_native_Microsoft_SPOT_ExecutionConstraint::Install___STATIC__VOID__I4__I4 - if ( th != NULL ) + if (th != NULL) { - pri = th->GetThreadPriority(); - - // We store it back to managed object to keep values consistent. - pThis[ FIELD___priority ].NumericByRef().s4 = pri; + pri = th->GetThreadPriority(); + + // We store it back to managed object to keep values consistent. + pThis[FIELD___priority].NumericByRef().s4 = pri; } // Zero priority correspond is equal to managed. ThreadPriority.Lowest. // The highest value should be 4 ( ThreadPriority.highest ), but we allow higher values. // Users cannot create threads with values outside the Lowest-Highest range; we exceed that // range internally, but we can't expose those values to managed code. - if (pri < ThreadPriority::Lowest ) pri = ThreadPriority::Lowest; - else if (pri > ThreadPriority::Highest) pri = ThreadPriority::Highest; - + if (pri < ThreadPriority::Lowest) + pri = ThreadPriority::Lowest; + else if (pri > ThreadPriority::Highest) + pri = ThreadPriority::Highest; + // Return value back to C# code. - stack.SetResult_I4( pri ); + stack.SetResult_I4(pri); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::set_Priority___VOID__SystemThreadingThreadPriority( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::set_Priority___VOID__SystemThreadingThreadPriority( + CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - if ( stack.m_customState == 0 ) + if (stack.m_customState == 0) { - CLR_RT_Thread* th; + CLR_RT_Thread *th; - CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis); + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); - // Get argument for priority. Check the range - should be between ThreadPriority::Highest and ThreadPriority::Lowest ( 0 - 4 ) + // Get argument for priority. Check the range - should be between ThreadPriority::Highest and + // ThreadPriority::Lowest ( 0 - 4 ) int pri = stack.Arg1().NumericByRef().s4; - if ( pri < ThreadPriority::Lowest || pri > ThreadPriority::Highest ) + if (pri < ThreadPriority::Lowest || pri > ThreadPriority::Highest) { NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); } - + // Get CLR thread. The object exists if thread was started. - NANOCLR_CHECK_HRESULT(GetThread( stack, th, false, true )); + NANOCLR_CHECK_HRESULT(GetThread(stack, th, false, true)); // Save priority to managed C# object - pThis[ FIELD___priority ].NumericByRef().s4 = pri; + pThis[FIELD___priority].NumericByRef().s4 = pri; - if ( th ) + if (th) { - // Priority of current sub-thread is set the thread priority. - th->SetThreadPriority( pri ); + // Priority of current sub-thread is set the thread priority. + th->SetThreadPriority(pri); stack.m_customState = 1; - // If we set high priority to another thread, then we need to swtich to another thread. - if ( pri > stack.m_owningThread->GetThreadPriority() ) + // If we set high priority to another thread, then we need to swtich to another thread. + if (pri > stack.m_owningThread->GetThreadPriority()) { NANOCLR_SET_AND_LEAVE(CLR_E_RESCHEDULE); } @@ -230,10 +242,9 @@ HRESULT Library_corlib_native_System_Threading_Thread::set_Priority___VOID__Syst } NANOCLR_NOCLEANUP(); - } -HRESULT Library_corlib_native_System_Threading_Thread::get_ManagedThreadId___I4( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::get_ManagedThreadId___I4(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); @@ -241,116 +252,125 @@ HRESULT Library_corlib_native_System_Threading_Thread::get_ManagedThreadId___I4( int id; // Get C# thread object - CLR_RT_HeapBlock* pThis = stack.This(); FAULT_ON_NULL(pThis); - - // Reads priority stored in C# object. - id = pThis[ FIELD___id ].NumericByRef().s4; + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Reads priority stored in C# object. + id = pThis[FIELD___id].NumericByRef().s4; // Return value back to C# code. - stack.SetResult_I4( id ); + stack.SetResult_I4(id); NANOCLR_NOCLEANUP(); } - -HRESULT Library_corlib_native_System_Threading_Thread::get_IsAlive___BOOLEAN( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::get_IsAlive___BOOLEAN(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; - - GetThread( stack, th, false, false ); + CLR_RT_Thread *th; - stack.SetResult_Boolean( th != NULL && th->m_status != CLR_RT_Thread::TH_S_Terminated ); + GetThread(stack, th, false, false); + + stack.SetResult_Boolean(th != NULL && th->m_status != CLR_RT_Thread::TH_S_Terminated); NANOCLR_NOCLEANUP_NOLABEL(); } -HRESULT Library_corlib_native_System_Threading_Thread::Join___VOID( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Join___VOID(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(Join( stack, TIMEOUT_INFINITE )); + NANOCLR_SET_AND_LEAVE(Join(stack, TIMEOUT_INFINITE)); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Join___BOOLEAN__I4( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Join___BOOLEAN__I4(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); CLR_INT64 timeExpire; - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.InitTimeout( timeExpire, stack.Arg1().NumericByRef().s4 )); + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.InitTimeout(timeExpire, stack.Arg1().NumericByRef().s4)); - NANOCLR_SET_AND_LEAVE(Join( stack, timeExpire )); + NANOCLR_SET_AND_LEAVE(Join(stack, timeExpire)); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Join___BOOLEAN__SystemTimeSpan( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Join___BOOLEAN__SystemTimeSpan(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_INT64* timeExpireIn; - CLR_INT64 timeExpireOut; + CLR_INT64 *timeExpireIn; + CLR_INT64 timeExpireOut; - timeExpireIn = Library_corlib_native_System_TimeSpan::GetValuePtr( stack.Arg1() ); FAULT_ON_NULL(timeExpireIn); + timeExpireIn = Library_corlib_native_System_TimeSpan::GetValuePtr(stack.Arg1()); + FAULT_ON_NULL(timeExpireIn); - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.InitTimeout( timeExpireOut, *timeExpireIn )); + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.InitTimeout(timeExpireOut, *timeExpireIn)); - NANOCLR_SET_AND_LEAVE(Join( stack, timeExpireOut )); + NANOCLR_SET_AND_LEAVE(Join(stack, timeExpireOut)); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::get_ThreadState___SystemThreadingThreadState( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::get_ThreadState___SystemThreadingThreadState( + CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; - int val = 0; + CLR_RT_Thread *th; + int val = 0; - NANOCLR_CHECK_HRESULT(GetThread( stack, th, false, false )); + NANOCLR_CHECK_HRESULT(GetThread(stack, th, false, false)); - if(th == NULL) + if (th == NULL) { - val = 8; //Unstarted + val = 8; // Unstarted } else { - switch(th->m_status) + switch (th->m_status) { - case CLR_RT_Thread::TH_S_Ready : val = 0; break; // Running - case CLR_RT_Thread::TH_S_Waiting : val = 32; break; // WaitSleepJoin - case CLR_RT_Thread::TH_S_Terminated: val = 16; break; // Stopped - default : _ASSERTE(false); break; + case CLR_RT_Thread::TH_S_Ready: + val = 0; + break; // Running + case CLR_RT_Thread::TH_S_Waiting: + val = 32; + break; // WaitSleepJoin + case CLR_RT_Thread::TH_S_Terminated: + val = 16; + break; // Stopped + default: + _ASSERTE(false); + break; } - + // Suspended thread. Add ThreadState.Suspended to the return value - if(th->m_flags & CLR_RT_Thread::TH_F_Suspended) + if (th->m_flags & CLR_RT_Thread::TH_F_Suspended) { - val |= 64; // ThreadState.Suspended = 64 + val |= 64; // ThreadState.Suspended = 64 } // Aborted thread. Add ThreadState.Aborted to the return value - if(th->m_flags & CLR_RT_Thread::TH_F_Aborted) + if (th->m_flags & CLR_RT_Thread::TH_F_Aborted) { - val |= 256; // ThreadState.Aborted = 256 + val |= 256; // ThreadState.Aborted = 256 } - } - stack.SetResult_I4( val ); + stack.SetResult_I4(val); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Sleep___STATIC__VOID__I4( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::Sleep___STATIC__VOID__I4(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); @@ -358,105 +378,127 @@ HRESULT Library_corlib_native_System_Threading_Thread::Sleep___STATIC__VOID__I4( CLR_INT64 timeExpire; CLR_INT32 timeSleep; - switch(stack.m_customState) + switch (stack.m_customState) { - case 0: - - timeSleep = stack.m_arguments[ 0 ].NumericByRef().s4; - if ( timeSleep != 0 ) - { - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.InitTimeout( timeExpire, stack.m_arguments[ 0 ].NumericByRef().s4 )); + case 0: - hr = g_CLR_RT_ExecutionEngine.Sleep( stack.m_owningThread, timeExpire ); - if(hr == CLR_E_THREAD_WAITING) + timeSleep = stack.m_arguments[0].NumericByRef().s4; + if (timeSleep != 0) { + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.InitTimeout(timeExpire, stack.m_arguments[0].NumericByRef().s4)); + + hr = g_CLR_RT_ExecutionEngine.Sleep(stack.m_owningThread, timeExpire); + if (hr == CLR_E_THREAD_WAITING) + { + stack.m_customState = 1; + } + } + else + { + // In case of Sleep(0) call the threads should be re-scheduled . + // This function updates execution counter in pThread and makes it last to execute. + // Used to Thread.Sleep(0) imlementation. The thread is still ready, but is last to execute. + g_CLR_RT_ExecutionEngine.UpdateToLowestExecutionCounter(stack.m_owningThread); + // In order to do it we return CLR_E_RESCHEDULE from this function. stack.m_customState = 1; + NANOCLR_SET_AND_LEAVE(CLR_E_RESCHEDULE); } - } - else - { - // In case of Sleep(0) call the threads should be re-scheduled . - // This function updates execution counter in pThread and makes it last to execute. - // Used to Thread.Sleep(0) imlementation. The thread is still ready, but is last to execute. - g_CLR_RT_ExecutionEngine.UpdateToLowestExecutionCounter( stack.m_owningThread ); - // In order to do it we return CLR_E_RESCHEDULE from this function. - stack.m_customState = 1; - NANOCLR_SET_AND_LEAVE( CLR_E_RESCHEDULE ); - } - - NANOCLR_LEAVE(); + NANOCLR_LEAVE(); - case 1: - NANOCLR_SET_AND_LEAVE(S_OK); + case 1: + NANOCLR_SET_AND_LEAVE(S_OK); - default: - NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + default: + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); } NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::get_CurrentThread___STATIC__SystemThreadingThread( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::SpinWait___STATIC__VOID__I4(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); + + CLR_INT32 iterations = stack.m_arguments[0].NumericByRef().s4; + + // basically do nothing, except loop until reaching 0 + for (; iterations == 0; iterations--) + { +#ifndef _WIN32 + __asm("nop"); +#endif + } + + NANOCLR_NOCLEANUP_NOLABEL(); +} + +HRESULT Library_corlib_native_System_Threading_Thread::get_CurrentThread___STATIC__SystemThreadingThread( + CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* thread = stack.m_owningThread; - CLR_RT_HeapBlock& top = stack.PushValueAndClear(); - CLR_RT_HeapBlock* pRes; + CLR_RT_Thread *thread = stack.m_owningThread; + CLR_RT_HeapBlock &top = stack.PushValueAndClear(); + CLR_RT_HeapBlock *pRes; #if defined(NANOCLR_ENABLE_SOURCELEVELDEBUGGING) - //If we are a thread spawned by the debugger to perform evaluations, - //return the thread object that correspond to thread that has focus in debugger. + // If we are a thread spawned by the debugger to perform evaluations, + // return the thread object that correspond to thread that has focus in debugger. thread = thread->m_realThread; #endif //#if defined(NANOCLR_ENABLE_SOURCELEVELDEBUGGING) - //Find an existing managed thread, if it exists - //making sure to only return the managed object association with the current appdomain - //to prevent leaking of managed Thread objects across AD boundaries. - NANOCLR_FOREACH_NODE(CLR_RT_ObjectToEvent_Source,src,thread->m_references) + // Find an existing managed thread, if it exists + // making sure to only return the managed object association with the current appdomain + // to prevent leaking of managed Thread objects across AD boundaries. + NANOCLR_FOREACH_NODE(CLR_RT_ObjectToEvent_Source, src, thread->m_references) { - CLR_RT_HeapBlock* pManagedThread = src->m_objectPtr; + CLR_RT_HeapBlock *pManagedThread = src->m_objectPtr; bool fFound = false; _ASSERTE(pManagedThread != NULL); - + #if defined(NANOCLR_APPDOMAINS) { - CLR_RT_ObjectToEvent_Source* appDomainSrc = CLR_RT_ObjectToEvent_Source::ExtractInstance( pManagedThread[ FIELD___appDomain ] ); + CLR_RT_ObjectToEvent_Source *appDomainSrc = + CLR_RT_ObjectToEvent_Source::ExtractInstance(pManagedThread[FIELD___appDomain]); FAULT_ON_NULL_HR(appDomainSrc, CLR_E_FAIL); - + fFound = (appDomainSrc->m_eventPtr == g_CLR_RT_ExecutionEngine.GetCurrentAppDomain()); } #else fFound = true; #endif - if(fFound) + if (fFound) { - top.SetObjectReference( pManagedThread ); - + top.SetObjectReference(pManagedThread); + NANOCLR_SET_AND_LEAVE(S_OK); } } - NANOCLR_FOREACH_NODE_END(); + NANOCLR_FOREACH_NODE_END(); + // Create the managed thread. + // This implies that there is no state in the managed object. This is not exactly true, as the managed thread + // contains the priority as well as the delegate to start. However, that state is really just used as a placeholder + // for the data before the thread is started. Once the thread is started, they are copied over to the unmanaged + // thread object and no longer used. The managed object is then used simply as a wrapper for the unmanaged thread. + // Therefore, it is safe to simply make another managed thread here. + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(top, g_CLR_RT_WellKnownTypes.m_Thread)); - //Create the managed thread. - //This implies that there is no state in the managed object. This is not exactly true, as the managed thread - //contains the priority as well as the delegate to start. However, that state is really just used as a placeholder for - //the data before the thread is started. Once the thread is started, they are copied over to the unmanaged thread object - //and no longer used. The managed object is then used simply as a wrapper for the unmanaged thread. Therefore, it is safe - //to simply make another managed thread here. - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex( top, g_CLR_RT_WellKnownTypes.m_Thread )); - pRes = top.Dereference(); - NANOCLR_CHECK_HRESULT(CLR_RT_ObjectToEvent_Source::CreateInstance( thread, *pRes, pRes[ FIELD___thread ] )); + NANOCLR_CHECK_HRESULT(CLR_RT_ObjectToEvent_Source::CreateInstance(thread, *pRes, pRes[FIELD___thread])); #if defined(NANOCLR_APPDOMAINS) - NANOCLR_CHECK_HRESULT(CLR_RT_ObjectToEvent_Source::CreateInstance( g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(), *pRes, pRes[ FIELD___appDomain ] )); + NANOCLR_CHECK_HRESULT(CLR_RT_ObjectToEvent_Source::CreateInstance( + g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(), + *pRes, + pRes[FIELD___appDomain])); #endif NANOCLR_NOCLEANUP(); @@ -464,65 +506,69 @@ HRESULT Library_corlib_native_System_Threading_Thread::get_CurrentThread___STATI #if (NANOCLR_REFLECTION == TRUE) -HRESULT Library_corlib_native_System_Threading_Thread::GetDomain___STATIC__SystemAppDomain( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Threading_Thread::GetDomain___STATIC__SystemAppDomain(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); -#if !defined(NANOCLR_APPDOMAINS) +#if !defined(NANOCLR_APPDOMAINS) NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); #else - CLR_RT_AppDomain* appDomain = g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(); - - NANOCLR_CHECK_HRESULT(appDomain->GetManagedObject( stack.PushValue() )); -#endif - + CLR_RT_AppDomain *appDomain = g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(); + + NANOCLR_CHECK_HRESULT(appDomain->GetManagedObject(stack.PushValue())); +#endif + NANOCLR_NOCLEANUP(); } #endif // NANOCLR_REFLECTION //--// -CLR_RT_ObjectToEvent_Source* Library_corlib_native_System_Threading_Thread::GetThreadReference( CLR_RT_StackFrame& stack ) +CLR_RT_ObjectToEvent_Source *Library_corlib_native_System_Threading_Thread::GetThreadReference(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); - CLR_RT_HeapBlock* pThis = stack.This(); + CLR_RT_HeapBlock *pThis = stack.This(); - return CLR_RT_ObjectToEvent_Source::ExtractInstance( pThis[ FIELD___thread ] ); + return CLR_RT_ObjectToEvent_Source::ExtractInstance(pThis[FIELD___thread]); } -void Library_corlib_native_System_Threading_Thread::ResetThreadReference( CLR_RT_StackFrame& stack ) +void Library_corlib_native_System_Threading_Thread::ResetThreadReference(CLR_RT_StackFrame &stack) { NATIVE_PROFILE_CLR_CORE(); - CLR_RT_ObjectToEvent_Source* src = GetThreadReference( stack ); - if(src) + CLR_RT_ObjectToEvent_Source *src = GetThreadReference(stack); + if (src) { src->Detach(); } } -HRESULT Library_corlib_native_System_Threading_Thread::SetThread( CLR_RT_StackFrame& stack, CLR_RT_Thread* th ) +HRESULT Library_corlib_native_System_Threading_Thread::SetThread(CLR_RT_StackFrame &stack, CLR_RT_Thread *th) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_HeapBlock* pThis = stack.This(); + CLR_RT_HeapBlock *pThis = stack.This(); - ResetThreadReference( stack ); + ResetThreadReference(stack); - NANOCLR_SET_AND_LEAVE(CLR_RT_ObjectToEvent_Source::CreateInstance( th, *pThis, pThis[ FIELD___thread ] )); + NANOCLR_SET_AND_LEAVE(CLR_RT_ObjectToEvent_Source::CreateInstance(th, *pThis, pThis[FIELD___thread])); NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::GetThread( CLR_RT_StackFrame& stack, CLR_RT_Thread*& th, bool mustBeStarted, bool noSystemThreads ) +HRESULT Library_corlib_native_System_Threading_Thread::GetThread( + CLR_RT_StackFrame &stack, + CLR_RT_Thread *&th, + bool mustBeStarted, + bool noSystemThreads) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_ObjectToEvent_Source* src = GetThreadReference( stack ); + CLR_RT_ObjectToEvent_Source *src = GetThreadReference(stack); - th = (src == NULL) ? NULL : (CLR_RT_Thread*)src->m_eventPtr; - if(th == NULL) + th = (src == NULL) ? NULL : (CLR_RT_Thread *)src->m_eventPtr; + if (th == NULL) { if (mustBeStarted) { @@ -537,18 +583,18 @@ HRESULT Library_corlib_native_System_Threading_Thread::GetThread( CLR_RT_StackFr NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Threading_Thread::Join( CLR_RT_StackFrame& stack, const CLR_INT64& timeExpire ) +HRESULT Library_corlib_native_System_Threading_Thread::Join(CLR_RT_StackFrame &stack, const CLR_INT64 &timeExpire) { NATIVE_PROFILE_CLR_CORE(); NANOCLR_HEADER(); - CLR_RT_Thread* th; + CLR_RT_Thread *th; bool fRes = true; - NANOCLR_CHECK_HRESULT(GetThread( stack, th, true, false )); + NANOCLR_CHECK_HRESULT(GetThread(stack, th, true, false)); - //Don't let programs join from system threads like interrupts or finalizers - if ( stack.m_owningThread->m_flags & CLR_RT_Thread::TH_F_System ) + // Don't let programs join from system threads like interrupts or finalizers + if (stack.m_owningThread->m_flags & CLR_RT_Thread::TH_F_System) { NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_OPERATION); } @@ -556,20 +602,19 @@ HRESULT Library_corlib_native_System_Threading_Thread::Join( CLR_RT_StackFrame& // // You cannot join yourself. // - if(th == stack.m_owningThread) + if (th == stack.m_owningThread) { NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); } - if(th->m_status != CLR_RT_Thread::TH_S_Terminated) + if (th->m_status != CLR_RT_Thread::TH_S_Terminated) { - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_WaitForObject::WaitForSignal( stack, timeExpire, stack.ThisRef() )); + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_WaitForObject::WaitForSignal(stack, timeExpire, stack.ThisRef())); fRes = (stack.m_owningThread->m_waitForObject_Result != CLR_RT_Thread::TH_WAIT_RESULT_TIMEOUT); } - stack.SetResult_Boolean( fRes ); + stack.SetResult_Boolean(fRes); NANOCLR_NOCLEANUP(); } - diff --git a/src/CLR/Core/CLR_RT_HeapBlock.cpp b/src/CLR/Core/CLR_RT_HeapBlock.cpp index 4940b2cbd1..8e8db625ab 100644 --- a/src/CLR/Core/CLR_RT_HeapBlock.cpp +++ b/src/CLR/Core/CLR_RT_HeapBlock.cpp @@ -893,7 +893,7 @@ HRESULT CLR_RT_HeapBlock::PerformUnboxing(const CLR_RT_TypeDef_Instance &cls) if (this->DataType() != DATATYPE_OBJECT) { - NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_CAST); } // Finds the object that keeps the boxed type. @@ -903,7 +903,7 @@ HRESULT CLR_RT_HeapBlock::PerformUnboxing(const CLR_RT_TypeDef_Instance &cls) // Validates that src keeps something boxed and the boxed value is VALUE type. if (src->IsBoxed() == false || src->DataType() != DATATYPE_VALUETYPE) { - NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_CAST); } // Validates the type of data kept by object corresponds to type in cls. @@ -918,6 +918,21 @@ HRESULT CLR_RT_HeapBlock::PerformUnboxing(const CLR_RT_TypeDef_Instance &cls) // No luck. The types in src object and specified by cls are different. Need to throw exceptioin. NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_CAST); } + + // now check edge cases + + ////////////////////////////////////////////////////////// + // GUID: can't cast to anything except another GUID object + CLR_RT_TypeDescriptor srcTypeDes; + NANOCLR_CHECK_HRESULT(srcTypeDes.InitializeFromObject(*src)); + + CLR_RT_TypeDef_Instance &inst = srcTypeDes.m_handlerCls; + + if (inst.m_data == g_CLR_RT_WellKnownTypes.m_Guid.m_data) + { + // can't cast GUID class to anything else except another GUID + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_CAST); + } } if (cls.m_target->dataType == DATATYPE_VALUETYPE) diff --git a/src/CLR/Core/Core-vs2019.vcxproj b/src/CLR/Core/Core-vs2019.vcxproj deleted file mode 100644 index fb25e17ad8..0000000000 --- a/src/CLR/Core/Core-vs2019.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {89CF8BDB-9C8A-4D18-BC3E-4312C5BD34B1} - Win32Proj - Core - 10.0.17763.0 - Core - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(IntDir) - $(SolutionDir)$(Configuration)\ - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include - - - Windows - - - - - Use - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include - - - Windows - true - true - - - - - Level3 - Use - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/Core/Core-vs2019.vcxproj.filters b/src/CLR/Core/Core-vs2019.vcxproj.filters deleted file mode 100644 index 106dbc6906..0000000000 --- a/src/CLR/Core/Core-vs2019.vcxproj.filters +++ /dev/null @@ -1,215 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Header Files - - - \ No newline at end of file diff --git a/src/CLR/Core/Core.vcxproj b/src/CLR/Core/Core.vcxproj index 24a1724e46..ec3f7b6b1b 100644 --- a/src/CLR/Core/Core.vcxproj +++ b/src/CLR/Core/Core.vcxproj @@ -90,7 +90,7 @@ {89CF8BDB-9C8A-4D18-BC3E-4312C5BD34B1} Win32Proj Core - 10.0.18362.0 + 10.0.19041.0 @@ -162,7 +162,7 @@ NotUsing Level3 Disabled - NANOCLR_REFLECTION=TRUE;WIN32;_DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) + NANOCLR_REFLECTION=TRUE;WIN32;_DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include;..\..\nanoFramework.System.Collections @@ -187,7 +187,7 @@ MaxSpeed true true - NANOCLR_REFLECTION=TRUE;WIN32;NDEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) + NANOCLR_REFLECTION=TRUE;WIN32;NDEBUG;_LIB;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include;..\..\nanoFramework.System.Collections diff --git a/src/CLR/Core/GarbageCollector.cpp b/src/CLR/Core/GarbageCollector.cpp index 45c25724bd..860c81bef1 100644 --- a/src/CLR/Core/GarbageCollector.cpp +++ b/src/CLR/Core/GarbageCollector.cpp @@ -7,17 +7,18 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -CLR_RT_ProtectFromGC* CLR_RT_ProtectFromGC::s_first = NULL; +CLR_RT_ProtectFromGC *CLR_RT_ProtectFromGC::s_first = NULL; -void CLR_RT_ProtectFromGC::Initialize( CLR_RT_HeapBlock& ref ) +void CLR_RT_ProtectFromGC::Initialize(CLR_RT_HeapBlock &ref) { NATIVE_PROFILE_CLR_CORE(); - m_next = s_first; s_first = this; + m_next = s_first; + s_first = this; - m_data = (void**)&ref; - m_fpn = NULL; + m_data = (void **)&ref; + m_fpn = NULL; - if(ref.IsForcedAlive()) + if (ref.IsForcedAlive()) { m_flags = c_HeapBlock; } @@ -29,13 +30,14 @@ void CLR_RT_ProtectFromGC::Initialize( CLR_RT_HeapBlock& ref ) } } -void CLR_RT_ProtectFromGC::Initialize( void** data, Callback fpn ) +void CLR_RT_ProtectFromGC::Initialize(void **data, Callback fpn) { NATIVE_PROFILE_CLR_CORE(); - m_next = s_first; s_first = this; + m_next = s_first; + s_first = this; - m_data = data; - m_fpn = fpn; + m_data = data; + m_fpn = fpn; m_flags = c_Generic; } @@ -44,9 +46,9 @@ void CLR_RT_ProtectFromGC::Cleanup() NATIVE_PROFILE_CLR_CORE(); s_first = m_next; - if(m_flags & c_ResetKeepAlive) + if (m_flags & c_ResetKeepAlive) { - CLR_RT_HeapBlock* obj = (CLR_RT_HeapBlock*)m_data; + CLR_RT_HeapBlock *obj = (CLR_RT_HeapBlock *)m_data; obj->UnmarkForcedAlive(); } @@ -55,23 +57,23 @@ void CLR_RT_ProtectFromGC::Cleanup() void CLR_RT_ProtectFromGC::Invoke() { NATIVE_PROFILE_CLR_CORE(); - if(m_fpn) + if (m_fpn) { - m_fpn( *m_data ); + m_fpn(*m_data); } - else if(m_data) + else if (m_data) { - g_CLR_RT_GarbageCollector.CheckMultipleBlocks( (CLR_RT_HeapBlock*)m_data, 1 ); + g_CLR_RT_GarbageCollector.CheckMultipleBlocks((CLR_RT_HeapBlock *)m_data, 1); } } void CLR_RT_ProtectFromGC::InvokeAll() { NATIVE_PROFILE_CLR_CORE(); - CLR_RT_ProtectFromGC* ptr; + CLR_RT_ProtectFromGC *ptr; ptr = s_first; - while(ptr) + while (ptr) { ptr->Invoke(); @@ -83,12 +85,13 @@ void CLR_RT_ProtectFromGC::InvokeAll() #if defined(NANOCLR_TRACE_EARLYCOLLECTION) -CLR_RT_AssertEarlyCollection* CLR_RT_AssertEarlyCollection::s_first = NULL; +CLR_RT_AssertEarlyCollection *CLR_RT_AssertEarlyCollection::s_first = NULL; -CLR_RT_AssertEarlyCollection::CLR_RT_AssertEarlyCollection( CLR_RT_HeapBlock* ptr ) +CLR_RT_AssertEarlyCollection::CLR_RT_AssertEarlyCollection(CLR_RT_HeapBlock *ptr) { NATIVE_PROFILE_CLR_CORE(); - m_next = s_first; s_first = this; + m_next = s_first; + s_first = this; m_ptr = ptr; } @@ -105,20 +108,20 @@ void CLR_RT_AssertEarlyCollection::Cancel() m_ptr = NULL; } -void CLR_RT_AssertEarlyCollection::CheckAll( CLR_RT_HeapBlock* ptr ) +void CLR_RT_AssertEarlyCollection::CheckAll(CLR_RT_HeapBlock *ptr) { NATIVE_PROFILE_CLR_CORE(); - CLR_RT_AssertEarlyCollection* node; + CLR_RT_AssertEarlyCollection *node; node = s_first; - while(node) + while (node) { - if(node->m_ptr == ptr) + if (node->m_ptr == ptr) { - CLR_Debug::Printf( "INTERNAL ERROR: %08x retired early!!!\r\n", ptr ); + CLR_Debug::Printf("INTERNAL ERROR: %08x retired early!!!\r\n", ptr); #if defined(_WIN32) - ::Sleep( 1000 ); + ::Sleep(1000); ::DebugBreak(); #endif } @@ -139,9 +142,9 @@ CLR_UINT32 CLR_RT_GarbageCollector::ExecuteGarbageCollection() #endif #if defined(NANOCLR_GC_VERBOSE) - if(s_CLR_RT_fTrace_GC >= c_CLR_RT_Trace_Info) - { - CLR_Debug::Printf( " Memory: Start %s\r\n", HAL_Time_CurrentDateTimeToString() ); + if (s_CLR_RT_fTrace_GC >= c_CLR_RT_Trace_Info) + { + CLR_Debug::Printf(" Memory: Start %s\r\n", HAL_Time_CurrentDateTimeToString()); } #endif @@ -157,58 +160,65 @@ CLR_UINT32 CLR_RT_GarbageCollector::ExecuteGarbageCollection() g_CLR_RT_EventCache.EventCache_Cleanup(); - Mark (); + Mark(); MarkWeak(); - Sweep (); + Sweep(); Heap_ComputeAliveVsDeadRatio(); CheckMemoryPressure(); #if defined(NANOCLR_TRACE_MEMORY_STATS) - if(s_CLR_RT_fTrace_MemoryStats >= c_CLR_RT_Trace_Info) + if (s_CLR_RT_fTrace_MemoryStats >= c_CLR_RT_Trace_Info) { - int milliSec = ((int)::HAL_Time_SysTicksToTime( HAL_Time_CurrentSysTicks() - stats_start ) + TIME_CONVERSION__TICKUNITS - 1) / TIME_CONVERSION__TICKUNITS; + int milliSec = ((int)::HAL_Time_SysTicksToTime(HAL_Time_CurrentSysTicks() - stats_start) + + TIME_CONVERSION__TICKUNITS - 1) / + TIME_CONVERSION__TICKUNITS; - CLR_Debug::Printf( "GC: %dmsec %d bytes used, %d bytes available\r\n", milliSec, m_totalBytes - m_freeBytes, m_freeBytes ); + CLR_Debug::Printf( + "GC: %dmsec %d bytes used, %d bytes available\r\n", + milliSec, + m_totalBytes - m_freeBytes, + m_freeBytes); } - if(s_CLR_RT_fTrace_MemoryStats >= c_CLR_RT_Trace_Info) + if (s_CLR_RT_fTrace_MemoryStats >= c_CLR_RT_Trace_Info) { - int countBlocks[ DATATYPE_FIRST_INVALID ]; NANOCLR_CLEAR(countBlocks); - int countArryBlocks[ DATATYPE_FIRST_INVALID ]; NANOCLR_CLEAR(countArryBlocks); + int countBlocks[DATATYPE_FIRST_INVALID]; + NANOCLR_CLEAR(countBlocks); + int countArryBlocks[DATATYPE_FIRST_INVALID]; + NANOCLR_CLEAR(countArryBlocks); int dt; - NANOCLR_FOREACH_NODE(CLR_RT_HeapCluster,hc,g_CLR_RT_ExecutionEngine.m_heap) + NANOCLR_FOREACH_NODE(CLR_RT_HeapCluster, hc, g_CLR_RT_ExecutionEngine.m_heap) { - CLR_RT_HeapBlock_Node* ptr = hc->m_payloadStart; - CLR_RT_HeapBlock_Node* end = hc->m_payloadEnd; + CLR_RT_HeapBlock_Node *ptr = hc->m_payloadStart; + CLR_RT_HeapBlock_Node *end = hc->m_payloadEnd; - while(ptr < end) + while (ptr < end) { dt = ptr->DataType(); - if(dt < DATATYPE_FIRST_INVALID) + if (dt < DATATYPE_FIRST_INVALID) { - countBlocks[ dt ] += ptr->DataSize(); + countBlocks[dt] += ptr->DataSize(); - if(dt == DATATYPE_SZARRAY) + if (dt == DATATYPE_SZARRAY) { - CLR_RT_HeapBlock_Array* arr = (CLR_RT_HeapBlock_Array*)ptr; + CLR_RT_HeapBlock_Array *arr = (CLR_RT_HeapBlock_Array *)ptr; - if(arr != NULL) + if (arr != NULL) { dt = arr->m_typeOfElement; - if(dt < DATATYPE_FIRST_INVALID) + if (dt < DATATYPE_FIRST_INVALID) { - countArryBlocks[ dt ] += ptr->DataSize(); + countArryBlocks[dt] += ptr->DataSize(); } else { CLR_Debug::Printf("!!!!Unknown array type: %d\r\n", dt); } } - } } @@ -217,19 +227,27 @@ CLR_UINT32 CLR_RT_GarbageCollector::ExecuteGarbageCollection() } NANOCLR_FOREACH_NODE_END(); - for(dt = DATATYPE_VOID; dt < DATATYPE_FIRST_INVALID; dt++) + for (dt = DATATYPE_VOID; dt < DATATYPE_FIRST_INVALID; dt++) { - if(countBlocks[ dt ]) + if (countBlocks[dt]) { - CLR_Debug::Printf( "Type %02X (%-20s): %6d bytes\r\n", dt, c_CLR_RT_DataTypeLookup[ dt ].m_name, countBlocks[ dt ] * sizeof(CLR_RT_HeapBlock) ); + CLR_Debug::Printf( + "Type %02X (%-20s): %6d bytes\r\n", + dt, + c_CLR_RT_DataTypeLookup[dt].m_name, + countBlocks[dt] * sizeof(CLR_RT_HeapBlock)); - if(dt == DATATYPE_SZARRAY) + if (dt == DATATYPE_SZARRAY) { - for(int dt2 = DATATYPE_VOID; dt2 < DATATYPE_FIRST_INVALID; dt2++) + for (int dt2 = DATATYPE_VOID; dt2 < DATATYPE_FIRST_INVALID; dt2++) { - if(countArryBlocks[ dt2 ]) + if (countArryBlocks[dt2]) { - CLR_Debug::Printf( " Type %02X (%-17s): %6d bytes\r\n", dt2, c_CLR_RT_DataTypeLookup[ dt2 ].m_name, countArryBlocks[ dt2 ] * sizeof(CLR_RT_HeapBlock) ); + CLR_Debug::Printf( + " Type %02X (%-17s): %6d bytes\r\n", + dt2, + c_CLR_RT_DataTypeLookup[dt2].m_name, + countArryBlocks[dt2] * sizeof(CLR_RT_HeapBlock)); } } } @@ -245,9 +263,9 @@ CLR_UINT32 CLR_RT_GarbageCollector::ExecuteGarbageCollection() //////////////////////////////////////////////////////////////////////////////////////////////// #if defined(NANOCLR_GC_VERBOSE) - if(s_CLR_RT_fTrace_GC >= c_CLR_RT_Trace_Info) + if (s_CLR_RT_fTrace_GC >= c_CLR_RT_Trace_Info) { - CLR_Debug::Printf( " Memory: End %s\r\n", HAL_Time_CurrentDateTimeToString() ); + CLR_Debug::Printf(" Memory: End %s\r\n", HAL_Time_CurrentDateTimeToString()); } #endif @@ -263,31 +281,29 @@ CLR_UINT32 CLR_RT_GarbageCollector::ExecuteGarbageCollection() void CLR_RT_GarbageCollector::MarkSlow() { NATIVE_PROFILE_CLR_CORE(); - while(m_fOutOfStackSpaceForGC) - { + while (m_fOutOfStackSpaceForGC) + { m_fOutOfStackSpaceForGC = false; - //go through managed heap. - //find all objects that are not alive but are pointed to by a live object - //put them on the markstack. - for(CLR_RT_HeapCluster* hc = (CLR_RT_HeapCluster*)g_CLR_RT_ExecutionEngine.m_heap.FirstNode(); - hc->Next(); - hc = (CLR_RT_HeapCluster*)hc->Next() - ) + // go through managed heap. + // find all objects that are not alive but are pointed to by a live object + // put them on the markstack. + for (CLR_RT_HeapCluster *hc = (CLR_RT_HeapCluster *)g_CLR_RT_ExecutionEngine.m_heap.FirstNode(); hc->Next(); + hc = (CLR_RT_HeapCluster *)hc->Next()) { - CLR_RT_HeapBlock* ptr = hc->m_payloadStart; - CLR_RT_HeapBlock* end = hc->m_payloadEnd; + CLR_RT_HeapBlock *ptr = hc->m_payloadStart; + CLR_RT_HeapBlock *end = hc->m_payloadEnd; - while(ptr < end) + while (ptr < end) { - if(ptr->IsAlive() && !ptr->IsEvent()) - { - CheckSingleBlock_Force( ptr ); + if (ptr->IsAlive() && !ptr->IsEvent()) + { + CheckSingleBlock_Force(ptr); } ptr += ptr->DataSize(); } - } + } } } @@ -295,13 +311,13 @@ void CLR_RT_GarbageCollector::Mark() { NATIVE_PROFILE_CLR_CORE(); #if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - CLR_RT_AppDomain* appDomainSav = g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(); + CLR_RT_AppDomain *appDomainSav = g_CLR_RT_ExecutionEngine.GetCurrentAppDomain(); #endif // // Let's setup the proper workers. // - m_funcSingleBlock = ComputeReachabilityGraphForSingleBlock; + m_funcSingleBlock = ComputeReachabilityGraphForSingleBlock; m_funcMultipleBlocks = ComputeReachabilityGraphForMultipleBlocks; m_fOutOfStackSpaceForGC = false; @@ -311,32 +327,30 @@ void CLR_RT_GarbageCollector::Mark() // Prepare the helper buffers. // m_weakDelegates_Reachable.DblLinkedList_Initialize(); - - CLR_RT_DblLinkedList markStackList; + + CLR_RT_DblLinkedList markStackList; MarkStack markStack; - MarkStackElement markStackBuffer[ c_minimumSpaceForGC ]; + MarkStackElement markStackBuffer[c_minimumSpaceForGC]; m_markStackList = &markStackList; - m_markStack = &markStack; - - m_markStack ->Initialize( markStackBuffer, ARRAYSIZE(markStackBuffer) ); - m_markStackList->DblLinkedList_Initialize(); - m_markStackList->LinkAtFront( m_markStack ); + m_markStack = &markStack; + m_markStack->Initialize(markStackBuffer, ARRAYSIZE(markStackBuffer)); + m_markStackList->DblLinkedList_Initialize(); + m_markStackList->LinkAtFront(m_markStack); //////////////////////////////////////////////////////////////////////////// // // Call global markers. // -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( NULL ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(NULL); #endif CLR_RT_ProtectFromGC::InvokeAll(); g_CLR_HW_Hardware.PrepareForGC(); - //////////////////////////////////////////////////////////////////////////// // // Do the recursive marking! @@ -346,12 +360,12 @@ void CLR_RT_GarbageCollector::Mark() // Mark all the events, so we keep the related threads/objects alive. // { - NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Finalizer,fin,g_CLR_RT_ExecutionEngine.m_finalizersPending) + NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Finalizer, fin, g_CLR_RT_ExecutionEngine.m_finalizersPending) { #if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( fin->m_appDomain ); + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(fin->m_appDomain); #endif - CheckSingleBlock( &fin->m_object ); + CheckSingleBlock(&fin->m_object); } NANOCLR_FOREACH_NODE_END(); } @@ -369,54 +383,52 @@ void CLR_RT_GarbageCollector::Mark() // // Walk through all the stack frames, marking the objects as we dig down. // - Thread_Mark( g_CLR_RT_ExecutionEngine.m_threadsReady ); - Thread_Mark( g_CLR_RT_ExecutionEngine.m_threadsWaiting ); + Thread_Mark(g_CLR_RT_ExecutionEngine.m_threadsReady); + Thread_Mark(g_CLR_RT_ExecutionEngine.m_threadsWaiting); #if !defined(NANOCLR_APPDOMAINS) - CheckSingleBlock_Force( g_CLR_RT_ExecutionEngine.m_globalLock ); + CheckSingleBlock_Force(g_CLR_RT_ExecutionEngine.m_globalLock); #endif - CheckSingleBlock_Force( g_CLR_RT_ExecutionEngine.m_currentUICulture ); - + CheckSingleBlock_Force(g_CLR_RT_ExecutionEngine.m_currentUICulture); -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( NULL ); -#endif //NANOCLR_VALIDATE_APPDOMAIN_ISOLATION +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(NULL); +#endif // NANOCLR_VALIDATE_APPDOMAIN_ISOLATION #if defined(NANOCLR_ENABLE_SOURCELEVELDEBUGGING) - CheckSingleBlock_Force( g_CLR_RT_ExecutionEngine.m_scratchPadArray ); + CheckSingleBlock_Force(g_CLR_RT_ExecutionEngine.m_scratchPadArray); #endif //#if defined(NANOCLR_ENABLE_SOURCELEVELDEBUGGING) - - if(m_fOutOfStackSpaceForGC) + + if (m_fOutOfStackSpaceForGC) { MarkSlow(); _ASSERTE(!m_fOutOfStackSpaceForGC); - } + } } // // // //////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////// // // Prepare finalization of objects // { - NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Finalizer,fin,g_CLR_RT_ExecutionEngine.m_finalizersAlive) + NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Finalizer, fin, g_CLR_RT_ExecutionEngine.m_finalizersAlive) { // // If the object is dead, make it alive one last time and put it in the pending finalizers list. // - if(fin->m_object->IsAlive() == false) + if (fin->m_object->IsAlive() == false) { -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( fin->m_appDomain ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(fin->m_appDomain); #endif - CheckSingleBlock( &fin->m_object ); + CheckSingleBlock(&fin->m_object); - g_CLR_RT_ExecutionEngine.m_finalizersPending.LinkAtBack( fin ); + g_CLR_RT_ExecutionEngine.m_finalizersPending.LinkAtBack(fin); } } NANOCLR_FOREACH_NODE_END(); @@ -425,55 +437,55 @@ void CLR_RT_GarbageCollector::Mark() // // //////////////////////////////////////////////////////////////////////////// - - if(m_fOutOfStackSpaceForGC) + + if (m_fOutOfStackSpaceForGC) { MarkSlow(); - } + } _ASSERTE(m_markStackList == &markStackList); - _ASSERTE(m_markStack == &markStack ); + _ASSERTE(m_markStack == &markStack); - while((MarkStack*)m_markStackList->LastValidNode() != m_markStack) + while ((MarkStack *)m_markStackList->LastValidNode() != m_markStack) { - MarkStack* markStackT = (MarkStack*)m_markStackList->LastValidNode(); - + MarkStack *markStackT = (MarkStack *)m_markStackList->LastValidNode(); + markStackT->RemoveFromList(); - - CLR_RT_Memory::Release( markStackT ); + + CLR_RT_Memory::Release(markStackT); } m_markStackList = NULL; - m_markStack = NULL; + m_markStack = NULL; #if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( appDomainSav ); + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(appDomainSav); #endif } void CLR_RT_GarbageCollector::MarkWeak() { NATIVE_PROFILE_CLR_CORE(); - NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_WeakReference,weak,g_CLR_RT_ExecutionEngine.m_weakReferences) + NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_WeakReference, weak, g_CLR_RT_ExecutionEngine.m_weakReferences) { - if(weak->m_identity.m_flags & CLR_RT_HeapBlock_WeakReference::WR_Restored) + if (weak->m_identity.m_flags & CLR_RT_HeapBlock_WeakReference::WR_Restored) { - if(weak->m_targetSerialized) + if (weak->m_targetSerialized) { weak->MarkAlive(); } } - if(weak->IsAlive()) + if (weak->IsAlive()) { - if(weak->m_targetDirect) + if (weak->m_targetDirect) { - if(weak->m_targetDirect->IsAlive()) + if (weak->m_targetDirect->IsAlive()) { // // If the direct object is alive, keep the serialized version around too!! // - if(weak->m_targetSerialized && weak->m_targetSerialized->IsAlive() == false) + if (weak->m_targetSerialized && weak->m_targetSerialized->IsAlive() == false) { weak->m_targetSerialized->MarkAlive(); } @@ -504,23 +516,23 @@ void CLR_RT_GarbageCollector::Sweep() // // //////////////////////////////////////////////////////////////////////////////////////////////// - NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Delegate_List,weak,m_weakDelegates_Reachable) + NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Delegate_List, weak, m_weakDelegates_Reachable) { - CLR_UINT32 num = weak->m_length; - CLR_RT_HeapBlock* dlgs = weak->GetDelegates(); + CLR_UINT32 num = weak->m_length; + CLR_RT_HeapBlock *dlgs = weak->GetDelegates(); - for(;num--; dlgs++) + for (; num--; dlgs++) { - CLR_RT_HeapBlock_Delegate* dlg = dlgs->DereferenceDelegate(); - if(dlg) + CLR_RT_HeapBlock_Delegate *dlg = dlgs->DereferenceDelegate(); + if (dlg) { - CLR_RT_HeapBlock* obj = dlg->m_object.Dereference(); - if(obj && obj->IsAlive() == false) + CLR_RT_HeapBlock *obj = dlg->m_object.Dereference(); + if (obj && obj->IsAlive() == false) { // // Found a dead delegate, kill it!! // - dlgs->SetObjectReference( NULL ); + dlgs->SetObjectReference(NULL); continue; } @@ -538,7 +550,7 @@ void CLR_RT_GarbageCollector::Sweep() // All the dead objects are marked as such, it's time to reclaim them. // { - NANOCLR_FOREACH_NODE(CLR_RT_HeapCluster,hc,g_CLR_RT_ExecutionEngine.m_heap) + NANOCLR_FOREACH_NODE(CLR_RT_HeapCluster, hc, g_CLR_RT_ExecutionEngine.m_heap) { hc->RecoverFromGC(); } @@ -551,7 +563,7 @@ void CLR_RT_GarbageCollector::Sweep() void CLR_RT_GarbageCollector::CheckMemoryPressure() { NATIVE_PROFILE_CLR_CORE(); - if(m_freeBytes > c_memoryThreshold2) + if (m_freeBytes > c_memoryThreshold2) { m_pressureCounter = 0; } @@ -562,11 +574,11 @@ void CLR_RT_GarbageCollector::CheckMemoryPressure() // // Drop all the restored objects that haven't been reclaimed by an application. // - NANOCLR_FOREACH_NODE_BACKWARD(CLR_RT_HeapBlock_WeakReference,weak,g_CLR_RT_ExecutionEngine.m_weakReferences) + NANOCLR_FOREACH_NODE_BACKWARD(CLR_RT_HeapBlock_WeakReference, weak, g_CLR_RT_ExecutionEngine.m_weakReferences) { - if(weak->m_identity.m_flags & CLR_RT_HeapBlock_WeakReference::WR_Restored) + if (weak->m_identity.m_flags & CLR_RT_HeapBlock_WeakReference::WR_Restored) { - if(weak->m_targetSerialized) + if (weak->m_targetSerialized) { fExit = true; } @@ -574,7 +586,7 @@ void CLR_RT_GarbageCollector::CheckMemoryPressure() } NANOCLR_FOREACH_NODE_BACKWARD_END(); - if(fExit || m_freeBytes > c_memoryThreshold) + if (fExit || m_freeBytes > c_memoryThreshold) { m_pressureCounter = 0; } @@ -582,31 +594,38 @@ void CLR_RT_GarbageCollector::CheckMemoryPressure() { m_pressureCounter++; - if(m_pressureCounter > c_pressureThreshold) + if (m_pressureCounter > c_pressureThreshold) { - NANOCLR_FOREACH_NODE_BACKWARD(CLR_RT_HeapBlock_WeakReference,weak,g_CLR_RT_ExecutionEngine.m_weakReferences) + NANOCLR_FOREACH_NODE_BACKWARD( + CLR_RT_HeapBlock_WeakReference, + weak, + g_CLR_RT_ExecutionEngine.m_weakReferences) { - if(weak->m_targetSerialized && weak->m_targetDirect == NULL) + if (weak->m_targetSerialized && weak->m_targetDirect == NULL) { #if !defined(BUILD_RTM) CLR_RT_ReflectionDef_Index val; - CLR_RT_TypeDef_Instance inst; - char rgBuffer[ 512 ]; - char* szBuffer = rgBuffer; - size_t iBuffer = MAXSTRLEN(rgBuffer); + CLR_RT_TypeDef_Instance inst; + char rgBuffer[512]; + char *szBuffer = rgBuffer; + size_t iBuffer = MAXSTRLEN(rgBuffer); - CLR_Debug::Printf( "DROPPING OBJECT " ); + CLR_Debug::Printf("DROPPING OBJECT "); - val.InitializeFromHash( weak->m_identity.m_selectorHash ); + val.InitializeFromHash(weak->m_identity.m_selectorHash); - if(inst.InitializeFromReflection( val, NULL )) + if (inst.InitializeFromReflection(val, NULL)) { - g_CLR_RT_TypeSystem.BuildTypeName( inst, szBuffer, iBuffer ); rgBuffer[ MAXSTRLEN(rgBuffer) ] = 0; + g_CLR_RT_TypeSystem.BuildTypeName(inst, szBuffer, iBuffer); + rgBuffer[MAXSTRLEN(rgBuffer)] = 0; - CLR_Debug::Printf( "%s:%d ", rgBuffer, weak->m_identity.m_id ); + CLR_Debug::Printf("%s:%d ", rgBuffer, weak->m_identity.m_id); } - CLR_Debug::Printf( " [%d bytes] %s\r\n", weak->m_targetSerialized->m_numOfElements, (weak->m_targetDirect ? "DIRECT" : "") ); + CLR_Debug::Printf( + " [%d bytes] %s\r\n", + weak->m_targetSerialized->m_numOfElements, + (weak->m_targetDirect ? "DIRECT" : "")); #endif break; @@ -625,21 +644,21 @@ void CLR_RT_GarbageCollector::CheckMemoryPressure() void CLR_RT_GarbageCollector::AppDomain_Mark() { NATIVE_PROFILE_CLR_CORE(); - NANOCLR_FOREACH_NODE(CLR_RT_AppDomain,appDomain,g_CLR_RT_ExecutionEngine.m_appDomains) + NANOCLR_FOREACH_NODE(CLR_RT_AppDomain, appDomain, g_CLR_RT_ExecutionEngine.m_appDomains) { -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( appDomain ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(appDomain); #endif - NANOCLR_FOREACH_NODE(CLR_RT_AppDomainAssembly,appDomainAssembly,appDomain->m_appDomainAssemblies) + NANOCLR_FOREACH_NODE(CLR_RT_AppDomainAssembly, appDomainAssembly, appDomain->m_appDomainAssemblies) { - CheckMultipleBlocks( appDomainAssembly->m_pStaticFields, appDomainAssembly->m_assembly->m_iStaticFields ); + CheckMultipleBlocks(appDomainAssembly->m_pStaticFields, appDomainAssembly->m_assembly->m_iStaticFields); } NANOCLR_FOREACH_NODE_END(); - CheckSingleBlock_Force( appDomain->m_globalLock ); - CheckSingleBlock_Force( appDomain->m_strName ); - CheckSingleBlock_Force( appDomain->m_outOfMemoryException ); + CheckSingleBlock_Force(appDomain->m_globalLock); + CheckSingleBlock_Force(appDomain->m_strName); + CheckSingleBlock_Force(appDomain->m_outOfMemoryException); } NANOCLR_FOREACH_NODE_END(); } @@ -649,105 +668,111 @@ void CLR_RT_GarbageCollector::AppDomain_Mark() void CLR_RT_GarbageCollector::Assembly_Mark() { NATIVE_PROFILE_CLR_CORE(); -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( NULL ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(NULL); #endif NANOCLR_FOREACH_ASSEMBLY(g_CLR_RT_TypeSystem) { #if !defined(NANOCLR_APPDOMAINS) - CheckMultipleBlocks( pASSM->m_pStaticFields, pASSM->m_iStaticFields ); + CheckMultipleBlocks(pASSM->m_pStaticFields, pASSM->m_iStaticFields); #endif - CheckSingleBlock( &pASSM->m_pFile ); + CheckSingleBlock(&pASSM->m_pFile); } NANOCLR_FOREACH_ASSEMBLY_END(); } //--// -void CLR_RT_GarbageCollector::Thread_Mark( CLR_RT_Thread* th ) +void CLR_RT_GarbageCollector::Thread_Mark(CLR_RT_Thread *th) { NATIVE_PROFILE_CLR_CORE(); #if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( th->m_dlg->m_appDomain ); + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(th->m_dlg->m_appDomain); #endif - CheckSingleBlock ( &th->m_dlg ); + CheckSingleBlock(&th->m_dlg); #if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( th->CurrentAppDomain() ); -#endif - CheckSingleBlock_Force( &th->m_currentException ); + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(th->CurrentAppDomain()); +#endif + CheckSingleBlock_Force(&th->m_currentException); - for(int i=0; im_nestedExceptionsPos; i++) + for (int i = 0; i < th->m_nestedExceptionsPos; i++) { - CLR_RT_Thread::UnwindStack& us = th->m_nestedExceptions[ i ]; + CLR_RT_Thread::UnwindStack &us = th->m_nestedExceptions[i]; -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( us.m_stack->m_appDomain ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(us.m_stack->m_appDomain); #endif - CheckSingleBlock_Force( us.m_exception ); + CheckSingleBlock_Force(us.m_exception); } // // Mark all the objects on the stack frames. // - NANOCLR_FOREACH_NODE(CLR_RT_StackFrame,stack,th->m_stackFrames) + NANOCLR_FOREACH_NODE(CLR_RT_StackFrame, stack, th->m_stackFrames) { -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( stack->m_appDomain ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(stack->m_appDomain); #endif #ifndef CLR_NO_IL_INLINE - if(stack->m_inlineFrame) + if (stack->m_inlineFrame) { - CheckMultipleBlocks( stack->m_inlineFrame->m_frame.m_args , stack->m_inlineFrame->m_frame.m_call.m_target->numArgs ); - CheckMultipleBlocks( stack->m_inlineFrame->m_frame.m_locals , stack->m_inlineFrame->m_frame.m_call.m_target->numLocals ); - CheckMultipleBlocks( stack->m_inlineFrame->m_frame.m_evalStack, (int)(stack->m_inlineFrame->m_frame.m_evalPos - stack->m_inlineFrame->m_frame.m_evalStack)); + CheckMultipleBlocks( + stack->m_inlineFrame->m_frame.m_args, + stack->m_inlineFrame->m_frame.m_call.m_target->numArgs); + CheckMultipleBlocks( + stack->m_inlineFrame->m_frame.m_locals, + stack->m_inlineFrame->m_frame.m_call.m_target->numLocals); + CheckMultipleBlocks( + stack->m_inlineFrame->m_frame.m_evalStack, + (int)(stack->m_inlineFrame->m_frame.m_evalPos - stack->m_inlineFrame->m_frame.m_evalStack)); } #endif - CheckMultipleBlocks( stack->m_arguments, stack->m_call.m_target->numArgs ); - CheckMultipleBlocks( stack->m_locals , stack->m_call.m_target->numLocals ); - CheckMultipleBlocks( stack->m_evalStack, stack->TopValuePosition() ); + CheckMultipleBlocks(stack->m_arguments, stack->m_call.m_target->numArgs); + CheckMultipleBlocks(stack->m_locals, stack->m_call.m_target->numLocals); + CheckMultipleBlocks(stack->m_evalStack, stack->TopValuePosition()); } NANOCLR_FOREACH_NODE_END(); // // Mark locked objects. // - NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Lock,lock,th->m_locks) + NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Lock, lock, th->m_locks) { -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( lock->m_appDomain ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(lock->m_appDomain); #endif - CheckSingleBlock_Force( &lock->m_resource ); + CheckSingleBlock_Force(&lock->m_resource); } NANOCLR_FOREACH_NODE_END(); // // Mark the objects this thread is waiting for. // -#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) - (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain( th->CurrentAppDomain() ); +#if defined(NANOCLR_VALIDATE_APPDOMAIN_ISOLATION) + (void)g_CLR_RT_ExecutionEngine.SetCurrentAppDomain(th->CurrentAppDomain()); #endif { - CLR_RT_HeapBlock_WaitForObject* wait = th->m_waitForObject; + CLR_RT_HeapBlock_WaitForObject *wait = th->m_waitForObject; - if(wait) + if (wait) { - CheckMultipleBlocks( wait->GetWaitForObjects(), wait->m_cObjects ); + CheckMultipleBlocks(wait->GetWaitForObjects(), wait->m_cObjects); } } } -void CLR_RT_GarbageCollector::Thread_Mark( CLR_RT_DblLinkedList& threads ) +void CLR_RT_GarbageCollector::Thread_Mark(CLR_RT_DblLinkedList &threads) { NATIVE_PROFILE_CLR_CORE(); - NANOCLR_FOREACH_NODE(CLR_RT_Thread,th,threads) + NANOCLR_FOREACH_NODE(CLR_RT_Thread, th, threads) { - Thread_Mark( th ); + Thread_Mark(th); } NANOCLR_FOREACH_NODE_END(); } @@ -758,10 +783,10 @@ void CLR_RT_GarbageCollector::RecoverEventsFromGC() { NATIVE_PROFILE_CLR_CORE(); - CLR_RT_HeapBlock_EndPoint::HandlerMethod_RecoverFromGC(); + CLR_RT_HeapBlock_EndPoint::HandlerMethod_RecoverFromGC(); CLR_RT_HeapBlock_NativeEventDispatcher::HandlerMethod_RecoverFromGC(); - NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Timer,timer,g_CLR_RT_ExecutionEngine.m_timers) + NANOCLR_FOREACH_NODE(CLR_RT_HeapBlock_Timer, timer, g_CLR_RT_ExecutionEngine.m_timers) { timer->RecoverFromGC(); } @@ -769,19 +794,19 @@ void CLR_RT_GarbageCollector::RecoverEventsFromGC() //--// - NANOCLR_FOREACH_NODE(CLR_RT_Thread,th,g_CLR_RT_ExecutionEngine.m_threadsReady) + NANOCLR_FOREACH_NODE(CLR_RT_Thread, th, g_CLR_RT_ExecutionEngine.m_threadsReady) { th->RecoverFromGC(); } NANOCLR_FOREACH_NODE_END(); - NANOCLR_FOREACH_NODE(CLR_RT_Thread,th,g_CLR_RT_ExecutionEngine.m_threadsWaiting) + NANOCLR_FOREACH_NODE(CLR_RT_Thread, th, g_CLR_RT_ExecutionEngine.m_threadsWaiting) { th->RecoverFromGC(); } NANOCLR_FOREACH_NODE_END(); - NANOCLR_FOREACH_NODE(CLR_RT_Thread,th,g_CLR_RT_ExecutionEngine.m_threadsZombie) + NANOCLR_FOREACH_NODE(CLR_RT_Thread, th, g_CLR_RT_ExecutionEngine.m_threadsZombie) { th->RecoverFromGC(); th->ReleaseWhenDeadEx(); // After the GC has happened, we have to check if any zombie thread can be reclaimed. @@ -789,7 +814,7 @@ void CLR_RT_GarbageCollector::RecoverEventsFromGC() NANOCLR_FOREACH_NODE_END(); #if defined(NANOCLR_APPDOMAINS) - NANOCLR_FOREACH_NODE(CLR_RT_AppDomain,appDomain,g_CLR_RT_ExecutionEngine.m_appDomains) + NANOCLR_FOREACH_NODE(CLR_RT_AppDomain, appDomain, g_CLR_RT_ExecutionEngine.m_appDomains) { appDomain->RecoverFromGC(); } @@ -805,14 +830,14 @@ CLR_UINT32 CLR_RT_GarbageCollector::Heap_ComputeAliveVsDeadRatio() CLR_UINT32 totalBytes = 0; CLR_UINT32 freeBlocks = 0; - NANOCLR_FOREACH_NODE(CLR_RT_HeapCluster,hc,g_CLR_RT_ExecutionEngine.m_heap) + NANOCLR_FOREACH_NODE(CLR_RT_HeapCluster, hc, g_CLR_RT_ExecutionEngine.m_heap) { - CLR_RT_HeapBlock_Node* ptr = hc->m_payloadStart; - CLR_RT_HeapBlock_Node* end = hc->m_payloadEnd; + CLR_RT_HeapBlock_Node *ptr = hc->m_payloadStart; + CLR_RT_HeapBlock_Node *end = hc->m_payloadEnd; - totalBytes += (CLR_UINT32)((CLR_UINT8*)end - (CLR_UINT8*)ptr); + totalBytes += (CLR_UINT32)((CLR_UINT8 *)end - (CLR_UINT8 *)ptr); - NANOCLR_FOREACH_NODE_BACKWARD(CLR_RT_HeapBlock_Node,ptrFree,hc->m_freeList) + NANOCLR_FOREACH_NODE_BACKWARD(CLR_RT_HeapBlock_Node, ptrFree, hc->m_freeList) { freeBlocks += ptrFree->DataSize(); } @@ -821,8 +846,7 @@ CLR_UINT32 CLR_RT_GarbageCollector::Heap_ComputeAliveVsDeadRatio() NANOCLR_FOREACH_NODE_END(); m_totalBytes = totalBytes; - m_freeBytes = freeBlocks * sizeof(CLR_RT_HeapBlock); + m_freeBytes = freeBlocks * sizeof(CLR_RT_HeapBlock); return m_freeBytes; } - diff --git a/src/CLR/Core/Hardware/Hardware-vs2019.vcxproj b/src/CLR/Core/Hardware/Hardware-vs2019.vcxproj deleted file mode 100644 index 7da85a461d..0000000000 --- a/src/CLR/Core/Hardware/Hardware-vs2019.vcxproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - {5D50772E-DAC8-407D-972F-37DEB4450B72} - Win32Proj - Hardware - 10.0.17763.0 - Hardware - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - - - - - - - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include - - - Windows - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - true - true - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/Core/Hardware/Hardware-vs2019.vcxproj.filters b/src/CLR/Core/Hardware/Hardware-vs2019.vcxproj.filters deleted file mode 100644 index c750e91500..0000000000 --- a/src/CLR/Core/Hardware/Hardware-vs2019.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/src/CLR/Core/Hardware/Hardware.cpp b/src/CLR/Core/Hardware/Hardware.cpp index efb28a1c4a..3b48989101 100644 --- a/src/CLR/Core/Hardware/Hardware.cpp +++ b/src/CLR/Core/Hardware/Hardware.cpp @@ -173,6 +173,11 @@ void CLR_HW_Hardware::ProcessActivity() eventsCLR |= Event_Radio; } + if (events & SYSTEM_EVENT_FLAG_WIFI_STATION) + { + eventsCLR |= Event_Wifi_Station; + } + if (eventsCLR) { g_CLR_RT_ExecutionEngine.SignalEvents(eventsCLR); diff --git a/src/CLR/Core/Hardware/Hardware.vcxproj b/src/CLR/Core/Hardware/Hardware.vcxproj index b03c07f96a..320f44daf4 100644 --- a/src/CLR/Core/Hardware/Hardware.vcxproj +++ b/src/CLR/Core/Hardware/Hardware.vcxproj @@ -25,7 +25,7 @@ {5D50772E-DAC8-407D-972F-37DEB4450B72} Win32Proj Hardware - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/Hardware/Hardware_stub.vcxproj b/src/CLR/Core/Hardware/Hardware_stub.vcxproj index 32402ea088..5c1e3508cc 100644 --- a/src/CLR/Core/Hardware/Hardware_stub.vcxproj +++ b/src/CLR/Core/Hardware/Hardware_stub.vcxproj @@ -25,7 +25,7 @@ {31253D7F-147E-49A3-BC0D-E0ADE6CF040B} Win32Proj Hardware_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/InterruptHandler/InterruptHandler-vs2019.vcxproj b/src/CLR/Core/InterruptHandler/InterruptHandler-vs2019.vcxproj deleted file mode 100644 index 9754caca50..0000000000 --- a/src/CLR/Core/InterruptHandler/InterruptHandler-vs2019.vcxproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - {D32EE397-7E49-452D-AC95-AFCB3C962E3D} - Win32Proj - InterruptHandler - 10.0.17763.0 - InterruptHandler - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - - - - - - - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include - - - Windows - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - true - true - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/Core/InterruptHandler/InterruptHandler-vs2019.vcxproj.filters b/src/CLR/Core/InterruptHandler/InterruptHandler-vs2019.vcxproj.filters deleted file mode 100644 index 5678012159..0000000000 --- a/src/CLR/Core/InterruptHandler/InterruptHandler-vs2019.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/src/CLR/Core/InterruptHandler/InterruptHandler.vcxproj b/src/CLR/Core/InterruptHandler/InterruptHandler.vcxproj index d14efe5c8d..4632679409 100644 --- a/src/CLR/Core/InterruptHandler/InterruptHandler.vcxproj +++ b/src/CLR/Core/InterruptHandler/InterruptHandler.vcxproj @@ -25,7 +25,7 @@ {D32EE397-7E49-452D-AC95-AFCB3C962E3D} Win32Proj InterruptHandler - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/InterruptHandler/InterruptHandler_stub.vcxproj b/src/CLR/Core/InterruptHandler/InterruptHandler_stub.vcxproj index 89245cfb6f..e9ced76b2e 100644 --- a/src/CLR/Core/InterruptHandler/InterruptHandler_stub.vcxproj +++ b/src/CLR/Core/InterruptHandler/InterruptHandler_stub.vcxproj @@ -25,7 +25,7 @@ {5772D362-7277-49CF-9B49-42335A3154BD} Win32Proj InterruptHandler_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher.vcxproj b/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher.vcxproj index 052b3be582..724b999a12 100644 --- a/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher.vcxproj +++ b/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher.vcxproj @@ -25,7 +25,7 @@ {6DD5CA4F-2AE9-44D3-B9D7-A2A4A35FC5B2} Win32Proj NativeEventDispatcher - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher_stub.vcxproj b/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher_stub.vcxproj index df103f1d04..22f070581b 100644 --- a/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher_stub.vcxproj +++ b/src/CLR/Core/NativeEventDispatcher/NativeEventDispatcher_stub.vcxproj @@ -25,7 +25,7 @@ {5406EB0C-2243-47E1-9F21-F2D7CA277092} Win32Proj NativeEventDispatcher_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/RPC/RPC-vs2019.vcxproj b/src/CLR/Core/RPC/RPC-vs2019.vcxproj deleted file mode 100644 index 77bcb27b0d..0000000000 --- a/src/CLR/Core/RPC/RPC-vs2019.vcxproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - {ED4C887A-EC09-465B-B5D9-075450ADC52D} - Win32Proj - RPC - 10.0.17763.0 - RPC - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - - - - - - - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include - - - Windows - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - true - true - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/Core/RPC/RPC-vs2019.vcxproj.filters b/src/CLR/Core/RPC/RPC-vs2019.vcxproj.filters deleted file mode 100644 index b7ad38368a..0000000000 --- a/src/CLR/Core/RPC/RPC-vs2019.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/src/CLR/Core/RPC/RPC.vcxproj b/src/CLR/Core/RPC/RPC.vcxproj index b5e5264ead..bdc361489e 100644 --- a/src/CLR/Core/RPC/RPC.vcxproj +++ b/src/CLR/Core/RPC/RPC.vcxproj @@ -25,7 +25,7 @@ {ED4C887A-EC09-465B-B5D9-075450ADC52D} Win32Proj RPC - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/RPC/RPC_stub.vcxproj b/src/CLR/Core/RPC/RPC_stub.vcxproj index 5bb3481a1d..5b00f46630 100644 --- a/src/CLR/Core/RPC/RPC_stub.vcxproj +++ b/src/CLR/Core/RPC/RPC_stub.vcxproj @@ -25,7 +25,7 @@ {D0B2ADFE-3347-4D73-9364-9C36935D12F8} Win32Proj RPC_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/Serialization/Serialization-vs2019.vcxproj b/src/CLR/Core/Serialization/Serialization-vs2019.vcxproj deleted file mode 100644 index 18e4f32684..0000000000 --- a/src/CLR/Core/Serialization/Serialization-vs2019.vcxproj +++ /dev/null @@ -1,159 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - {16BF6131-A3B8-4B97-B867-E45669FB48BD} - Win32Proj - Serialization - 10.0.17763.0 - Serialization - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\CorLib;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - - - - - - - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include;..\..\CorLib - - - Windows - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\..\targets\win32\Include;..\..\Include;..\..\CorLib;..\..\..\HAL\Include;..\..\..\PAL\Include - - - Windows - true - true - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\Include;..\..\CorLib - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/Core/Serialization/Serialization-vs2019.vcxproj.filters b/src/CLR/Core/Serialization/Serialization-vs2019.vcxproj.filters deleted file mode 100644 index 2e4ce595ca..0000000000 --- a/src/CLR/Core/Serialization/Serialization-vs2019.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/src/CLR/Core/Serialization/Serialization.vcxproj b/src/CLR/Core/Serialization/Serialization.vcxproj index 4af75c4295..c46d923bd0 100644 --- a/src/CLR/Core/Serialization/Serialization.vcxproj +++ b/src/CLR/Core/Serialization/Serialization.vcxproj @@ -25,7 +25,7 @@ {16BF6131-A3B8-4B97-B867-E45669FB48BD} Win32Proj Serialization - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/Serialization/Serialization_stub.vcxproj b/src/CLR/Core/Serialization/Serialization_stub.vcxproj index c307425483..cad7a56b57 100644 --- a/src/CLR/Core/Serialization/Serialization_stub.vcxproj +++ b/src/CLR/Core/Serialization/Serialization_stub.vcxproj @@ -25,7 +25,7 @@ {C337041D-344D-49FE-AD99-B137E7FD0188} Win32Proj Serialization_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Core/TypeSystem.cpp b/src/CLR/Core/TypeSystem.cpp index 780f5a69fb..f490f7e064 100644 --- a/src/CLR/Core/TypeSystem.cpp +++ b/src/CLR/Core/TypeSystem.cpp @@ -2789,11 +2789,13 @@ static const TypeIndexLookup c_TypeIndexLookup[] = { TIL("System", "Exception", m_Exception), TIL("System", "IndexOutOfRangeException", m_IndexOutOfRangeException), TIL("System", "InvalidCastException", m_InvalidCastException), + TIL("System", "FormatException", m_FormatException), TIL("System", "InvalidOperationException", m_InvalidOperationException), TIL("System", "NotSupportedException", m_NotSupportedException), TIL("System", "NotImplementedException", m_NotImplementedException), TIL("System", "NullReferenceException", m_NullReferenceException), TIL("System", "OutOfMemoryException", m_OutOfMemoryException), + TIL("System", "TimeoutException", m_TimeoutException), TIL("System", "ObjectDisposedException", m_ObjectDisposedException), TIL("System.Threading", "ThreadAbortException", m_ThreadAbortException), TIL("nanoFramework.Runtime.Native", "ConstraintException", m_ConstraintException), @@ -2815,6 +2817,8 @@ static const TypeIndexLookup c_TypeIndexLookup[] = { TIL("System", "WeakReference", m_WeakReference), + TIL("System", "Guid", m_Guid), + TIL("nanoFramework.UI", "Bitmap", m_Bitmap), TIL("nanoFramework.UI", "Font", m_Font), TIL("nanoFramework.Touch", "TouchEvent", m_TouchEvent), @@ -3643,101 +3647,107 @@ bool CLR_RT_TypeSystem::FindTypeDef(const char *szClass, CLR_RT_Assembly *assm, NATIVE_PROFILE_CLR_CORE(); - // UNDONE: FIXME - // char rgName [ MAXTYPENAMELEN ]; - // char rgNamespace[ MAXTYPENAMELEN ]; - // CLR_RT_TypeDef_Index res; - - // if(hal_strlen_s(szClass) < ARRAYSIZE(rgNamespace)) - // { - // const char* szPtr = szClass; - // const char* szPtr_LastDot = NULL; - // const char* szPtr_FirstSubType = NULL; - // char c; - // size_t len; - // bool arrayType = false; - - // while(true) - // { - // c = szPtr[ 0 ]; if(!c) break; - - // if(c == '.') - // { - // szPtr_LastDot = szPtr; - // } - // else if(c == '+') - // { - // szPtr_FirstSubType = szPtr; - // break; - // } - // else if(c == '[') - // { - // char ch = szPtr[ 1 ]; - // if (ch == ']') - // { - // arrayType = true; - // break; - // } - // } - - // szPtr++; - // } - - // if(szPtr_LastDot) - // { - // len = szPtr_LastDot++ - szClass ; hal_strncpy_s( rgNamespace, ARRAYSIZE(rgNamespace), szClass , - // len ); len = szPtr - szPtr_LastDot; hal_strncpy_s( rgName , ARRAYSIZE(rgName ), - // szPtr_LastDot, len ); - // } - // else - // { - // rgNamespace[ 0 ] = 0; - // hal_strcpy_s( rgName, ARRAYSIZE(rgName), szClass ); - // } - - // if(FindTypeDef( rgName, rgNamespace, assm, res )) - // { - // // - // // Found the containing type, let's look for the nested type. - // // - // if(szPtr_FirstSubType) - // { - // CLR_RT_TypeDef_Instance inst; - - // do - // { - // szPtr = ++szPtr_FirstSubType; - - // while(true) - // { - // c = szPtr_FirstSubType[ 0 ]; if(!c) break; - - // if(c == '+') break; - - // szPtr_FirstSubType++; - // } - - // len = szPtr_FirstSubType - szPtr; hal_strncpy_s( rgName, ARRAYSIZE(rgName), szPtr, len ); - - // inst.InitializeFromIndex( res ); - - // if(inst.m_assm->FindTypeDef( rgName, res.Type(), res ) == false) - // { - // return false; - // } - - // } while(c == '+'); - // } - - // reflex.m_kind = REFLECTION_TYPE; - // // make sure this works for multidimensional arrays. - // reflex.m_levels = arrayType ? 1 : 0; - // reflex.m_data.m_type = res; - // return true; - // } - // } - // - // res.Clear(); + char rgName[MAXTYPENAMELEN]; + char rgNamespace[MAXTYPENAMELEN]; + CLR_RT_TypeDef_Index res; + + if (hal_strlen_s(szClass) < ARRAYSIZE(rgNamespace)) + { + const char *szPtr = szClass; + const char *szPtr_LastDot = NULL; + const char *szPtr_FirstSubType = NULL; + char c; + size_t len; + bool arrayType = false; + + while (true) + { + c = szPtr[0]; + if (!c) + break; + + if (c == '.') + { + szPtr_LastDot = szPtr; + } + else if (c == '+') + { + szPtr_FirstSubType = szPtr; + break; + } + else if (c == '[') + { + char ch = szPtr[1]; + if (ch == ']') + { + arrayType = true; + break; + } + } + + szPtr++; + } + + if (szPtr_LastDot) + { + len = szPtr_LastDot++ - szClass; + hal_strncpy_s(rgNamespace, ARRAYSIZE(rgNamespace), szClass, len); + len = szPtr - szPtr_LastDot; + hal_strncpy_s(rgName, ARRAYSIZE(rgName), szPtr_LastDot, len); + } + else + { + rgNamespace[0] = 0; + hal_strcpy_s(rgName, ARRAYSIZE(rgName), szClass); + } + + if (FindTypeDef(rgName, rgNamespace, assm, res)) + { + // + // Found the containing type, let's look for the nested type. + // + if (szPtr_FirstSubType) + { + CLR_RT_TypeDef_Instance inst; + + do + { + szPtr = ++szPtr_FirstSubType; + + while (true) + { + c = szPtr_FirstSubType[0]; + if (!c) + break; + + if (c == '+') + break; + + szPtr_FirstSubType++; + } + + len = szPtr_FirstSubType - szPtr; + hal_strncpy_s(rgName, ARRAYSIZE(rgName), szPtr, len); + + inst.InitializeFromIndex(res); + + if (inst.m_assm->FindTypeDef(rgName, res.Type(), res) == false) + { + return false; + } + + } while (c == '+'); + } + + reflex.m_kind = REFLECTION_TYPE; + // make sure this works for multidimensional arrays. + reflex.m_levels = arrayType ? 1 : 0; + reflex.m_data.m_type = res; + return true; + } + } + + res.Clear(); return false; } diff --git a/src/CLR/Debugger/Debugger.cpp b/src/CLR/Debugger/Debugger.cpp index fcba454037..68fa9fe475 100644 --- a/src/CLR/Debugger/Debugger.cpp +++ b/src/CLR/Debugger/Debugger.cpp @@ -59,6 +59,8 @@ void CLR_DBG_Debugger::Debugger_Discovery() CLR_INT32 wait_sec = 5; + uint8_t loopCounter = 1; + CLR_INT64 expire = HAL_Time_CurrentTime() + (wait_sec * TIME_CONVERSION__TO_SECONDS); // Send "presence" ping. @@ -69,7 +71,7 @@ void CLR_DBG_Debugger::Debugger_Discovery() { CLR_EE_DBG_EVENT_BROADCAST( CLR_DBG_Commands::c_Monitor_Ping, - sizeof(cmd), + 0, &cmd, WP_Flags_c_NoCaching | WP_Flags_c_NonCritical); @@ -96,6 +98,11 @@ void CLR_DBG_Debugger::Debugger_Discovery() CLR_Debug::Printf("No debugger found...\r\n"); break; } + + // pause for multiples of 250ms so this is not flooding the channel with PING packets + PLATFORM_DELAY(loopCounter * 250); + + loopCounter++; } g_CLR_RT_ExecutionEngine.WaitForDebugger(); @@ -438,9 +445,13 @@ bool CLR_DBG_Debugger::Monitor_Ping(WP_Message *msg) if (CLR_EE_DBG_IS_MASK(StateInitialize, StateMask)) { if (fStopOnBoot) + { CLR_EE_DBG_SET(Stopped); + } else + { CLR_EE_DBG_CLR(Stopped); + } } return true; @@ -1005,30 +1016,27 @@ bool CLR_DBG_Debugger::Monitor_Reboot(WP_Message *msg) CLR_DBG_Commands::Monitor_Reboot *cmd = (CLR_DBG_Commands::Monitor_Reboot *)msg->m_payload; - if (NULL != cmd) + if (CLR_DBG_Commands::Monitor_Reboot::c_EnterNanoBooter == + (cmd->m_flags & CLR_DBG_Commands::Monitor_Reboot::c_EnterNanoBooter)) { - if (CLR_DBG_Commands::Monitor_Reboot::c_EnterNanoBooter == - (cmd->m_flags & CLR_DBG_Commands::Monitor_Reboot::c_EnterNanoBooter)) - { - success = RequestToLaunchNanoBooter(); - } - else if ( - CLR_DBG_Commands::Monitor_Reboot::c_EnterProprietaryBooter == - (cmd->m_flags & CLR_DBG_Commands::Monitor_Reboot::c_EnterProprietaryBooter)) - { - success = RequestToLaunchProprietaryBootloader(); - } - - g_CLR_RT_ExecutionEngine.m_iReboot_Options = cmd->m_flags; + success = RequestToLaunchNanoBooter(); + } + else if ( + CLR_DBG_Commands::Monitor_Reboot::c_EnterProprietaryBooter == + (cmd->m_flags & CLR_DBG_Commands::Monitor_Reboot::c_EnterProprietaryBooter)) + { + success = RequestToLaunchProprietaryBootloader(); } - - Events_WaitForEvents(0, 100); // give message a little time to be flushed WP_ReplyToCommand(msg, success, false, NULL, 0); - Events_WaitForEvents(0, 100); // give message a little time to be flushed + // on success, apply reboot options and set reboot pending flag + if (success) + { + g_CLR_RT_ExecutionEngine.m_iReboot_Options = cmd->m_flags; - CLR_EE_DBG_SET(RebootPending); + CLR_EE_DBG_SET(RebootPending); + } return true; } @@ -1119,53 +1127,70 @@ bool CLR_DBG_Debugger::Monitor_QueryConfiguration(WP_Message *message) case DeviceConfigurationOption_X509CaRootBundle: - if (g_TargetConfiguration.CertificateStore->Count > cmd->BlockIndex) + // check if cert store is empty OR request index doesn't exist + // (mind the zero based index) + if (g_TargetConfiguration.CertificateStore->Count == 0 || + g_TargetConfiguration.CertificateStore->Count < cmd->BlockIndex + 1) + { + // we are done here, just send an empty reply + success = true; + } + else { // because X509 certificate has a variable length need to compute the block size in two steps sizeOfBlock = offsetof(HAL_Configuration_X509CaRootBundle, Certificate); sizeOfBlock += g_TargetConfiguration.CertificateStore->Certificates[cmd->BlockIndex]->CertificateSize; - } - x509Certificate = (HAL_Configuration_X509CaRootBundle *)platform_malloc(sizeOfBlock); - memset(x509Certificate, 0, sizeof(sizeOfBlock)); + x509Certificate = (HAL_Configuration_X509CaRootBundle *)platform_malloc(sizeOfBlock); + memset(x509Certificate, 0, sizeof(sizeOfBlock)); - if (ConfigurationManager_GetConfigurationBlock( - x509Certificate, - (DeviceConfigurationOption)cmd->Configuration, - cmd->BlockIndex) == true) - { - size = sizeOfBlock; - success = true; + if (ConfigurationManager_GetConfigurationBlock( + x509Certificate, + (DeviceConfigurationOption)cmd->Configuration, + cmd->BlockIndex) == true) + { + size = sizeOfBlock; + success = true; - WP_ReplyToCommand(message, success, false, (uint8_t *)x509Certificate, size); + WP_ReplyToCommand(message, success, false, (uint8_t *)x509Certificate, size); + } + platform_free(x509Certificate); } - platform_free(x509Certificate); + break; case DeviceConfigurationOption_X509DeviceCertificates: - if (g_TargetConfiguration.DeviceCertificates->Count > cmd->BlockIndex) + // check if device cert store is empty OR request index doesn't exist + // (mind the zero based index) + if (g_TargetConfiguration.DeviceCertificates->Count == 0 || + g_TargetConfiguration.DeviceCertificates->Count < cmd->BlockIndex + 1) + { + // we are done here, just send an empty reply + success = true; + } + else { // because X509 certificate has a variable length need to compute the block size in two steps sizeOfBlock = offsetof(HAL_Configuration_X509DeviceCertificate, Certificate); sizeOfBlock += g_TargetConfiguration.DeviceCertificates->Certificates[cmd->BlockIndex]->CertificateSize; - } - x509DeviceCertificate = (HAL_Configuration_X509DeviceCertificate *)platform_malloc(sizeOfBlock); - memset(x509DeviceCertificate, 0, sizeof(sizeOfBlock)); + x509DeviceCertificate = (HAL_Configuration_X509DeviceCertificate *)platform_malloc(sizeOfBlock); + memset(x509DeviceCertificate, 0, sizeof(sizeOfBlock)); - if (ConfigurationManager_GetConfigurationBlock( - x509DeviceCertificate, - (DeviceConfigurationOption)cmd->Configuration, - cmd->BlockIndex) == true) - { - size = sizeOfBlock; - success = true; + if (ConfigurationManager_GetConfigurationBlock( + x509DeviceCertificate, + (DeviceConfigurationOption)cmd->Configuration, + cmd->BlockIndex) == true) + { + size = sizeOfBlock; + success = true; - WP_ReplyToCommand(message, success, false, (uint8_t *)x509DeviceCertificate, size); - } + WP_ReplyToCommand(message, success, false, (uint8_t *)x509DeviceCertificate, size); + } - platform_free(x509DeviceCertificate); + platform_free(x509DeviceCertificate); + } break; @@ -1264,22 +1289,30 @@ bool CLR_DBG_Debugger::Debugging_Execution_ChangeConditions(WP_Message *msg) CLR_DBG_Commands::Debugging_Execution_ChangeConditions *cmd = (CLR_DBG_Commands::Debugging_Execution_ChangeConditions *)msg->m_payload; - g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions |= cmd->FlagsToSet; - g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions &= ~cmd->FlagsToReset; + // save current value + int32_t newConditions = g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions; - // updating the debugging execution conditions requires sometime to propagate - // make sure we allow enough time for that to happen - OS_DELAY(100); + // apply received flags + newConditions |= cmd->FlagsToSet; + newConditions &= ~cmd->FlagsToReset; + // send confirmation reply if ((msg->m_header.m_flags & WP_Flags_c_NonCritical) == 0) { CLR_DBG_Commands::Debugging_Execution_ChangeConditions::Reply cmdReply; - cmdReply.CurrentState = g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions; + cmdReply.CurrentState = (CLR_UINT32)newConditions; WP_ReplyToCommand(msg, true, false, &cmdReply, sizeof(cmdReply)); } + // if there is anything to change, apply the changes + if (cmd->FlagsToSet || cmd->FlagsToReset) + { + // update conditions + g_CLR_RT_ExecutionEngine.m_iDebugger_Conditions = newConditions; + } + return true; } diff --git a/src/CLR/Debugger/Debugger.vcxproj b/src/CLR/Debugger/Debugger.vcxproj index d5ebaee4ca..922cf98807 100644 --- a/src/CLR/Debugger/Debugger.vcxproj +++ b/src/CLR/Debugger/Debugger.vcxproj @@ -26,7 +26,7 @@ {DD397EC4-844B-4B59-A67B-CAD6B46F1F00} Win32Proj Debugger - 10.0.18362.0 + 10.0.19041.0 @@ -99,7 +99,7 @@ Level3 Disabled - WIN32;_DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + WIN32;_DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include @@ -112,7 +112,7 @@ Level3 Disabled - _DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + _DEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) ..\Include;..\CorLib @@ -127,7 +127,7 @@ MaxSpeed true true - WIN32;NDEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include diff --git a/src/CLR/Debugger/Debugger_stub.vcxproj b/src/CLR/Debugger/Debugger_stub.vcxproj index eb3dad1b11..06177f1ecd 100644 --- a/src/CLR/Debugger/Debugger_stub.vcxproj +++ b/src/CLR/Debugger/Debugger_stub.vcxproj @@ -25,7 +25,7 @@ {6DABCBF1-245A-4E76-BD36-8BC300C7DD82} Win32Proj Debugger_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Diagnostics/Diagnostics.vcxproj b/src/CLR/Diagnostics/Diagnostics.vcxproj index cea2ad0a37..f48713fdcc 100644 --- a/src/CLR/Diagnostics/Diagnostics.vcxproj +++ b/src/CLR/Diagnostics/Diagnostics.vcxproj @@ -30,7 +30,7 @@ {A5E9AE41-F4FA-40CE-AD82-A7861EBA007B} Win32Proj Diagnostics - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Diagnostics/Diagnostics_stub.vcxproj b/src/CLR/Diagnostics/Diagnostics_stub.vcxproj index 4733bc50e3..cc0d4b42e2 100644 --- a/src/CLR/Diagnostics/Diagnostics_stub.vcxproj +++ b/src/CLR/Diagnostics/Diagnostics_stub.vcxproj @@ -28,7 +28,7 @@ {C97A9845-02DC-46E4-B219-BF5EA8FB28E3} Win32Proj Diagnostics_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Diagnostics/Info.cpp b/src/CLR/Diagnostics/Info.cpp index 1d41298063..e29adfb54d 100644 --- a/src/CLR/Diagnostics/Info.cpp +++ b/src/CLR/Diagnostics/Info.cpp @@ -226,7 +226,7 @@ void CLR_Debug::Emit(const char *text, int len) HAL_Windows_Debug_Print(s_buffer); #endif - if (CLR_EE_DBG_IS(Enabled) && !CLR_EE_DBG_IS(Quiet)) + if (CLR_EE_DBG_IS(Enabled) && CLR_EE_DBG_IS_NOT(Quiet)) { CLR_EE_DBG_EVENT_BROADCAST( CLR_DBG_Commands_c_Monitor_Message, @@ -235,8 +235,9 @@ void CLR_Debug::Emit(const char *text, int len) WP_Flags_c_NonCritical | WP_Flags_c_NoCaching); } - if (HalSystemConfig.DebugTextPort != HalSystemConfig.DebuggerPort) + if (CLR_EE_DBG_IS_NOT(Enabled) || HalSystemConfig.DebugTextPort != HalSystemConfig.DebuggerPort) { + #if !defined(_WIN32) DebuggerPort_Write( HalSystemConfig.DebugTextPort, @@ -963,6 +964,7 @@ const char *CLR_RT_DUMP::GETERRORMESSAGE(HRESULT hrError) CASE_HRESULT_TO_STRING(CLR_E_TYPE_UNAVAILABLE); CASE_HRESULT_TO_STRING(CLR_E_INVALID_CAST); CASE_HRESULT_TO_STRING(CLR_E_OUT_OF_RANGE); + CASE_HRESULT_TO_STRING(CLR_E_FORMAT_EXCEPTION); CASE_HRESULT_TO_STRING(CLR_E_SERIALIZATION_VIOLATION); CASE_HRESULT_TO_STRING(CLR_E_SERIALIZATION_BADSTREAM); CASE_HRESULT_TO_STRING(CLR_E_DIVIDE_BY_ZERO); diff --git a/src/CLR/Helpers/Base64/base64.c b/src/CLR/Helpers/Base64/base64.c index 95421900e6..e4b7a0622c 100644 --- a/src/CLR/Helpers/Base64/base64.c +++ b/src/CLR/Helpers/Base64/base64.c @@ -1,6 +1,6 @@ // // Copyright (c) .NET Foundation and Contributors -// Portions Copyright (c) https://www.mycplus.com. All Rights Reserved. +// Portions Copyright (c) The Mbed TLS Contributors. All Rights Reserved. // See LICENSE file in the project root for full license information. // @@ -10,95 +10,285 @@ // thus there will be no duplicate code // ////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Any changes here should be refelected in targets\win32\nanoCLR\base64.cpp // +/////////////////////////////////////////////////////////////////////////////// + #include "base64.h" -void build_decoding_table(char *decoding_table ) +static void mbedtls_base64_cond_assign_uint32(uint32_t *dest, const uint32_t src, uint32_t condition) +{ + /* MSVC has a warning about unary minus on unsigned integer types, + * but this is well-defined and precisely what we want to do here. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + /* Generate bitmask from condition, mask will either be 0xFFFFFFFF or 0 */ + uint32_t mask = (condition | -condition); + mask >>= 31; + mask = -mask; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + *dest = (src & mask) | ((*dest) & ~mask); +} + +static unsigned char mbedtls_base64_eq(size_t in_a, size_t in_b) +{ + size_t difference = in_a ^ in_b; + + /* MSVC has a warning about unary minus on unsigned integer types, + * but this is well-defined and precisely what we want to do here. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + difference |= -difference; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + /* cope with the varying size of size_t per platform */ + difference >>= (sizeof(difference) * 8 - 1); + + return (unsigned char)(1 ^ difference); +} + +static void mbedtls_base64_cond_assign_uchar( + unsigned char *dest, + const unsigned char *const src, + unsigned char condition) { - if(decoding_table != NULL) + /* MSVC has a warning about unary minus on unsigned integer types, + * but this is well-defined and precisely what we want to do here. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + /* Generate bitmask from condition, mask will either be 0xFF or 0 */ + unsigned char mask = (condition | -condition); + mask >>= 7; + mask = -mask; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + *dest = ((*src) & mask) | ((*dest) & ~mask); +} + +static unsigned char mbedtls_base64_table_lookup( + const unsigned char *const table, + const size_t table_size, + const size_t table_index) +{ + size_t i; + unsigned char result = 0; + + for (i = 0; i < table_size; ++i) { - for (int i = 0; i < 64; i++) - decoding_table[(unsigned char) base64_enc_map[i]] = i; + mbedtls_base64_cond_assign_uchar(&result, &table[i], mbedtls_base64_eq(i, table_index)); } + + return result; } -__nfweak int mbedtls_base64_encode( - unsigned char *dst, - size_t dlen, - size_t *olen, - const unsigned char *src, size_t slen ) +__nfweak int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) { - // parameter not used - (void)dlen; + size_t i, n; + int C1, C2, C3; + unsigned char *p; - for (unsigned int i = 0, j = 0; i < slen;) + if (slen == 0) { - int octet_a = i < slen ? (unsigned char)src[i++] : 0; - int octet_b = i < slen ? (unsigned char)src[i++] : 0; - int octet_c = i < slen ? (unsigned char)src[i++] : 0; + *olen = 0; + return (0); + } - int triple = (octet_a << 0x10) + (octet_b << 0x08) + octet_c; + n = slen / 3 + (slen % 3 != 0); - dst[j++] = base64_enc_map[(triple >> 3 * 6) & 0x3F]; - dst[j++] = base64_enc_map[(triple >> 2 * 6) & 0x3F]; - dst[j++] = base64_enc_map[(triple >> 1 * 6) & 0x3F]; - dst[j++] = base64_enc_map[(triple >> 0 * 6) & 0x3F]; + if (n > (BASE64_SIZE_T_MAX - 1) / 4) + { + *olen = BASE64_SIZE_T_MAX; + return (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); } - for (unsigned int i = 0; i < mod_table[slen % 3]; i++) - dst[*olen - 1 - i] = '='; + n *= 4; - // add terminator - dst[*olen] = 0; + if ((dlen < n + 1) || (NULL == dst)) + { + *olen = n + 1; + return (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); + } + + n = (slen / 3) * 3; + + for (i = 0, p = dst; i < n; i += 3) + { + C1 = *src++; + C2 = *src++; + C3 = *src++; + + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((C1 >> 2) & 0x3F)); + + *p++ = + mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((((C1 & 3) << 4) + (C2 >> 4)) & 0x3F)); + + *p++ = mbedtls_base64_table_lookup( + base64_enc_map, + sizeof(base64_enc_map), + ((((C2 & 15) << 2) + (C3 >> 6)) & 0x3F)); + + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), (C3 & 0x3F)); + } + + if (i < slen) + { + C1 = *src++; + C2 = ((i + 1) < slen) ? *src++ : 0; + + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((C1 >> 2) & 0x3F)); + + *p++ = + mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((((C1 & 3) << 4) + (C2 >> 4)) & 0x3F)); + + if ((i + 1) < slen) + { + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), (((C2 & 15) << 2) & 0x3F)); + } + else + { + *p++ = '='; + } + + *p++ = '='; + } + + *olen = p - dst; + *p = 0; return 0; } -__nfweak int mbedtls_base64_decode( - unsigned char *dst, - size_t dlen, - size_t *olen, - const unsigned char *src, size_t slen ) +__nfweak int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) { - // parameter not used - (void)dlen; + size_t i, n; + uint32_t j, x; + unsigned char *p; + unsigned char dec_map_lookup; - char *decoding_table = (char*)platform_malloc(256); + /* First pass: check for validity and get output length */ + for (i = n = j = 0; i < slen; i++) + { + /* Skip spaces before checking for EOL */ + x = 0; + while (i < slen && src[i] == ' ') + { + ++i; + ++x; + } + + /* Spaces at end of buffer are OK */ + if (i == slen) + { + break; + } + + if ((slen - i) >= 2 && src[i] == '\r' && src[i + 1] == '\n') + { + continue; + } + + if (src[i] == '\n') + { + continue; + } + + /* Space inside a line is an error */ + if (x != 0) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + if (src[i] == '=' && ++j > 2) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + dec_map_lookup = mbedtls_base64_table_lookup(base64_dec_map, sizeof(base64_dec_map), src[i]); - if (decoding_table == NULL) + if (src[i] > 127 || dec_map_lookup == 127) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + if (dec_map_lookup < 64 && j != 0) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + n++; + } + + if (n == 0) { - // OK to return anything but 0 - // we are forced to use mbedTLS behaviour anyway - return -1; + *olen = 0; + return (0); } - build_decoding_table(decoding_table); + /* The following expression is to calculate the following formula without + * risk of integer overflow in n: + * n = ( ( n * 6 ) + 7 ) >> 3; + */ + n = (6 * (n >> 3)) + ((6 * (n & 0x7) + 7) >> 3); + n -= j; - if (slen % 4 != 0) + if (dst == NULL || dlen < n) { - // OK to return anything but 0 - // we are forced to use mbedTLS behaviour anyway - return -1; + *olen = n; + return (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); } - for (unsigned int i = 0, j = 0; i < slen;) { + for (j = 3, n = x = 0, p = dst; i > 0; i--, src++) + { + if (*src == '\r' || *src == '\n' || *src == ' ') + { + continue; + } + + dec_map_lookup = mbedtls_base64_table_lookup(base64_dec_map, sizeof(base64_dec_map), *src); + + mbedtls_base64_cond_assign_uint32(&j, j - 1, mbedtls_base64_eq(dec_map_lookup, 64)); + x = (x << 6) | (dec_map_lookup & 0x3F); - int sextet_a = src[i] == '=' ? 0 & i++ : decoding_table[src[i++]]; - int sextet_b = src[i] == '=' ? 0 & i++ : decoding_table[src[i++]]; - int sextet_c = src[i] == '=' ? 0 & i++ : decoding_table[src[i++]]; - int sextet_d = src[i] == '=' ? 0 & i++ : decoding_table[src[i++]]; + if (++n == 4) + { + n = 0; + if (j > 0) + { + *p++ = (unsigned char)(x >> 16); + } - int triple = (sextet_a << 3 * 6) - + (sextet_b << 2 * 6) - + (sextet_c << 1 * 6) - + (sextet_d << 0 * 6); + if (j > 1) + { + *p++ = (unsigned char)(x >> 8); + } - if (j < *olen) dst[j++] = (triple >> 2 * 8) & 0xFF; - if (j < *olen) dst[j++] = (triple >> 1 * 8) & 0xFF; - if (j < *olen) dst[j++] = (triple >> 0 * 8) & 0xFF; + if (j > 2) + { + *p++ = (unsigned char)(x); + } + } } - // free table - platform_free(decoding_table); + *olen = p - dst; - return( 0 ); + return (0); } diff --git a/src/CLR/Helpers/Base64/base64.h b/src/CLR/Helpers/Base64/base64.h index d2a149808e..ea4d3bab1c 100644 --- a/src/CLR/Helpers/Base64/base64.h +++ b/src/CLR/Helpers/Base64/base64.h @@ -1,6 +1,6 @@ // // Copyright (c) .NET Foundation and Contributors -// Portions Copyright (c) ARM Limited. All Rights Reserved. +// Portions Copyright (c) The Mbed TLS Contributors. All Rights Reserved. // See LICENSE file in the project root for full license information. // @@ -15,6 +15,10 @@ // thus there will be no duplicate code // ////////////////////////////////////////////////////////////////////////////////////////////// +#define BASE64_SIZE_T_MAX ((size_t)-1) /* SIZE_T_MAX is not standard */ +#define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL -0x002A /**< Output buffer too small. */ +#define MBEDTLS_ERR_BASE64_INVALID_CHARACTER -0x002C /**< Invalid character in input. */ + #ifdef __cplusplus extern "C" { @@ -28,7 +32,13 @@ extern "C" 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; - static const unsigned int mod_table[3] = {0, 2, 1}; + static const unsigned char base64_dec_map[128] = { + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 62, + 127, 127, 127, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 127, 127, 127, 64, 127, 127, 127, 0, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 127, 127, 127, 127, 127, 127, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 127, 127, 127, 127, 127}; #ifdef __cplusplus } diff --git a/src/CLR/Helpers/nanoprintf/nanoprintf.c b/src/CLR/Helpers/nanoprintf/nanoprintf.c index 4bf453a52d..8b85933135 100644 --- a/src/CLR/Helpers/nanoprintf/nanoprintf.c +++ b/src/CLR/Helpers/nanoprintf/nanoprintf.c @@ -4,6 +4,26 @@ // Portions Copyright (c) 2009-2013 Daniel D Miller. All rights reserved. // See LICENSE file in the project root for full license information. // +// Notes on this implementation: This is a small/fast implementation of printf variants +// for double (floating) numbers. It is a compromise of size and speed over capability. +// In general the algorithm used in this code can only format a small range of the possible +// values that can be fit in a double. A double can hold roughly +/-1e308, but the code in +// this program uses shifting of 64 bits, so a range of roughly +/-1e18 (2^63). The method +// npf_dsplit_abs supports this limitation and will return a value of "oor" (out-of-range) +// for numbers over 2^63. It will return zero for any numbers below 2^-63. +// +// See the information here: http://0x80.pl/notesen/2015-12-29-float-to-string.html +// +// Notes on this implementation: This is a small/fast implementation of printf variants +// for double (floating) numbers. It is a compromise of size and speed over capability. +// In general the algorithm used in this code can only format a small range of the possible +// values that can be fit in a double. A double can hold roughly +/-1e308, but the code in +// this program uses shifting of 64 bits, so a range of roughly +/-1e18 (2^63). The method +// npf_dsplit_abs supports this limitation and will return a value of "oor" (out-of-range) +// for numbers over 2^63. It will return zero for any numbers below 2^-63. +// +// See the information here: http://0x80.pl/notesen/2015-12-29-float-to-string.html +// /* The implementation of nanoprintf begins here, to be compiled only if @@ -641,7 +661,7 @@ int npf_vpprintf(npf_putc pc, void *pc_ctx, char const *format, va_list vlist) NPF_EXTRACT(SHORT, short, int); NPF_EXTRACT(LONG, long, long); NPF_EXTRACT(LONG_DOUBLE, int, int); - NPF_EXTRACT(CHAR, char, int); + NPF_EXTRACT(CHAR, signed char, int); #if NANOPRINTF_USE_LARGE_FORMAT_SPECIFIERS == 1 NPF_EXTRACT(LARGE_LONG_LONG, long long, long long); NPF_EXTRACT(LARGE_INTMAX, intmax_t, intmax_t); @@ -882,7 +902,9 @@ int npf_vpprintf(npf_putc pc, void *pc_ctx, char const *format, va_list vlist) { /* float precision is after the decimal point */ int const precision_start = - (fs.conv_spec == NPF_FMT_SPEC_CONV_FLOAT_DECIMAL) ? frac_chars : cbuf_len; + (fs.conv_spec == NPF_FMT_SPEC_CONV_FLOAT_DECIMAL) ? frac_chars : fs.precision; + // If not a float or decimal then the prec_pad has to end up as zero so we don't attempt any + // padding prec_pad = NPF_MAX(0, fs.precision - precision_start); } #elif NANOPRINTF_USE_PRECISION_FORMAT_SPECIFIERS == 1 diff --git a/src/CLR/Include/WireProtocol.h b/src/CLR/Include/WireProtocol.h index d3a4b2f0ba..6a15d80933 100644 --- a/src/CLR/Include/WireProtocol.h +++ b/src/CLR/Include/WireProtocol.h @@ -58,13 +58,13 @@ typedef enum WP_Flags // enum with machine states for Wire Procotol receiver typedef enum ReceiveState { - ReceiveState_Idle = (1 << 0), - ReceiveState_Initialize = (2 << 0), - ReceiveState_WaitingForHeader = (3 << 0), - ReceiveState_ReadingHeader = (4 << 0), - ReceiveState_CompleteHeader = (5 << 0), - ReceiveState_ReadingPayload = (6 << 0), - ReceiveState_CompletePayload = (7 << 0), + ReceiveState_Idle = 1, + ReceiveState_Initialize = 2, + ReceiveState_WaitingForHeader = 3, + ReceiveState_ReadingHeader = 4, + ReceiveState_CompleteHeader = 5, + ReceiveState_ReadingPayload = 6, + ReceiveState_CompletePayload = 7, }ReceiveState; // enum with CLR monitor commands @@ -124,24 +124,6 @@ typedef struct WP_Message { WP_Packet m_header; uint8_t* m_payload; - - uint8_t* m_pos; - uint16_t m_size; - uint64_t m_payloadTicks; - int m_rxState; - - void (*Initialize)(WP_Controller* parent); - void (*PrepareReception)(void); - void (*PrepareRequest)(unsigned int cmd, unsigned int flags, unsigned int payloadSize, unsigned char* payload); - void (*PrepareReply)(const void** req, unsigned int flags, unsigned int payloadSize, unsigned char* payload); - void (*SetPayload)(unsigned char* payload); - void (*Release)(void); - bool (*Process)(void); - - bool (*VerifyHeader)(void); - bool (*VerifyPayload)(void); - void (*ReplyBadPacket)(unsigned int flags); - }WP_Message; diff --git a/src/CLR/Include/WireProtocol_App_Interface.h b/src/CLR/Include/WireProtocol_App_Interface.h index f413d93bb7..65fae0733b 100644 --- a/src/CLR/Include/WireProtocol_App_Interface.h +++ b/src/CLR/Include/WireProtocol_App_Interface.h @@ -9,12 +9,30 @@ #include "WireProtocol.h" ////////////////////////////////////////// -extern uint8_t receptionBuffer[sizeof(WP_Packet) + WP_PACKET_SIZE]; -extern void ReplyToCommand(WP_Message* message, int fSuccess, int fCritical, void* ptr, int size); +extern void ReplyToCommand(WP_Message *message, int fSuccess, int fCritical, void *ptr, int size); + +extern const CommandHandlerLookup c_Lookup_Request[]; +extern const CommandHandlerLookup c_Lookup_Reply[]; ////////////////////////////////////////// -int WP_App_ProcessHeader(WP_Message* message); -int WP_App_ProcessPayload(WP_Message* message); -#endif // _WIREPROTOCOL_APP_INTERFACE_H_ +#ifdef __cplusplus +extern "C" +{ +#endif + + uint8_t WP_App_ProcessHeader(WP_Message *message); + uint8_t WP_App_ProcessPayload(WP_Message *message); + uint8_t Messaging_ProcessPayload(WP_Message *message); + ///////////////////////////////////// + // these two helper functions need to be implemented at platform level (WireProtocol_App_Interface.c) + uint8_t GetSizeOfLookup_Reply(); + uint8_t GetSizeOfLookup_Request(); + //////////////////////////////////// + +#ifdef __cplusplus +} +#endif + +#endif // _WIREPROTOCOL_APP_INTERFACE_H_ diff --git a/src/CLR/Include/WireProtocol_HAL_Interface.h b/src/CLR/Include/WireProtocol_HAL_Interface.h index 8c6b951a50..a602aaddd9 100644 --- a/src/CLR/Include/WireProtocol_HAL_Interface.h +++ b/src/CLR/Include/WireProtocol_HAL_Interface.h @@ -9,8 +9,24 @@ #include "WireProtocol.h" ////////////////////////////////////////// -int WP_ReceiveBytes(uint8_t *ptr, unsigned short *size); -int WP_TransmitMessage(WP_Message *message); + +/// +/// @brief Receives n bytes from the Wire Protocol channel. +/// +/// @param ptr Pointer to the buffer that will hold the received bytes. +/// @param size Number of bytes to read. On return it will have the number of bytes actually received. +/// @return bool true if any bytes where received, false otherwise. +/// +uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size); + +/// +/// @brief Sends a message through the Wire Protocol channel. +/// +/// @param message Message to send +/// @return bool true for transmition succesfull, false otherwise. +/// +uint8_t WP_TransmitMessage(WP_Message *message); + void WP_CheckAvailableIncomingData(); #endif // _WIREPROTOCOL_HAL_INTERFACE_H_ diff --git a/src/CLR/Include/WireProtocol_Message.h b/src/CLR/Include/WireProtocol_Message.h index aa976d5a41..451523dfe4 100644 --- a/src/CLR/Include/WireProtocol_Message.h +++ b/src/CLR/Include/WireProtocol_Message.h @@ -37,8 +37,8 @@ extern "C" { #endif + void WP_Message_PrepareReception(); void WP_Message_Initialize(WP_Message *message); - void WP_Message_PrepareReception(WP_Message *message); void WP_Message_PrepareRequest( WP_Message *message, uint32_t cmd, @@ -51,12 +51,11 @@ extern "C" uint32_t flags, uint32_t payloadSize, uint8_t *payload); - void WP_Message_SetPayload(WP_Message *message, uint8_t *payload); - void WP_Message_Release(WP_Message *message); - int WP_Message_VerifyHeader(WP_Message *message); - int WP_Message_VerifyPayload(WP_Message *message); - void WP_Message_ReplyBadPacket(uint32_t flags); - int WP_Message_Process(WP_Message *message); + uint8_t WP_Message_VerifyHeader(WP_Message *message); + uint8_t WP_Message_VerifyPayload(WP_Message *message); + void WP_Message_Process(); + + void WP_Message_PrepareReception_Platform(); #ifdef __cplusplus } diff --git a/src/CLR/Include/nanoCLR_Debugging.h b/src/CLR/Include/nanoCLR_Debugging.h index 0aedda1e30..246a629e30 100644 --- a/src/CLR/Include/nanoCLR_Debugging.h +++ b/src/CLR/Include/nanoCLR_Debugging.h @@ -37,6 +37,7 @@ struct CLR_DBG_Commands static const unsigned int c_Monitor_OemInfo = 0x0000000E; static const unsigned int c_Monitor_QueryConfiguration = 0x0000000F; static const unsigned int c_Monitor_UpdateConfiguration= 0x00000010; + static const unsigned int c_Monitor_TargetInfo = 0x00000020; //--// diff --git a/src/CLR/Include/nanoCLR_Hardware.h b/src/CLR/Include/nanoCLR_Hardware.h index e8caf3bc14..32bd7175e5 100644 --- a/src/CLR/Include/nanoCLR_Hardware.h +++ b/src/CLR/Include/nanoCLR_Hardware.h @@ -24,7 +24,8 @@ struct CLR_HW_Hardware SYSTEM_EVENT_FLAG_COM_IN | SYSTEM_EVENT_FLAG_COM_OUT | SYSTEM_EVENT_FLAG_STORAGE_IO | SYSTEM_EVENT_FLAG_SYSTEM_TIMER | SYSTEM_EVENT_FLAG_SPI_MASTER | SYSTEM_EVENT_FLAG_I2C_MASTER | SYSTEM_EVENT_HW_INTERRUPT | SYSTEM_EVENT_FLAG_SOCKET | SYSTEM_EVENT_FLAG_DEBUGGER_ACTIVITY | - SYSTEM_EVENT_FLAG_MESSAGING_ACTIVITY | SYSTEM_EVENT_FLAG_ONEWIRE_MASTER | SYSTEM_EVENT_FLAG_RADIO; + SYSTEM_EVENT_FLAG_MESSAGING_ACTIVITY | SYSTEM_EVENT_FLAG_ONEWIRE_MASTER | SYSTEM_EVENT_FLAG_RADIO | + SYSTEM_EVENT_FLAG_WIFI_STATION; //--// diff --git a/src/CLR/Include/nanoCLR_Runtime.h b/src/CLR/Include/nanoCLR_Runtime.h index 43b0377664..28dedf2e6d 100644 --- a/src/CLR/Include/nanoCLR_Runtime.h +++ b/src/CLR/Include/nanoCLR_Runtime.h @@ -1525,10 +1525,12 @@ struct CLR_RT_WellKnownTypes CLR_RT_TypeDef_Index m_ThreadAbortException; CLR_RT_TypeDef_Index m_InvalidOperationException; CLR_RT_TypeDef_Index m_InvalidCastException; + CLR_RT_TypeDef_Index m_FormatException; CLR_RT_TypeDef_Index m_NotSupportedException; CLR_RT_TypeDef_Index m_NotImplementedException; CLR_RT_TypeDef_Index m_NullReferenceException; CLR_RT_TypeDef_Index m_OutOfMemoryException; + CLR_RT_TypeDef_Index m_TimeoutException; CLR_RT_TypeDef_Index m_ObjectDisposedException; CLR_RT_TypeDef_Index m_ConstraintException; CLR_RT_TypeDef_Index m_WatchdogException; @@ -1550,6 +1552,8 @@ struct CLR_RT_WellKnownTypes CLR_RT_TypeDef_Index m_WeakReference; + CLR_RT_TypeDef_Index m_Guid; + CLR_RT_TypeDef_Index m_SerializationHintsAttribute; CLR_RT_TypeDef_Index m_Bitmap; CLR_RT_TypeDef_Index m_Font; @@ -2411,6 +2415,11 @@ struct CLR_RT_StackFrame : public CLR_RT_HeapBlock_Node // EVENT HEAP - NO RELOC SetResult_I4(val); } + inline void PushValueU4(CLR_UINT32 val) + { + SetResult_U4(val); + } + //--// CLR_RT_StackFrame *Caller() @@ -3357,6 +3366,9 @@ extern bool g_CLR_RT_fBadStack; //--// typedef enum Events { + // this event is to be used when there is no event to actually wait for + Event_NoEvent = 0x00000001, + Event_SerialPortIn = 0x00000002, Event_SerialPortOut = 0x00000004, Event_EndPoint = 0x00000008, @@ -3365,6 +3377,7 @@ typedef enum Events Event_SpiMaster = 0x00000100, Event_OneWireMaster = 0x00000200, Event_Radio = 0x00000400, + Event_Wifi_Station = 0x00000800, Event_AppDomain = 0x02000000, Event_Socket = 0x20000000, Event_IdleCPU = 0x40000000, @@ -3392,7 +3405,8 @@ struct CLR_RT_ExecutionEngine static const int c_fDebugger_StateResolutionFailed = 0x00000001; static const int c_fDebugger_StateProgramRunning = 0x00000400; static const int c_fDebugger_StateProgramExited = 0x00000800; - static const int c_fDebugger_StateMask = c_fDebugger_StateProgramRunning + c_fDebugger_StateProgramExited; + static const int c_fDebugger_StateMask = + c_fDebugger_StateProgramRunning + c_fDebugger_StateProgramExited + c_fDebugger_StateResolutionFailed; // static const int c_fDebugger_BreakpointsDisabled = 0x00001000; // diff --git a/src/CLR/Include/nf_errors_exceptions.h b/src/CLR/Include/nf_errors_exceptions.h index 479b6b0095..f230567325 100644 --- a/src/CLR/Include/nf_errors_exceptions.h +++ b/src/CLR/Include/nf_errors_exceptions.h @@ -14,9 +14,8 @@ typedef int HRESULT; // Severity values // -#define SEVERITY_SUCCESS 0 -#define SEVERITY_ERROR 1 - +#define SEVERITY_SUCCESS 0 +#define SEVERITY_ERROR 1 // // Generic test for success on any status value (non-negative numbers @@ -29,143 +28,144 @@ typedef int HRESULT; // and the inverse // -#define FAILED(Status) ((HRESULT)(Status)<0) - +#define FAILED(Status) ((HRESULT)(Status) < 0) // // Success codes // -#define S_OK ((HRESULT)0x00000000L) -#define S_FALSE ((HRESULT)0x00000001L) - +#define S_OK ((HRESULT)0x00000000L) +#define S_FALSE ((HRESULT)0x00000001L) // // Return the code // -#define HRESULT_CODE(hr) ((hr) & 0xFFFF) +#define HRESULT_CODE(hr) ((hr)&0xFFFF) // // Return the facility // -#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff) +#define HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff) // // Return the severity // -#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1) +#define HRESULT_SEVERITY(hr) (((hr) >> 31) & 0x1) // // Create an HRESULT value from component pieces // -#define MAKE_HRESULT(sev,fac,code) ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) +#define MAKE_HRESULT(sev, fac, code) \ + ((HRESULT)(((unsigned long)(sev) << 31) | ((unsigned long)(fac) << 16) | ((unsigned long)(code)))) #endif // !defined(WIN32) && !defined(_WIN32) //--// +// clang-format off + // -// These are denormalized HRESULTs, only the 8 most significant bits are set, to allow use of MOV ,# by the compiler. +// These are denormalized HRESULTs, only the 8 most significant bits are set, to allow use of MOV ,# by the +// compiler. // -#define CLR_E_UNKNOWN_INSTRUCTION MAKE_HRESULT( SEVERITY_ERROR , 0x0100, 0x0000 ) -#define CLR_E_UNSUPPORTED_INSTRUCTION MAKE_HRESULT( SEVERITY_ERROR , 0x0200, 0x0000 ) +#define CLR_E_UNKNOWN_INSTRUCTION MAKE_HRESULT(SEVERITY_ERROR, 0x0100, 0x0000) +#define CLR_E_UNSUPPORTED_INSTRUCTION MAKE_HRESULT(SEVERITY_ERROR, 0x0200, 0x0000) -#define CLR_E_STACK_OVERFLOW MAKE_HRESULT( SEVERITY_ERROR , 0x1100, 0x0000 ) -#define CLR_E_STACK_UNDERFLOW MAKE_HRESULT( SEVERITY_ERROR , 0x1200, 0x0000 ) +#define CLR_E_STACK_OVERFLOW MAKE_HRESULT(SEVERITY_ERROR, 0x1100, 0x0000) +#define CLR_E_STACK_UNDERFLOW MAKE_HRESULT(SEVERITY_ERROR, 0x1200, 0x0000) -#define CLR_E_ENTRY_NOT_FOUND MAKE_HRESULT( SEVERITY_ERROR , 0x1500, 0x0000 ) -#define CLR_E_ASSM_WRONG_CHECKSUM MAKE_HRESULT( SEVERITY_ERROR , 0x1600, 0x0000 ) -#define CLR_E_ASSM_PATCHING_NOT_SUPPORTED MAKE_HRESULT( SEVERITY_ERROR , 0x1700, 0x0000 ) -#define CLR_E_SHUTTING_DOWN MAKE_HRESULT( SEVERITY_ERROR , 0x1800, 0x0000 ) -#define CLR_E_OBJECT_DISPOSED MAKE_HRESULT( SEVERITY_ERROR , 0x1900, 0x0000 ) -#define CLR_E_WATCHDOG_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR , 0x1A00, 0x0000 ) +#define CLR_E_ENTRY_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, 0x1500, 0x0000) +#define CLR_E_ASSM_WRONG_CHECKSUM MAKE_HRESULT(SEVERITY_ERROR, 0x1600, 0x0000) +#define CLR_E_ASSM_PATCHING_NOT_SUPPORTED MAKE_HRESULT(SEVERITY_ERROR, 0x1700, 0x0000) +#define CLR_E_SHUTTING_DOWN MAKE_HRESULT(SEVERITY_ERROR, 0x1800, 0x0000) +#define CLR_E_OBJECT_DISPOSED MAKE_HRESULT(SEVERITY_ERROR, 0x1900, 0x0000) +#define CLR_E_WATCHDOG_TIMEOUT MAKE_HRESULT(SEVERITY_ERROR, 0x1A00, 0x0000) -#define CLR_E_NULL_REFERENCE MAKE_HRESULT( SEVERITY_ERROR , 0x2100, 0x0000 ) -#define CLR_E_WRONG_TYPE MAKE_HRESULT( SEVERITY_ERROR , 0x2200, 0x0000 ) -#define CLR_E_TYPE_UNAVAILABLE MAKE_HRESULT( SEVERITY_ERROR , 0x2300, 0x0000 ) -#define CLR_E_INVALID_CAST MAKE_HRESULT( SEVERITY_ERROR , 0x2400, 0x0000 ) -#define CLR_E_OUT_OF_RANGE MAKE_HRESULT( SEVERITY_ERROR , 0x2500, 0x0000 ) +#define CLR_E_NULL_REFERENCE MAKE_HRESULT(SEVERITY_ERROR, 0x2100, 0x0000) +#define CLR_E_WRONG_TYPE MAKE_HRESULT(SEVERITY_ERROR, 0x2200, 0x0000) +#define CLR_E_TYPE_UNAVAILABLE MAKE_HRESULT(SEVERITY_ERROR, 0x2300, 0x0000) +#define CLR_E_INVALID_CAST MAKE_HRESULT(SEVERITY_ERROR, 0x2400, 0x0000) +#define CLR_E_OUT_OF_RANGE MAKE_HRESULT(SEVERITY_ERROR, 0x2500, 0x0000) +#define CLR_E_FORMAT_EXCEPTION MAKE_HRESULT(SEVERITY_ERROR, 0x2600, 0x0000) +#define CLR_E_SERIALIZATION_VIOLATION MAKE_HRESULT(SEVERITY_ERROR, 0x2700, 0x0000) +#define CLR_E_SERIALIZATION_BADSTREAM MAKE_HRESULT(SEVERITY_ERROR, 0x2800, 0x0000) +#define CLR_E_INDEX_OUT_OF_RANGE MAKE_HRESULT(SEVERITY_ERROR, 0x2900, 0x0000) -#define CLR_E_SERIALIZATION_VIOLATION MAKE_HRESULT( SEVERITY_ERROR , 0x2700, 0x0000 ) -#define CLR_E_SERIALIZATION_BADSTREAM MAKE_HRESULT( SEVERITY_ERROR , 0x2800, 0x0000 ) -#define CLR_E_INDEX_OUT_OF_RANGE MAKE_HRESULT( SEVERITY_ERROR , 0x2900, 0x0000 ) +#define CLR_E_DIVIDE_BY_ZERO MAKE_HRESULT(SEVERITY_ERROR, 0x3100, 0x0000) -#define CLR_E_DIVIDE_BY_ZERO MAKE_HRESULT( SEVERITY_ERROR , 0x3100, 0x0000 ) +#define CLR_E_BUSY MAKE_HRESULT(SEVERITY_ERROR, 0x3300, 0x0000) -#define CLR_E_BUSY MAKE_HRESULT( SEVERITY_ERROR , 0x3300, 0x0000 ) +#define CLR_E_PROCESS_EXCEPTION MAKE_HRESULT(SEVERITY_ERROR, 0x4100, 0x0000) -#define CLR_E_PROCESS_EXCEPTION MAKE_HRESULT( SEVERITY_ERROR , 0x4100, 0x0000 ) +#define CLR_E_THREAD_WAITING MAKE_HRESULT(SEVERITY_ERROR, 0x4200, 0x0000) -#define CLR_E_THREAD_WAITING MAKE_HRESULT( SEVERITY_ERROR , 0x4200, 0x0000 ) +#define CLR_E_LOCK_SYNCHRONIZATION_EXCEPTION MAKE_HRESULT(SEVERITY_ERROR, 0x4400, 0x0000) -#define CLR_E_LOCK_SYNCHRONIZATION_EXCEPTION MAKE_HRESULT( SEVERITY_ERROR , 0x4400, 0x0000 ) +#define CLR_E_APPDOMAIN_EXITED MAKE_HRESULT(SEVERITY_ERROR, 0x4800, 0x0000) +#define CLR_E_APPDOMAIN_MARSHAL_EXCEPTION MAKE_HRESULT(SEVERITY_ERROR, 0x4900, 0x0000) +#define CLR_E_NOTIMPL MAKE_HRESULT(SEVERITY_ERROR, 0x4a00, 0x0000) -#define CLR_E_APPDOMAIN_EXITED MAKE_HRESULT( SEVERITY_ERROR , 0x4800, 0x0000 ) -#define CLR_E_APPDOMAIN_MARSHAL_EXCEPTION MAKE_HRESULT( SEVERITY_ERROR , 0x4900, 0x0000 ) -#define CLR_E_NOTIMPL MAKE_HRESULT( SEVERITY_ERROR , 0x4a00, 0x0000 ) - -#define CLR_E_UNKNOWN_TYPE MAKE_HRESULT( SEVERITY_ERROR , 0x4d00, 0x0000 ) -#define CLR_E_ARGUMENT_NULL MAKE_HRESULT( SEVERITY_ERROR , 0x4e00, 0x0000 ) -#define CLR_E_IO MAKE_HRESULT( SEVERITY_ERROR , 0x4f00, 0x0000 ) - -#define CLR_E_ENTRYPOINT_NOT_FOUND MAKE_HRESULT( SEVERITY_ERROR , 0x5000, 0x0000 ) -#define CLR_E_DRIVER_NOT_REGISTERED MAKE_HRESULT( SEVERITY_ERROR , 0x5100, 0x0000 ) +#define CLR_E_UNKNOWN_TYPE MAKE_HRESULT(SEVERITY_ERROR, 0x4d00, 0x0000) +#define CLR_E_ARGUMENT_NULL MAKE_HRESULT(SEVERITY_ERROR, 0x4e00, 0x0000) +#define CLR_E_IO MAKE_HRESULT(SEVERITY_ERROR, 0x4f00, 0x0000) +#define CLR_E_ENTRYPOINT_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, 0x5000, 0x0000) +#define CLR_E_DRIVER_NOT_REGISTERED MAKE_HRESULT(SEVERITY_ERROR, 0x5100, 0x0000) // // Gp IO error codes // -#define CLR_E_PIN_UNAVAILABLE MAKE_HRESULT( SEVERITY_ERROR , 0x5400, 0x0000 ) -#define CLR_E_PIN_DEAD MAKE_HRESULT( SEVERITY_ERROR , 0x5500, 0x0000 ) -#define CLR_E_INVALID_OPERATION MAKE_HRESULT( SEVERITY_ERROR , 0x5600, 0x0000 ) -#define CLR_E_WRONG_INTERRUPT_TYPE MAKE_HRESULT( SEVERITY_ERROR , 0x5700, 0x0000 ) -#define CLR_E_NO_INTERRUPT MAKE_HRESULT( SEVERITY_ERROR , 0x5800, 0x0000 ) -#define CLR_E_DISPATCHER_ACTIVE MAKE_HRESULT( SEVERITY_ERROR , 0x5900, 0x0000 ) +#define CLR_E_PIN_UNAVAILABLE MAKE_HRESULT(SEVERITY_ERROR, 0x5400, 0x0000) +#define CLR_E_PIN_DEAD MAKE_HRESULT(SEVERITY_ERROR, 0x5500, 0x0000) +#define CLR_E_INVALID_OPERATION MAKE_HRESULT(SEVERITY_ERROR, 0x5600, 0x0000) +#define CLR_E_WRONG_INTERRUPT_TYPE MAKE_HRESULT(SEVERITY_ERROR, 0x5700, 0x0000) +#define CLR_E_NO_INTERRUPT MAKE_HRESULT(SEVERITY_ERROR, 0x5800, 0x0000) +#define CLR_E_DISPATCHER_ACTIVE MAKE_HRESULT(SEVERITY_ERROR, 0x5900, 0x0000) // -// IO error codes +// IO error codes // (Keep in-sync with IOExceptionErrorCode enum in IOException.cs) // -#define CLR_E_FILE_IO MAKE_HRESULT( SEVERITY_ERROR , 0x6000, 0x0000 ) -#define CLR_E_INVALID_DRIVER MAKE_HRESULT( SEVERITY_ERROR , 0x6100, 0x0000 ) -#define CLR_E_FILE_NOT_FOUND MAKE_HRESULT( SEVERITY_ERROR , 0x6200, 0x0000 ) -#define CLR_E_DIRECTORY_NOT_FOUND MAKE_HRESULT( SEVERITY_ERROR , 0x6300, 0x0000 ) -#define CLR_E_VOLUME_NOT_FOUND MAKE_HRESULT( SEVERITY_ERROR , 0x6400, 0x0000 ) -#define CLR_E_PATH_TOO_LONG MAKE_HRESULT( SEVERITY_ERROR , 0x6500, 0x0000 ) -#define CLR_E_DIRECTORY_NOT_EMPTY MAKE_HRESULT( SEVERITY_ERROR , 0x6600, 0x0000 ) -#define CLR_E_UNAUTHORIZED_ACCESS MAKE_HRESULT( SEVERITY_ERROR , 0x6700, 0x0000 ) -#define CLR_E_PATH_ALREADY_EXISTS MAKE_HRESULT( SEVERITY_ERROR , 0x6800, 0x0000 ) -#define CLR_E_TOO_MANY_OPEN_HANDLES MAKE_HRESULT( SEVERITY_ERROR , 0x6900, 0x0000 ) +#define CLR_E_FILE_IO MAKE_HRESULT(SEVERITY_ERROR, 0x6000, 0x0000) +#define CLR_E_INVALID_DRIVER MAKE_HRESULT(SEVERITY_ERROR, 0x6100, 0x0000) +#define CLR_E_FILE_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, 0x6200, 0x0000) +#define CLR_E_DIRECTORY_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, 0x6300, 0x0000) +#define CLR_E_VOLUME_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, 0x6400, 0x0000) +#define CLR_E_PATH_TOO_LONG MAKE_HRESULT(SEVERITY_ERROR, 0x6500, 0x0000) +#define CLR_E_DIRECTORY_NOT_EMPTY MAKE_HRESULT(SEVERITY_ERROR, 0x6600, 0x0000) +#define CLR_E_UNAUTHORIZED_ACCESS MAKE_HRESULT(SEVERITY_ERROR, 0x6700, 0x0000) +#define CLR_E_PATH_ALREADY_EXISTS MAKE_HRESULT(SEVERITY_ERROR, 0x6800, 0x0000) +#define CLR_E_TOO_MANY_OPEN_HANDLES MAKE_HRESULT(SEVERITY_ERROR, 0x6900, 0x0000) // // General error codes // -#define CLR_E_NOT_FOUND MAKE_HRESULT( SEVERITY_ERROR , 0x7500, 0x0000 ) -#define CLR_E_BUFFER_TOO_SMALL MAKE_HRESULT( SEVERITY_ERROR , 0x7600, 0x0000 ) -#define CLR_E_NOT_SUPPORTED MAKE_HRESULT( SEVERITY_ERROR , 0x7700, 0x0000 ) -#define CLR_E_HMAC_NOT_SUPPORTED MAKE_HRESULT( SEVERITY_ERROR , 0x7701, 0x0000 ) -#define CLR_E_RESCHEDULE MAKE_HRESULT( SEVERITY_ERROR , 0x7800, 0x0000 ) +#define CLR_E_NOT_FOUND MAKE_HRESULT(SEVERITY_ERROR, 0x7500, 0x0000) +#define CLR_E_BUFFER_TOO_SMALL MAKE_HRESULT(SEVERITY_ERROR, 0x7600, 0x0000) +#define CLR_E_NOT_SUPPORTED MAKE_HRESULT(SEVERITY_ERROR, 0x7700, 0x0000) +#define CLR_E_HMAC_NOT_SUPPORTED MAKE_HRESULT(SEVERITY_ERROR, 0x7701, 0x0000) +#define CLR_E_RESCHEDULE MAKE_HRESULT(SEVERITY_ERROR, 0x7800, 0x0000) -#define CLR_E_OUT_OF_MEMORY MAKE_HRESULT( SEVERITY_ERROR , 0x7A00, 0x0000 ) -#define CLR_E_RESTART_EXECUTION MAKE_HRESULT( SEVERITY_ERROR , 0x7B00, 0x0000 ) +#define CLR_E_OUT_OF_MEMORY MAKE_HRESULT(SEVERITY_ERROR, 0x7A00, 0x0000) +#define CLR_E_RESTART_EXECUTION MAKE_HRESULT(SEVERITY_ERROR, 0x7B00, 0x0000) -#define CLR_E_INVALID_PARAMETER MAKE_HRESULT( SEVERITY_ERROR , 0x7D00, 0x0000 ) -#define CLR_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR , 0x7E00, 0x0000 ) -#define CLR_E_FAIL MAKE_HRESULT( SEVERITY_ERROR , 0x7F00, 0x0000 ) +#define CLR_E_INVALID_PARAMETER MAKE_HRESULT(SEVERITY_ERROR, 0x7D00, 0x0000) +#define CLR_E_TIMEOUT MAKE_HRESULT(SEVERITY_ERROR, 0x7E00, 0x0000) +#define CLR_E_FAIL MAKE_HRESULT(SEVERITY_ERROR, 0x7F00, 0x0000) //--// -#define CLR_S_THREAD_EXITED MAKE_HRESULT( SEVERITY_SUCCESS, 0x0100, 0x0000 ) -#define CLR_S_QUANTUM_EXPIRED MAKE_HRESULT( SEVERITY_SUCCESS, 0x0200, 0x0000 ) -#define CLR_S_NO_READY_THREADS MAKE_HRESULT( SEVERITY_SUCCESS, 0x0300, 0x0000 ) -#define CLR_S_NO_THREADS MAKE_HRESULT( SEVERITY_SUCCESS, 0x0400, 0x0000 ) -#define CLR_S_RESTART_EXECUTION MAKE_HRESULT( SEVERITY_SUCCESS, 0x0500, 0x0000 ) +#define CLR_S_THREAD_EXITED MAKE_HRESULT(SEVERITY_SUCCESS, 0x0100, 0x0000) +#define CLR_S_QUANTUM_EXPIRED MAKE_HRESULT(SEVERITY_SUCCESS, 0x0200, 0x0000) +#define CLR_S_NO_READY_THREADS MAKE_HRESULT(SEVERITY_SUCCESS, 0x0300, 0x0000) +#define CLR_S_NO_THREADS MAKE_HRESULT(SEVERITY_SUCCESS, 0x0400, 0x0000) +#define CLR_S_RESTART_EXECUTION MAKE_HRESULT(SEVERITY_SUCCESS, 0x0500, 0x0000) +// clang-format off #endif // __NF_ERRORS_H__ - diff --git a/src/CLR/Messaging/Messaging-vs2019.vcxproj.filters b/src/CLR/Messaging/Messaging-vs2019.vcxproj.filters deleted file mode 100644 index 2056f14821..0000000000 --- a/src/CLR/Messaging/Messaging-vs2019.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/src/CLR/Messaging/Messaging.cpp b/src/CLR/Messaging/Messaging.cpp index a75c8b6ed3..8e41cb6c24 100644 --- a/src/CLR/Messaging/Messaging.cpp +++ b/src/CLR/Messaging/Messaging.cpp @@ -385,8 +385,9 @@ bool CLR_Messaging::ProcessPayload(WP_Message *msg) return true; } -// wrapper function for CLR_Messaging::ProcessPayload( -extern "C" int Messaging_ProcessPayload(WP_Message *msg) +// wrapper function for CLR_Messaging::ProcessPayload(...) +// has to mirror declaration of the function with the same name for platorms that implement nanoBooter +extern "C" uint8_t Messaging_ProcessPayload(WP_Message *msg) { if (g_CLR_DBG_Debugger == NULL) { diff --git a/src/CLR/Messaging/Messaging.vcxproj b/src/CLR/Messaging/Messaging.vcxproj index a4845e58ae..bc672c8a93 100644 --- a/src/CLR/Messaging/Messaging.vcxproj +++ b/src/CLR/Messaging/Messaging.vcxproj @@ -32,7 +32,7 @@ {131001E3-0201-451F-A87B-951D1C5C3EEE} Win32Proj Messaging - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Messaging/Messaging_stub.vcxproj b/src/CLR/Messaging/Messaging_stub.vcxproj index ae6db64bfa..8dd4fc2a82 100644 --- a/src/CLR/Messaging/Messaging_stub.vcxproj +++ b/src/CLR/Messaging/Messaging_stub.vcxproj @@ -25,7 +25,7 @@ {8ACD05E8-42FB-4A49-9D8B-79239F0EED25} Win32Proj Messaging_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/Startup/Startup.vcxproj b/src/CLR/Startup/Startup.vcxproj index 60771594d5..df9800c43d 100644 --- a/src/CLR/Startup/Startup.vcxproj +++ b/src/CLR/Startup/Startup.vcxproj @@ -36,7 +36,7 @@ {2A840DC3-FFA8-4562-BD13-AB2B0BA02CB6} Win32Proj StartUp - 10.0.18362.0 + 10.0.19041.0 Startup diff --git a/src/CLR/System.Math/System.Math.vcxproj b/src/CLR/System.Math/System.Math.vcxproj index 1d9aeb66b7..64faa63eac 100644 --- a/src/CLR/System.Math/System.Math.vcxproj +++ b/src/CLR/System.Math/System.Math.vcxproj @@ -29,7 +29,7 @@ {D3F92F34-63DB-446F-BD0B-851AD0069805} Win32Proj Diagnostics_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/CLR/System.Math/nf_native_system_math.cpp b/src/CLR/System.Math/nf_native_system_math.cpp index 65fdaefda6..c9efd571fa 100644 --- a/src/CLR/System.Math/nf_native_system_math.cpp +++ b/src/CLR/System.Math/nf_native_system_math.cpp @@ -5,6 +5,7 @@ #include "nf_native_system_math.h" +// clang-format off static const CLR_RT_MethodHandler method_lookup[] = { @@ -14,57 +15,59 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_nf_native_system_math_System_Math::Abs___STATIC__R8__R8, Library_nf_native_system_math_System_Math::Abs___STATIC__R4__R4, Library_nf_native_system_math_System_Math::Acos___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Acos___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Asin___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Asin___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Atan___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Atan___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Atan2___STATIC__R8__R8__R8, - Library_nf_native_system_math_System_Math::Atan2___STATIC__R4__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Ceiling___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Ceiling___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Cos___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Cos___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Cosh___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Cosh___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R8__R8__R8, - Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R4__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Exp___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Exp___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Floor___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Floor___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Log___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Log___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Log10___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Log10___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Max___STATIC__R8__R8__R8, - Library_nf_native_system_math_System_Math::Max___STATIC__R4__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Min___STATIC__R8__R8__R8, - Library_nf_native_system_math_System_Math::Min___STATIC__R4__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Pow___STATIC__R8__R8__R8, - Library_nf_native_system_math_System_Math::Pow___STATIC__R4__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Round___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Round___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R8, - Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R4, + NULL, Library_nf_native_system_math_System_Math::Sin___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Sin___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Sinh___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Sinh___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Sqrt___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Sqrt___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Tan___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Tan___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Tanh___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Tanh___STATIC__R4__R4, + NULL, Library_nf_native_system_math_System_Math::Truncate___STATIC__R8__R8, - Library_nf_native_system_math_System_Math::Truncate___STATIC__R4__R4, + NULL, }; const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_Math = { "System.Math", - 0x39DA4F21, + 0xC9E0AB13, method_lookup, - { 100, 0, 4, 4 } + { 100, 0, 5, 2 } }; + +// clang-format on diff --git a/src/CLR/System.Math/nf_native_system_math.h b/src/CLR/System.Math/nf_native_system_math.h index 62e2bde80e..e63d44133e 100644 --- a/src/CLR/System.Math/nf_native_system_math.h +++ b/src/CLR/System.Math/nf_native_system_math.h @@ -15,56 +15,32 @@ struct Library_nf_native_system_math_System_Math NANOCLR_NATIVE_DECLARE(Abs___STATIC__R8__R8); NANOCLR_NATIVE_DECLARE(Abs___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Acos___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Acos___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Asin___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Asin___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Atan___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Atan___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Atan2___STATIC__R8__R8__R8); - NANOCLR_NATIVE_DECLARE(Atan2___STATIC__R4__R4__R4); NANOCLR_NATIVE_DECLARE(Ceiling___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Ceiling___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Cos___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Cos___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Cosh___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Cosh___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(IEEERemainder___STATIC__R8__R8__R8); - NANOCLR_NATIVE_DECLARE(IEEERemainder___STATIC__R4__R4__R4); NANOCLR_NATIVE_DECLARE(Exp___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Exp___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Floor___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Floor___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Log___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Log___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Log10___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Log10___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Max___STATIC__R8__R8__R8); - NANOCLR_NATIVE_DECLARE(Max___STATIC__R4__R4__R4); NANOCLR_NATIVE_DECLARE(Min___STATIC__R8__R8__R8); - NANOCLR_NATIVE_DECLARE(Min___STATIC__R4__R4__R4); NANOCLR_NATIVE_DECLARE(Pow___STATIC__R8__R8__R8); - NANOCLR_NATIVE_DECLARE(Pow___STATIC__R4__R4__R4); NANOCLR_NATIVE_DECLARE(Round___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Round___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Sign___STATIC__I4__R8); - NANOCLR_NATIVE_DECLARE(Sign___STATIC__I4__R4); NANOCLR_NATIVE_DECLARE(Sin___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Sin___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Sinh___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Sinh___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Sqrt___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Sqrt___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Tan___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Tan___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Tanh___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Tanh___STATIC__R4__R4); NANOCLR_NATIVE_DECLARE(Truncate___STATIC__R8__R8); - NANOCLR_NATIVE_DECLARE(Truncate___STATIC__R4__R4); //--// - }; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_Math; -#endif //_NF_NATIVE_SYSTEM_MATH_H_ +#endif //_NF_NATIVE_SYSTEM_MATH_H_ diff --git a/src/CLR/System.Math/nf_native_system_math_System_Math.cpp b/src/CLR/System.Math/nf_native_system_math_System_Math.cpp index 477466124f..387e50591c 100644 --- a/src/CLR/System.Math/nf_native_system_math_System_Math.cpp +++ b/src/CLR/System.Math/nf_native_system_math_System_Math.cpp @@ -4,1478 +4,1015 @@ // #include "nf_native_system_math.h" - -#if !defined(NANOCLR_EMULATED_FLOATINGPOINT) - #include "nanoPAL_NativeDouble.h" - - HRESULT Library_nf_native_system_math_System_Math::Max___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - float x = stack.Arg0().NumericByRefConst().r4; - float y = stack.Arg1().NumericByRefConst().r4; - float res = x >= y ? x : y; - - stack.SetResult_R4( res ); - NANOCLR_NOCLEANUP_NOLABEL(); - } - - HRESULT Library_nf_native_system_math_System_Math::Max___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (DP_FLOATINGPOINT == TRUE) +#if !defined(NANOCLR_EMULATED_FLOATINGPOINT) +#include "nanoPAL_NativeDouble.h" - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Max___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - double x = stack.Arg0().NumericByRefConst().r8; - double y = stack.Arg1().NumericByRefConst().r8; - double res = x >= y ? x : y; +#if (DP_FLOATINGPOINT == TRUE) - stack.SetResult_R8( res ); + double x = stack.Arg0().NumericByRefConst().r8; + double y = stack.Arg1().NumericByRefConst().r8; + double res = x >= y ? x : y; - NANOCLR_NOCLEANUP_NOLABEL(); + stack.SetResult_R8(res); - #else - return stack.NotImplementedStub(); - #endif - } +#else - HRESULT Library_nf_native_system_math_System_Math::Min___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + float x = (float)stack.Arg0().NumericByRefConst().r8; + float y = (float)stack.Arg1().NumericByRefConst().r8; + float res = x >= y ? x : y; - float x = stack.Arg0().NumericByRefConst().r4; - float y = stack.Arg1().NumericByRefConst().r4; - float res = x <= y ? x : y; + stack.SetResult_R8(res); +#endif - stack.SetResult_R4( res ); + NANOCLR_NOCLEANUP_NOLABEL(); +} - NANOCLR_NOCLEANUP_NOLABEL(); - } +HRESULT Library_nf_native_system_math_System_Math::Min___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Min___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (DP_FLOATINGPOINT == TRUE) +#if (DP_FLOATINGPOINT == TRUE) - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + double x = stack.Arg0().NumericByRefConst().r8; + double y = stack.Arg1().NumericByRefConst().r8; + double res = x <= y ? x : y; - double x = stack.Arg0().NumericByRefConst().r8; - double y = stack.Arg1().NumericByRefConst().r8; - double res = x <= y ? x : y; + stack.SetResult_R8(res); - stack.SetResult_R8( res ); +#else - NANOCLR_NOCLEANUP_NOLABEL(); + float x = (float)stack.Arg0().NumericByRefConst().r8; + float y = (float)stack.Arg1().NumericByRefConst().r8; + float res = x <= y ? x : y; - #else - return stack.NotImplementedStub(); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (DP_FLOATINGPOINT == TRUE) +#endif - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP_NOLABEL(); +} - double d = stack.Arg0().NumericByRefConst().r8; - double res = fabs( d ); +HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - stack.SetResult_R8( res ); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP_NOLABEL(); + double d = stack.Arg0().NumericByRefConst().r8; + double res = fabs(d); - #else - return stack.NotImplementedStub(); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - float d = stack.Arg0().NumericByRefConst().r4; - float res = fabsf( d ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = fabsf(d); - stack.SetResult_R4( res ); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP_NOLABEL(); - } +#endif - HRESULT Library_nf_native_system_math_System_Math::Acos___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + NANOCLR_NOCLEANUP_NOLABEL(); +} - #if (DP_FLOATINGPOINT == TRUE) +HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R4__R4(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + float d = stack.Arg0().NumericByRefConst().r4; + float res = fabsf(d); - double d = stack.Arg0().NumericByRefConst().r8; - double res = acos( d ); + stack.SetResult_R4(res); - stack.SetResult_R8( res ); + NANOCLR_NOCLEANUP_NOLABEL(); +} - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif - - #endif - } +HRESULT Library_nf_native_system_math_System_Math::Acos___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - HRESULT Library_nf_native_system_math_System_Math::Acos___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - float d = stack.Arg0().NumericByRefConst().r4; - float res = acosf( d ); +#if (DP_FLOATINGPOINT == TRUE) - stack.SetResult_R4( res ); + double d = stack.Arg0().NumericByRefConst().r8; + double res = acos(d); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Asin___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - - #if (DP_FLOATINGPOINT == TRUE) +#else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = acosf(d); - double d = stack.Arg0().NumericByRefConst().r8; - double res = asin( d ); + stack.SetResult_R8(res); - stack.SetResult_R8( res ); +#endif - NANOCLR_NOCLEANUP_NOLABEL(); + NANOCLR_NOCLEANUP_NOLABEL(); - #else - return stack.NotImplementedStub(); - #endif +#endif +} - #endif - } +HRESULT Library_nf_native_system_math_System_Math::Asin___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - HRESULT Library_nf_native_system_math_System_Math::Asin___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - float d = stack.Arg0().NumericByRefConst().r4; - float res = asinf( d ); +#if (DP_FLOATINGPOINT == TRUE) - stack.SetResult_R4( res ); + double d = stack.Arg0().NumericByRefConst().r8; + double res = asin(d); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Atan___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else +#else - #if (DP_FLOATINGPOINT == TRUE) + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = asinf(d); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - double d = stack.Arg0().NumericByRefConst().r8; - double res = atan( d ); +#endif - stack.SetResult_R8( res ); + NANOCLR_NOCLEANUP_NOLABEL(); - NANOCLR_NOCLEANUP_NOLABEL(); +#endif +} - #else - return stack.NotImplementedStub(); - #endif +HRESULT Library_nf_native_system_math_System_Math::Atan___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - #endif - } + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Atan___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#if (DP_FLOATINGPOINT == TRUE) - float d = stack.Arg0().NumericByRefConst().r4; - float res = atanf( d ); + double d = stack.Arg0().NumericByRefConst().r8; + double res = atan(d); - stack.SetResult_R4( res ); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } +#else - HRESULT Library_nf_native_system_math_System_Math::Atan2___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = atanf(d); - #if (DP_FLOATINGPOINT == TRUE) + stack.SetResult_R8(res); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - double x = stack.Arg0().NumericByRefConst().r8; - double y = stack.Arg1().NumericByRefConst().r8; - double res = atan2( x, y ); + NANOCLR_NOCLEANUP_NOLABEL(); - stack.SetResult_R8( res ); +#endif +} - NANOCLR_NOCLEANUP_NOLABEL(); +HRESULT Library_nf_native_system_math_System_Math::Atan2___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - #else - return stack.NotImplementedStub(); - #endif + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - #endif - } +#if (DP_FLOATINGPOINT == TRUE) - HRESULT Library_nf_native_system_math_System_Math::Atan2___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + double x = stack.Arg0().NumericByRefConst().r8; + double y = stack.Arg1().NumericByRefConst().r8; + double res = atan2(x, y); - float x = stack.Arg0().NumericByRefConst().r4; - float y = stack.Arg1().NumericByRefConst().r4; - float res = atan2f( x, y ); + stack.SetResult_R8(res); - stack.SetResult_R4( res ); +#else - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + float x = (float)stack.Arg0().NumericByRefConst().r8; + float y = (float)stack.Arg1().NumericByRefConst().r8; + float res = atan2f(x, y); - HRESULT Library_nf_native_system_math_System_Math::Ceiling___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + stack.SetResult_R8(res); - #if (DP_FLOATINGPOINT == TRUE) +#endif - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP_NOLABEL(); - double d = stack.Arg0().NumericByRefConst().r8; - double res = ceil( d ); +#endif +} - stack.SetResult_R8( res ); +HRESULT Library_nf_native_system_math_System_Math::Ceiling___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - NANOCLR_NOCLEANUP_NOLABEL(); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - #else - return stack.NotImplementedStub(); - #endif +#if (DP_FLOATINGPOINT == TRUE) - #endif - } + double d = stack.Arg0().NumericByRefConst().r8; + double res = ceil(d); - HRESULT Library_nf_native_system_math_System_Math::Ceiling___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - float d = stack.Arg0().NumericByRefConst().r4; - float res = ceilf( d ); +#else - stack.SetResult_R4( res ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = ceilf(d); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Cos___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else +#endif - #if (DP_FLOATINGPOINT == TRUE) + NANOCLR_NOCLEANUP_NOLABEL(); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif +} - double d = stack.Arg0().NumericByRefConst().r8; - double res = cos( d ); +HRESULT Library_nf_native_system_math_System_Math::Cos___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - stack.SetResult_R8( res ); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP_NOLABEL(); +#if (DP_FLOATINGPOINT == TRUE) - #else - return stack.NotImplementedStub(); - #endif + double d = stack.Arg0().NumericByRefConst().r8; + double res = cos(d); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Cos___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - float d = stack.Arg0().NumericByRefConst().r4; - float res = cosf( d ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = cosf(d); - stack.SetResult_R4( res ); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } +#endif - HRESULT Library_nf_native_system_math_System_Math::Cosh___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + NANOCLR_NOCLEANUP_NOLABEL(); - #if (DP_FLOATINGPOINT == TRUE) +#endif +} - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Cosh___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - double d = stack.Arg0().NumericByRefConst().r8; - double res = cosh( d ); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - stack.SetResult_R8( res ); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif + double d = stack.Arg0().NumericByRefConst().r8; + double res = cosh(d); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Cosh___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - float d = stack.Arg0().NumericByRefConst().r4; - float res = coshf( d ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = coshf(d); - stack.SetResult_R4( res ); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } +#endif - HRESULT Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + NANOCLR_NOCLEANUP_NOLABEL(); - #if (DP_FLOATINGPOINT == TRUE) +#endif +} - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - double x = stack.Arg0().NumericByRefConst().r8; - double y = stack.Arg1().NumericByRefConst().r8; - double res = remainder(x, y); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - stack.SetResult_R8( res ); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP_NOLABEL(); + double x = stack.Arg0().NumericByRefConst().r8; + double y = stack.Arg1().NumericByRefConst().r8; + double res = remainder(x, y); - #else - return stack.NotImplementedStub(); - #endif + stack.SetResult_R8(res); - #endif - } +#else - HRESULT Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + float x = (float)stack.Arg0().NumericByRefConst().r8; + float y = (float)stack.Arg1().NumericByRefConst().r8; + float res = remainderf(x, y); - float x = stack.Arg0().NumericByRefConst().r4; - float y = stack.Arg1().NumericByRefConst().r4; - float res = remainderf(x, y); + stack.SetResult_R8(res); - stack.SetResult_R4( res ); +#endif - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + NANOCLR_NOCLEANUP_NOLABEL(); +#endif +} - HRESULT Library_nf_native_system_math_System_Math::Exp___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else +HRESULT Library_nf_native_system_math_System_Math::Exp___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - #if (DP_FLOATINGPOINT == TRUE) + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#if (DP_FLOATINGPOINT == TRUE) - double d = stack.Arg0().NumericByRefConst().r8; - double res = exp( d ); + double d = stack.Arg0().NumericByRefConst().r8; + double res = exp(d); - stack.SetResult_R8( res ); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP_NOLABEL();; +#else - #else - return stack.NotImplementedStub(); - #endif + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = expf(d); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Exp___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - float d = stack.Arg0().NumericByRefConst().r4; - float res = expf( d ); + NANOCLR_NOCLEANUP_NOLABEL(); - stack.SetResult_R4( res ); +#endif +} - NANOCLR_NOCLEANUP_NOLABEL();; - #endif - } +HRESULT Library_nf_native_system_math_System_Math::Floor___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - HRESULT Library_nf_native_system_math_System_Math::Floor___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - #if (DP_FLOATINGPOINT == TRUE) +#if (DP_FLOATINGPOINT == TRUE) - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + double d = stack.Arg0().NumericByRefConst().r8; + double res = floor(d); - double d = stack.Arg0().NumericByRefConst().r8; - double res = floor( d ); + stack.SetResult_R8(res); - stack.SetResult_R8( res ); +#else - NANOCLR_NOCLEANUP_NOLABEL(); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = floorf(d); - #else - return stack.NotImplementedStub(); - #endif + stack.SetResult_R8(res); - #endif - } +#endif - HRESULT Library_nf_native_system_math_System_Math::Floor___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP_NOLABEL(); - float d = stack.Arg0().NumericByRefConst().r4; - float res = floorf( d ); +#endif +} - stack.SetResult_R4( res ); +HRESULT Library_nf_native_system_math_System_Math::Log___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Log___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else +#if (DP_FLOATINGPOINT == TRUE) - #if (DP_FLOATINGPOINT == TRUE) + double d = stack.Arg0().NumericByRefConst().r8; + double res = log(d); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - double d = stack.Arg0().NumericByRefConst().r8; - double res = log( d ); +#else - stack.SetResult_R8( res ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = logf(d); - NANOCLR_NOCLEANUP_NOLABEL(); + stack.SetResult_R8(res); - #else - return stack.NotImplementedStub(); - #endif +#endif - #endif - } + NANOCLR_NOCLEANUP_NOLABEL(); - HRESULT Library_nf_native_system_math_System_Math::Log___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif +} - float d = stack.Arg0().NumericByRefConst().r4; - float res = logf( d ); +HRESULT Library_nf_native_system_math_System_Math::Log10___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - stack.SetResult_R4( res ); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } +#if (DP_FLOATINGPOINT == TRUE) - HRESULT Library_nf_native_system_math_System_Math::Log10___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else + double d = stack.Arg0().NumericByRefConst().r8; + double res = log10(d); - #if (DP_FLOATINGPOINT == TRUE) + stack.SetResult_R8(res); - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - double d = stack.Arg0().NumericByRefConst().r8; - double res = log10( d ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = log10f(d); - stack.SetResult_R8( res ); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP_NOLABEL(); +#endif - #else - return stack.NotImplementedStub(); - #endif + NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } +#endif +} - HRESULT Library_nf_native_system_math_System_Math::Log10___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Pow___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - float d = stack.Arg0().NumericByRefConst().r4; - float res = log10f( d ); +#if (DP_FLOATINGPOINT == TRUE) - stack.SetResult_R4( res ); + double x = stack.Arg0().NumericByRefConst().r8; + double y = stack.Arg1().NumericByRefConst().r8; - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } + double res = pow(x, y); - HRESULT Library_nf_native_system_math_System_Math::Pow___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (DP_FLOATINGPOINT == TRUE) - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - double x = stack.Arg0().NumericByRefConst().r8; - double y = stack.Arg1().NumericByRefConst().r8; +#else - double res = pow( x, y ); + float x = (float)stack.Arg0().NumericByRefConst().r8; + float y = (float)stack.Arg1().NumericByRefConst().r8; - stack.SetResult_R8( res ); + float res = powf(x, y); - NANOCLR_NOCLEANUP_NOLABEL(); - #else - return stack.NotImplementedStub(); - #endif - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Pow___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - float x = stack.Arg0().NumericByRefConst().r4; - float y = stack.Arg1().NumericByRefConst().r4; + NANOCLR_NOCLEANUP_NOLABEL(); +} - float res = powf( x, y ); +HRESULT Library_nf_native_system_math_System_Math::Round___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - stack.SetResult_R4( res ); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP_NOLABEL(); - } + double d = stack.Arg0().NumericByRefConst().r8; + double hi = d + 0.5; + double res = floor(hi); - HRESULT Library_nf_native_system_math_System_Math::Round___STATIC__R8__R8( CLR_RT_StackFrame& stack ) + // If the number was in the middle of two integers, we need to round to the even one. + if (res == hi) { - #if (DP_FLOATINGPOINT == TRUE) - - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double hi = d + 0.5; - double res = floor( hi ); - - //If the number was in the middle of two integers, we need to round to the even one. - if(res==hi) + if (fmod(res, 2.0) != 0) { - if(fmod( res, 2.0 ) != 0) - { - //Rounding up made the number odd so we should round down. - res -= 1.0; - } + // Rounding up made the number odd so we should round down. + res -= 1.0; } - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif - } - - HRESULT Library_nf_native_system_math_System_Math::Round___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - float d = stack.Arg0().NumericByRefConst().r4; - float hi = d + 0.5; - float res = floorf( hi ); - - //If the number was in the middle of two integers, we need to round to the even one. - if(res==hi) - { - if(fmodf( res, 2.0 ) != 0) - { - //Rounding up made the number odd so we should round down. - res -= 1.0; - } - } - stack.SetResult_R4( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); } - HRESULT Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R8( CLR_RT_StackFrame& stack ) - { - #if (DP_FLOATINGPOINT == TRUE) - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - int32_t res; - if (d < 0) res = -1; - else if (d > 0) res = +1; - else res = 0; - - stack.SetResult_I4( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - #else - return stack.NotImplementedStub(); - #endif - } - - HRESULT Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - float d = stack.Arg0().NumericByRefConst().r4; - int32_t res; - if (d < 0) res = -1; - else if (d > 0) res = +1; - else res = 0; - - stack.SetResult_I4( res ); +#else - NANOCLR_NOCLEANUP_NOLABEL(); - } + float d = (float)stack.Arg0().NumericByRefConst().r8; + float hi = d + 0.5; + float res = floorf(hi); - HRESULT Library_nf_native_system_math_System_Math::Sin___STATIC__R8__R8( CLR_RT_StackFrame& stack ) + // If the number was in the middle of two integers, we need to round to the even one. + if (res == hi) { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - - #if (DP_FLOATINGPOINT == TRUE) - - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double res = sin( d ); - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif - - #endif + if (fmodf(res, 2.0) != 0) + { + // Rounding up made the number odd so we should round down. + res -= 1.0; + } } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Sin___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - float d = stack.Arg0().NumericByRefConst().r4; - float res = sinf( d ); + NANOCLR_NOCLEANUP_NOLABEL(); +} - stack.SetResult_R4( res ); +HRESULT Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } +#if (DP_FLOATINGPOINT == TRUE) - HRESULT Library_nf_native_system_math_System_Math::Sinh___STATIC__R8__R8( CLR_RT_StackFrame& stack ) + double d = stack.Arg0().NumericByRefConst().r8; + int32_t res; + if (d < 0) { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - - #if (DP_FLOATINGPOINT == TRUE) - - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double res = sinh( d ); - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif - - #endif + res = -1; } - - HRESULT Library_nf_native_system_math_System_Math::Sinh___STATIC__R4__R4( CLR_RT_StackFrame& stack ) + else if (d > 0) { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - float d = stack.Arg0().NumericByRefConst().r4; - float res = sinhf( d ); - - stack.SetResult_R4( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - #endif + res = +1; } - - HRESULT Library_nf_native_system_math_System_Math::Sqrt___STATIC__R8__R8( CLR_RT_StackFrame& stack ) + else { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - - #if (DP_FLOATINGPOINT == TRUE) - - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double res = sqrt( d ); - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif - - #endif + res = 0; } - HRESULT Library_nf_native_system_math_System_Math::Sqrt___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - float d = stack.Arg0().NumericByRefConst().r4; - float res = sqrtf( d ); - - stack.SetResult_R4( res ); + stack.SetResult_I4(res); - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } - - HRESULT Library_nf_native_system_math_System_Math::Tan___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - - #if (DP_FLOATINGPOINT == TRUE) - - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double res = tan( d ); - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif +#else - #endif - } + float d = (float)stack.Arg0().NumericByRefConst().r8; + int32_t res; - HRESULT Library_nf_native_system_math_System_Math::Tan___STATIC__R4__R4( CLR_RT_StackFrame& stack ) + if (d < 0) { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - float d = stack.Arg0().NumericByRefConst().r4; - float res = tanf( d ); - - stack.SetResult_R4( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - #endif + res = -1; } - - HRESULT Library_nf_native_system_math_System_Math::Tanh___STATIC__R8__R8( CLR_RT_StackFrame& stack ) + else if (d > 0) { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - - #if (DP_FLOATINGPOINT == TRUE) - - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double res = tanh( d ); - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif - - #endif + res = +1; } - - HRESULT Library_nf_native_system_math_System_Math::Tanh___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - #if (NANOCLR_LIGHT_MATH == TRUE) - return stack.NotImplementedStub(); - #else - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - float d = stack.Arg0().NumericByRefConst().r4; - float res = tanhf( d ); - - stack.SetResult_R4( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - #endif - } - - HRESULT Library_nf_native_system_math_System_Math::Truncate___STATIC__R8__R8( CLR_RT_StackFrame& stack ) + else { - #if (DP_FLOATINGPOINT == TRUE) - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - double d = stack.Arg0().NumericByRefConst().r8; - double res = 0.0; - modf(d, &res); - - stack.SetResult_R8( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - - #else - return stack.NotImplementedStub(); - #endif + res = 0; } - HRESULT Library_nf_native_system_math_System_Math::Truncate___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_I4(res); - float d = stack.Arg0().NumericByRefConst().r4; - float res = 0.0; - modff(d, &res); +#endif - stack.SetResult_R4( res ); - - NANOCLR_NOCLEANUP_NOLABEL(); - } + NANOCLR_NOCLEANUP_NOLABEL(); +} +HRESULT Library_nf_native_system_math_System_Math::Sin___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); #else - /// No floating point - HRESULT Library_nf_native_system_math_System_Math::Max___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP(); - } + double d = stack.Arg0().NumericByRefConst().r8; + double res = sin(d); - HRESULT Library_nf_native_system_math_System_Math::Max___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - - NANOCLR_NOCLEANUP(); - } - - HRESULT Library_nf_native_system_math_System_Math::Min___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); - - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - - NANOCLR_NOCLEANUP(); - } - - HRESULT Library_nf_native_system_math_System_Math::Min___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = sinf(d); - NANOCLR_NOCLEANUP(); - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP_NOLABEL(); - NANOCLR_NOCLEANUP(); - } +#endif +} - HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Sinh___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } +#if (DP_FLOATINGPOINT == TRUE) - HRESULT Library_nf_native_system_math_System_Math::Acos___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + double d = stack.Arg0().NumericByRefConst().r8; + double res = sinh(d); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP(); - } - - HRESULT Library_nf_native_system_math_System_Math::Acos___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = sinhf(d); - NANOCLR_NOCLEANUP(); - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Asin___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP_NOLABEL(); - NANOCLR_NOCLEANUP(); - } +#endif +} - HRESULT Library_nf_native_system_math_System_Math::Asin___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Sqrt___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } +#if (DP_FLOATINGPOINT == TRUE) - HRESULT Library_nf_native_system_math_System_Math::Atan___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + double d = stack.Arg0().NumericByRefConst().r8; + double res = sqrt(d); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP(); - } +#else - HRESULT Library_nf_native_system_math_System_Math::Atan___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = sqrtf(d); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + stack.SetResult_R8(res); - NANOCLR_NOCLEANUP(); - } +#endif - HRESULT Library_nf_native_system_math_System_Math::Atan2___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP_NOLABEL(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +#endif +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Tan___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - HRESULT Library_nf_native_system_math_System_Math::Atan2___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP(); - } - - HRESULT Library_nf_native_system_math_System_Math::Ceiling___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + double d = stack.Arg0().NumericByRefConst().r8; + double res = tan(d); - CLR_INT64 d = stack.Arg0().NumericByRefConst().r8; + stack.SetResult_R8(res); - CLR_INT64 res = (CLR_INT64)(d + (CLR_INT64)CLR_RT_HeapBlock::HB_DoubleMask) & (~CLR_RT_HeapBlock::HB_DoubleMask); +#else - stack.SetResult_I8( res ); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = tanf(d); - NANOCLR_NOCLEANUP_NOLABEL(); - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Ceiling___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP_NOLABEL(); - NANOCLR_NOCLEANUP(); - } - - HRESULT Library_nf_native_system_math_System_Math::Cos___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Tanh___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ +#if (NANOCLR_LIGHT_MATH == TRUE) + return stack.NotImplementedStub(); +#else - NANOCLR_NOCLEANUP(); - } + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Cos___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + double d = stack.Arg0().NumericByRefConst().r8; + double res = tanh(d); - NANOCLR_NOCLEANUP(); - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Cosh___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = tanhf(d); - NANOCLR_NOCLEANUP(); - } + stack.SetResult_R8(res); - HRESULT Library_nf_native_system_math_System_Math::Cosh___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#endif - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP_NOLABEL(); - NANOCLR_NOCLEANUP(); - } +#endif +} - HRESULT Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Truncate___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +#if (DP_FLOATINGPOINT == TRUE) - NANOCLR_NOCLEANUP(); - } + double d = stack.Arg0().NumericByRefConst().r8; + double res = 0.0; + modf(d, &res); - HRESULT Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +#else - NANOCLR_NOCLEANUP(); - } + float d = (float)stack.Arg0().NumericByRefConst().r8; + float res = 0.0; + modff(d, &res); - HRESULT Library_nf_native_system_math_System_Math::Exp___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + stack.SetResult_R8(res); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +#endif - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP_NOLABEL(); +} - HRESULT Library_nf_native_system_math_System_Math::Exp___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +#else - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +/// No floating point - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Max___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Floor___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - CLR_INT64 d = stack.Arg0().NumericByRefConst().r8; - CLR_INT64 res = (CLR_INT64)( d & (~CLR_RT_HeapBlock::HB_DoubleMask) ); - stack.SetResult_I8( res ); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP_NOLABEL(); - } +HRESULT Library_nf_native_system_math_System_Math::Min___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Floor___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Abs___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Log___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Acos___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Log___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Asin___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Log10___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Atan___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Log10___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Atan2___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Pow___STATIC__R8__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_NOCLEANUP(); +} - NANOCLR_NOCLEANUP(); - } +HRESULT Library_nf_native_system_math_System_Math::Ceiling___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - HRESULT Library_nf_native_system_math_System_Math::Pow___STATIC__R4__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + CLR_INT64 d = stack.Arg0().NumericByRefConst().r8; - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + CLR_INT64 res = (CLR_INT64)(d + (CLR_INT64)CLR_RT_HeapBlock::HB_DoubleMask) & (~CLR_RT_HeapBlock::HB_DoubleMask); - NANOCLR_NOCLEANUP(); - } + stack.SetResult_I8(res); - HRESULT Library_nf_native_system_math_System_Math::Round___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP_NOLABEL(); +} - CLR_INT64 d = stack.Arg0().NumericByRefConst().r8; +HRESULT Library_nf_native_system_math_System_Math::Cos___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - //for negative number we have to be banker's round, if -0.5, round to 0, but 0.5 to 0 - if (d <0) d =d + 1; - CLR_INT64 res = (CLR_INT64)(d + (CLR_INT64)(CLR_RT_HeapBlock::HB_DoubleMask>>1) ) & (~CLR_RT_HeapBlock::HB_DoubleMask); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - stack.SetResult_I8( res ); + NANOCLR_NOCLEANUP(); +} +HRESULT Library_nf_native_system_math_System_Math::Cosh___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP_NOLABEL(); - } + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - HRESULT Library_nf_native_system_math_System_Math::Round___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::IEEERemainder___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - HRESULT Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Exp___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - HRESULT Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Floor___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + CLR_INT64 d = stack.Arg0().NumericByRefConst().r8; + CLR_INT64 res = (CLR_INT64)(d & (~CLR_RT_HeapBlock::HB_DoubleMask)); + stack.SetResult_I8(res); - HRESULT Library_nf_native_system_math_System_Math::Sin___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP_NOLABEL(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Log___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - HRESULT Library_nf_native_system_math_System_Math::Sin___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Log10___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - HRESULT Library_nf_native_system_math_System_Math::Sinh___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Pow___STATIC__R8__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - HRESULT Library_nf_native_system_math_System_Math::Sinh___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + NANOCLR_NOCLEANUP(); +} - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); +HRESULT Library_nf_native_system_math_System_Math::Round___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_NOCLEANUP(); - } + CLR_INT64 d = stack.Arg0().NumericByRefConst().r8; - HRESULT Library_nf_native_system_math_System_Math::Sqrt___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); + // for negative number we have to be banker's round, if -0.5, round to 0, but 0.5 to 0 + if (d < 0) + d = d + 1; + CLR_INT64 res = + (CLR_INT64)(d + (CLR_INT64)(CLR_RT_HeapBlock::HB_DoubleMask >> 1)) & (~CLR_RT_HeapBlock::HB_DoubleMask); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + stack.SetResult_I8(res); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP_NOLABEL(); +} - HRESULT Library_nf_native_system_math_System_Math::Sqrt___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Sign___STATIC__I4__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} - HRESULT Library_nf_native_system_math_System_Math::Tan___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Sin___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} - HRESULT Library_nf_native_system_math_System_Math::Tan___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Sinh___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} - HRESULT Library_nf_native_system_math_System_Math::Tanh___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Sqrt___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} - HRESULT Library_nf_native_system_math_System_Math::Tanh___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Tan___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} - HRESULT Library_nf_native_system_math_System_Math::Truncate___STATIC__R8__R8( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Tanh___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} - HRESULT Library_nf_native_system_math_System_Math::Truncate___STATIC__R4__R4( CLR_RT_StackFrame& stack ) - { - NATIVE_PROFILE_CLR_CORE(); - NANOCLR_HEADER(); +HRESULT Library_nf_native_system_math_System_Math::Truncate___STATIC__R8__R8(CLR_RT_StackFrame &stack) +{ + NATIVE_PROFILE_CLR_CORE(); + NANOCLR_HEADER(); - NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); - NANOCLR_NOCLEANUP(); - } + NANOCLR_NOCLEANUP(); +} -#endif // NANOCLR_EMULATED_FLOATINGPOINT +#endif // NANOCLR_EMULATED_FLOATINGPOINT diff --git a/src/CLR/WireProtocol/WireProtocol-vs2019.vcxproj b/src/CLR/WireProtocol/WireProtocol-vs2019.vcxproj deleted file mode 100644 index 3e66a5b883..0000000000 --- a/src/CLR/WireProtocol/WireProtocol-vs2019.vcxproj +++ /dev/null @@ -1,161 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - {2337C4A4-3AB4-4014-9C29-9EBE32F4510E} - Win32Proj - WireProtocol - 10.0.17763.0 - WireProtocol - - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - StaticLibrary - true - v142 - Unicode - - - StaticLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(SolutionDir)$(Configuration)\ - $(IntDir) - - - $(BinDir) - $(IntDir) - - - $(BinDir) - $(IntDir) - - - - - - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\..\HAL\Include;..\..\PAL\Include - - - Windows - - - - - - - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\..\HAL\Include;..\..\PAL\Include - - - Windows - true - true - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - true - true - - - - - - \ No newline at end of file diff --git a/src/CLR/WireProtocol/WireProtocol.vcxproj b/src/CLR/WireProtocol/WireProtocol.vcxproj index 4a218fdadd..15bba964ba 100644 --- a/src/CLR/WireProtocol/WireProtocol.vcxproj +++ b/src/CLR/WireProtocol/WireProtocol.vcxproj @@ -29,7 +29,7 @@ {2337C4A4-3AB4-4014-9C29-9EBE32F4510E} Win32Proj WireProtocol - 10.0.18362.0 + 10.0.19041.0 @@ -129,7 +129,7 @@ MaxSpeed true true - WIN32;NDEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + WIN32;NDEBUG;_LIB;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) ..\..\..\targets\win32\Include;..\Include;..\..\HAL\Include;..\..\PAL\Include @@ -146,7 +146,7 @@ MaxSpeed true true - NDEBUG;_LIB;VERSION_MAJOR=0;VERSION_MINOR=0;VERSION_BUILD=0;VERSION_REVISION=0;OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + NDEBUG;_LIB;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) Windows diff --git a/src/CLR/WireProtocol/WireProtocol_App_Interface.c b/src/CLR/WireProtocol/WireProtocol_App_Interface.c index 6290a0c443..8b2482466d 100644 --- a/src/CLR/WireProtocol/WireProtocol_App_Interface.c +++ b/src/CLR/WireProtocol/WireProtocol_App_Interface.c @@ -4,23 +4,86 @@ // #include -#include "WireProtocol_App_Interface.h" +#include +#include -extern int Messaging_ProcessPayload(WP_Message *message); +static uint8_t receptionBuffer[sizeof(WP_Packet) + WP_PACKET_SIZE]; -int WP_App_ProcessHeader(WP_Message *message) +// Initialize to a packet sequence number impossible to encounter +uint32_t WireProtocolLastPacketSequence = 0x00FEFFFF; + +uint8_t WP_App_ProcessHeader(WP_Message *message) { // check for reception buffer overflow - if (message->m_header.m_size > sizeof(receptionBuffer)) + if (message->m_header.m_size > WP_PACKET_SIZE) { return false; } message->m_payload = receptionBuffer; + return true; } -int WP_App_ProcessPayload(WP_Message *message) +uint8_t WP_App_ProcessPayload(WP_Message *message) { return Messaging_ProcessPayload(message); } + +#ifdef I_AM_NANOBOOTER + +// This implementation is specific of nanoBooter + +uint8_t Messaging_ProcessPayload(WP_Message *message) +{ + // Prevent processing duplicate packets + if (message->m_header.m_seq == WireProtocolLastPacketSequence) + { + return false; // Do not even respond to a repeat packet + } + + // save this packet sequence number + WireProtocolLastPacketSequence = message->m_header.m_seq; + + if (message->m_header.m_flags & WP_Flags_c_NACK) + { + // + // Bad packet... + // + return true; + } + + uint8_t num; + const CommandHandlerLookup *cmd; + + if (message->m_header.m_flags & WP_Flags_c_Reply) + { + num = GetSizeOfLookup_Reply(); + cmd = c_Lookup_Reply; + } + else + { + num = GetSizeOfLookup_Request(); + cmd = c_Lookup_Request; + } + + while (num--) + { + if (cmd->command == message->m_header.m_cmd) + { + // execute command handler and save the result + int commandHandlerExecuteResult = ((int (*)(WP_Message *))cmd->handler)(message); + + WP_ReplyToCommand(message, commandHandlerExecuteResult, false, NULL, 0); + return true; + } + + cmd++; + } + + WP_ReplyToCommand(message, false, false, NULL, 0); + + return true; +} + +#endif // I_AM_NANOBOOTER diff --git a/src/CLR/WireProtocol/WireProtocol_HAL_Interface.c b/src/CLR/WireProtocol/WireProtocol_HAL_Interface.c index 355c2ae6f4..ab0ade041a 100644 --- a/src/CLR/WireProtocol/WireProtocol_HAL_Interface.c +++ b/src/CLR/WireProtocol/WireProtocol_HAL_Interface.c @@ -16,7 +16,7 @@ ///////////////////////////////////////////////////////////////////////////////////////////////// // provided as weak to be replaced by actual implementation by HAL interface -__nfweak int WP_ReceiveBytes(uint8_t *ptr, unsigned short *size) +__nfweak uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size) { (void)(ptr); (void)(size); @@ -26,7 +26,7 @@ __nfweak int WP_ReceiveBytes(uint8_t *ptr, unsigned short *size) } // provided as weak to be replaced by actual implementation by HAL interface -__nfweak int WP_TransmitMessage(WP_Message *message) +__nfweak uint8_t WP_TransmitMessage(WP_Message *message) { (void)(message); diff --git a/src/CLR/WireProtocol/WireProtocol_Message.c b/src/CLR/WireProtocol/WireProtocol_Message.c index ff13d6c25e..eca6844dd4 100644 --- a/src/CLR/WireProtocol/WireProtocol_Message.c +++ b/src/CLR/WireProtocol/WireProtocol_Message.c @@ -4,21 +4,36 @@ // See LICENSE file in the project root for full license information. // +#include #include #include #include #include "WireProtocol_Message.h" -uint8_t receptionBuffer[sizeof(WP_Packet) + WP_PACKET_SIZE]; -static uint16_t lastOutboundMessage = 65535; -static uint8_t *marker; +// from nanoHAL_Time.h +#define TIME_CONVERSION__TO_SYSTICKS 10000 + +static uint16_t _lastOutboundMessage = 65535; +static uint64_t _receiveExpiryTicks; +static uint8_t *_marker; +static uint8_t *_pos; +static uint32_t _size; +static uint8_t _rxState; +static WP_Message _inboundMessage; +static uint8_t *buf = (uint8_t *)&(_inboundMessage.m_header); + +#ifdef DEBUG +volatile uint8_t _rxStatePrev; +#endif // timeout to receive WP payload before bailing out // 5 secs (100 nsecs units) -static const uint64_t c_PayloadTimeout = 50000000; +static const uint64_t c_PayloadTimeout = 5 * TIME_CONVERSION__TO_SYSTICKS; +// timeout to receive WP header before bailing out +// 2 secs (100 nsecs units) +static const uint64_t c_HeaderTimeout = 2 * TIME_CONVERSION__TO_SYSTICKS; extern void debug_printf(const char *format, ...); -extern uint64_t HAL_Time_SysTicksToTime_C(uint64_t sysTicks); ////////////////////////////////////////// // helper functions @@ -32,21 +47,33 @@ void WP_ReplyToCommand(WP_Message *message, int fSuccess, int fCritical, void *p // Make sure we reply only once! // if (message->m_header.m_flags & WP_Flags_c_NonCritical) + { return; + } + message->m_header.m_flags |= WP_Flags_c_NonCritical; // // No caching in the request, no caching in the reply... // if (message->m_header.m_flags & WP_Flags_c_NoCaching) + { flags |= WP_Flags_c_NoCaching; + } if (fSuccess) + { flags |= WP_Flags_c_ACK; + } else + { flags |= WP_Flags_c_NACK; + } + if (!fCritical) + { flags |= WP_Flags_c_NonCritical; + } if (fSuccess == false) { @@ -65,15 +92,16 @@ void WP_Message_Initialize(WP_Message *message) { memset(&message->m_header, 0, sizeof(message->m_header)); message->m_payload = NULL; - message->m_pos = NULL; - message->m_size = 0; - message->m_payloadTicks = 0; - message->m_rxState = ReceiveState_Idle; } -void WP_Message_PrepareReception(WP_Message *message) +void WP_Message_PrepareReception() { - message->m_rxState = ReceiveState_Initialize; + _rxState = ReceiveState_Initialize; + _pos = (uint8_t *)&_inboundMessage.m_header; + _size = sizeof(_inboundMessage.m_header); + + // platform initializations + WP_Message_PrepareReception_Platform(); } void WP_Message_PrepareRequest( @@ -85,7 +113,7 @@ void WP_Message_PrepareRequest( { memcpy( &message->m_header.m_signature, - marker ? marker : (uint8_t *)MARKER_PACKET_V1, + _marker ? _marker : (uint8_t *)MARKER_PACKET_V1, sizeof(message->m_header.m_signature)); #if defined(WP_IMPLEMENTS_CRC32) @@ -94,7 +122,7 @@ void WP_Message_PrepareRequest( message->m_header.m_crcData = 0; #endif message->m_header.m_cmd = cmd; - message->m_header.m_seq = lastOutboundMessage++; + message->m_header.m_seq = _lastOutboundMessage++; message->m_header.m_seqReply = 0; message->m_header.m_flags = flags; message->m_header.m_size = payloadSize; @@ -118,7 +146,7 @@ void WP_Message_PrepareReply( { memcpy( &message->m_header.m_signature, - marker ? marker : (uint8_t *)MARKER_PACKET_V1, + _marker ? _marker : (uint8_t *)MARKER_PACKET_V1, sizeof(message->m_header.m_signature)); #if defined(WP_IMPLEMENTS_CRC32) @@ -127,7 +155,7 @@ void WP_Message_PrepareReply( message->m_header.m_crcData = 0; #endif message->m_header.m_cmd = req->m_cmd; - message->m_header.m_seq = lastOutboundMessage++; + message->m_header.m_seq = _lastOutboundMessage++; message->m_header.m_seqReply = req->m_seq; message->m_header.m_flags = flags | WP_Flags_c_Reply; message->m_header.m_size = payloadSize; @@ -142,20 +170,7 @@ void WP_Message_PrepareReply( #endif } -void WP_Message_SetPayload(WP_Message *message, uint8_t *payload) -{ - message->m_payload = payload; -} - -void WP_Message_Release(WP_Message *message) -{ - if (message->m_payload) - { - message->m_payload = NULL; - } -} - -int WP_Message_VerifyHeader(WP_Message *message) +uint8_t WP_Message_VerifyHeader(WP_Message *message) { #if defined(WP_IMPLEMENTS_CRC32) @@ -184,7 +199,7 @@ int WP_Message_VerifyHeader(WP_Message *message) return true; } -int WP_Message_VerifyPayload(WP_Message *message) +uint8_t WP_Message_VerifyPayload(WP_Message *message) { if (message->m_payload == NULL && message->m_header.m_size) { @@ -209,195 +224,212 @@ int WP_Message_VerifyPayload(WP_Message *message) return true; } -void WP_Message_ReplyBadPacket(uint32_t flags) -{ - WP_Message message; - WP_Message_Initialize(&message); - WP_Message_PrepareRequest(&message, 0, WP_Flags_c_NonCritical | WP_Flags_c_NACK | flags, 0, NULL); - - WP_TransmitMessage(&message); -} - -int WP_Message_Process(WP_Message *message) +void WP_Message_Process() { - uint8_t *buf = (uint8_t *)&message->m_header; - uint16_t len; + uint32_t len; + uint64_t now; while (true) { - switch (message->m_rxState) + ASSERT(_rxState >= ReceiveState_Idle && _rxState <= ReceiveState_CompletePayload); + +#ifdef DEBUG + // store this here to debug issues with wrong sequence of state machine + _rxStatePrev = _rxState; +#endif + switch (_rxState) { case ReceiveState_Idle: TRACE0(TRACE_STATE, "RxState==IDLE\n"); - return true; + break; case ReceiveState_Initialize: TRACE0(TRACE_STATE, "RxState==INIT\n"); - WP_Message_Release(message); + WP_Message_Initialize(&_inboundMessage); + + _rxState = ReceiveState_WaitingForHeader; + _pos = (uint8_t *)&_inboundMessage.m_header; + _size = sizeof(_inboundMessage.m_header); - message->m_rxState = ReceiveState_WaitingForHeader; - message->m_pos = (uint8_t *)&message->m_header; - message->m_size = sizeof(message->m_header); break; case ReceiveState_WaitingForHeader: TRACE0(TRACE_STATE, "RxState==WaitForHeader\n"); - if (WP_ReceiveBytes(message->m_pos, &message->m_size) == false) + + if (!WP_ReceiveBytes(_pos, &_size)) { // didn't receive the expected amount of bytes, returning false TRACE0(TRACE_NODATA, "ReceiveBytes returned false - bailing out\n"); - return false; + + return; } - // Synch to the start of a message. + // Synch to the start of a message by looking for a valid MARKER while (true) { - len = sizeof(message->m_header) - message->m_size; - if (len <= 0) + len = sizeof(_inboundMessage.m_header) - _size; + + if (len == 0) { break; } - size_t lenCmp = min(len, sizeof(message->m_header.m_signature)); + size_t lenCmp = min(len, sizeof(_inboundMessage.m_header.m_signature)); - if (memcmp(&message->m_header, MARKER_DEBUGGER_V1, lenCmp) == 0) + if (memcmp(&_inboundMessage.m_header, MARKER_DEBUGGER_V1, lenCmp) == 0) { break; } - if (memcmp(&message->m_header, MARKER_PACKET_V1, lenCmp) == 0) + if (memcmp(&_inboundMessage.m_header, MARKER_PACKET_V1, lenCmp) == 0) { break; } memmove(&buf[0], &buf[1], len - 1); - message->m_pos--; - message->m_size++; + _pos--; + _size++; } - if (len >= sizeof(message->m_header.m_signature)) + if (_size == 0) { - message->m_rxState = ReceiveState_ReadingHeader; + // header reception completed + _rxState = ReceiveState_CompleteHeader; } + else if (len >= sizeof(_inboundMessage.m_header.m_signature)) + { + // still missing some bytes for the header + _rxState = ReceiveState_ReadingHeader; + _receiveExpiryTicks = HAL_Time_CurrentSysTicks() + c_HeaderTimeout; + } + break; case ReceiveState_ReadingHeader: TRACE0(TRACE_STATE, "RxState==ReadingHeader\n"); - if (WP_ReceiveBytes(message->m_pos, &message->m_size) == false) + + // If the time between consecutive header bytes exceeds the timeout threshold then assume that + // the rest of the header is not coming. Reinitialize to sync with the next header. + + now = HAL_Time_CurrentSysTicks(); + + if (_receiveExpiryTicks > now) { - // didn't receive the expected amount of bytes, returning false - TRACE0(TRACE_NODATA, "ReceiveBytes returned false - bailing out\n"); - return false; - } + if (!WP_ReceiveBytes(_pos, &_size)) + { + // didn't receive the expected amount of bytes, returning false + TRACE0(TRACE_NODATA, "ReceiveBytes returned false - bailing out\n"); + return; + } - if (message->m_size == 0) + if (_size == 0) + { + _rxState = ReceiveState_CompleteHeader; + } + } + else { - message->m_rxState = ReceiveState_CompleteHeader; + TRACE0(TRACE_ERRORS, "RxError: Header InterCharacterTimeout exceeded\n"); + _rxState = ReceiveState_Initialize; + + return; } + break; case ReceiveState_CompleteHeader: - { + TRACE0(TRACE_STATE, "RxState=CompleteHeader\n"); - bool fBadPacket = true; - if (WP_Message_VerifyHeader(message)) + if (WP_Message_VerifyHeader(&_inboundMessage)) { TRACE( TRACE_HEADERS, "RXMSG: 0x%08X, 0x%08X, 0x%08X\n", - message->m_header.m_cmd, - message->m_header.m_flags, - message->m_header.m_size); + _inboundMessage.m_header.m_cmd, + _inboundMessage.m_header.m_flags, + _inboundMessage.m_header._size); - if (WP_App_ProcessHeader(message)) + if (WP_App_ProcessHeader(&_inboundMessage)) { - fBadPacket = false; - - if (message->m_header.m_size) + if (_inboundMessage.m_header.m_size != 0) { - if (message->m_payload == NULL) // Bad, no buffer... + if (_inboundMessage.m_payload == NULL) { - message->m_rxState = ReceiveState_Initialize; - } - else - { - message->m_payloadTicks = HAL_Time_CurrentSysTicks(); - message->m_rxState = ReceiveState_ReadingPayload; - message->m_pos = message->m_payload; - message->m_size = message->m_header.m_size; + // Bad, no buffer... + _rxState = ReceiveState_Initialize; + break; } + + _receiveExpiryTicks = HAL_Time_CurrentSysTicks() + c_PayloadTimeout; + _pos = _inboundMessage.m_payload; + _size = _inboundMessage.m_header.m_size; + + _rxState = ReceiveState_ReadingPayload; + + break; } else { - message->m_rxState = ReceiveState_CompletePayload; + _rxState = ReceiveState_CompletePayload; + + break; } } } - if (fBadPacket) - { - if ((message->m_header.m_flags & WP_Flags_c_NonCritical) == 0) - { - WP_Message_ReplyBadPacket(WP_Flags_c_BadHeader); - } - - message->m_rxState = ReceiveState_Initialize; - } - } - break; + // one the verifications above failed, return + _rxState = ReceiveState_Initialize; + return; case ReceiveState_ReadingPayload: - { - TRACE(TRACE_STATE, "RxState=ReadingPayload. Expecting %d bytes.\n", message->m_size); - uint64_t curTicks = HAL_Time_CurrentSysTicks(); + TRACE(TRACE_STATE, "RxState=ReadingPayload. Expecting %d bytes.\n", message->_size); // If the time between consecutive payload bytes exceeds the timeout threshold then assume that - // the rest of the payload is not coming. Reinitialize to synch on the next header. + // the rest of the payload is not coming. Reinitialize to sync with the next header. - if (HAL_Time_SysTicksToTime_C(curTicks - message->m_payloadTicks) < c_PayloadTimeout) - { - message->m_payloadTicks = curTicks; + now = HAL_Time_CurrentSysTicks(); - if (WP_ReceiveBytes(message->m_pos, &message->m_size) == false) + if (_receiveExpiryTicks > now) + { + if (!WP_ReceiveBytes(_pos, &_size)) { // didn't receive the expected amount of bytes, returning false TRACE0(TRACE_NODATA, "ReceiveBytes returned false - bailing out\n"); - return false; + return; } - if (message->m_size == 0) + if (_size == 0) { - message->m_rxState = ReceiveState_CompletePayload; + _rxState = ReceiveState_CompletePayload; } } else { TRACE0(TRACE_ERRORS, "RxError: Payload InterCharacterTimeout exceeded\n"); - message->m_rxState = ReceiveState_Initialize; + _rxState = ReceiveState_Initialize; + + return; } - } - break; + + break; case ReceiveState_CompletePayload: TRACE0(TRACE_STATE, "RxState=CompletePayload\n"); - if (WP_Message_VerifyPayload(message) == true) - { - WP_App_ProcessPayload(message); - } - else + if (WP_Message_VerifyPayload(&_inboundMessage)) { - WP_Message_ReplyBadPacket(WP_Flags_c_BadPayload); + WP_App_ProcessPayload(&_inboundMessage); } - message->m_rxState = ReceiveState_Initialize; + _rxState = ReceiveState_Initialize; + break; default: // unknown state TRACE0(TRACE_ERRORS, "RxState=UNKNOWN!!\n"); - return false; + return; } } } @@ -409,14 +441,16 @@ void WP_SendProtocolMessage(WP_Message *message) "TXMSG: 0x%08X, 0x%08X, 0x%08X\n", message->m_header.m_cmd, message->m_header.m_flags, - message->m_header.m_size); + message->m_header._size); WP_TransmitMessage(message); } void WP_PrepareAndSendProtocolMessage(uint32_t cmd, uint32_t payloadSize, uint8_t *payload, uint32_t flags) { WP_Message message; + WP_Message_Initialize(&message); + WP_Message_PrepareRequest(&message, cmd, flags, payloadSize, payload); TRACE( @@ -424,7 +458,8 @@ void WP_PrepareAndSendProtocolMessage(uint32_t cmd, uint32_t payloadSize, uint8_ "TXMSG: 0x%08X, 0x%08X, 0x%08X\n", message.m_header.m_cmd, message.m_header.m_flags, - message.m_header.m_size); + message.m_header._size); + WP_TransmitMessage(&message); } diff --git a/src/DeviceInterfaces/Networking.Sntp/Networking.Sntp.vcxproj b/src/DeviceInterfaces/Networking.Sntp/Networking.Sntp.vcxproj index 61813e848e..a251e2d038 100644 --- a/src/DeviceInterfaces/Networking.Sntp/Networking.Sntp.vcxproj +++ b/src/DeviceInterfaces/Networking.Sntp/Networking.Sntp.vcxproj @@ -29,7 +29,7 @@ {84c62efc-dba2-4d47-bb81-322e8902c6d6} Win32Proj Windows.Storage - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/DeviceInterfaces/System.Net/System.Net.vcxproj b/src/DeviceInterfaces/System.Net/System.Net.vcxproj index c8d1bc4a64..2609000cc3 100644 --- a/src/DeviceInterfaces/System.Net/System.Net.vcxproj +++ b/src/DeviceInterfaces/System.Net/System.Net.vcxproj @@ -38,7 +38,7 @@ {87b3b6fb-ae1f-4777-abbf-3e42e0deb336} Win32Proj Windows.Storage - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/DeviceInterfaces/System.Net/sys_net_native.cpp b/src/DeviceInterfaces/System.Net/sys_net_native.cpp index ffa801b149..23b2283a57 100644 --- a/src/DeviceInterfaces/System.Net/sys_net_native.cpp +++ b/src/DeviceInterfaces/System.Net/sys_net_native.cpp @@ -298,13 +298,15 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, Library_sys_net_native_System_Security_Cryptography_X509Certificates_X509Certificate2::DecodePrivateKeyNative___STATIC__VOID__SZARRAY_U1__STRING, }; const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_Net = { "System.Net", - 0x76BCAD4E, + 0xC74796C2, method_lookup, { 100, 1, 3, 4 } }; diff --git a/src/HAL/Include/nanoHAL_v2.h b/src/HAL/Include/nanoHAL_v2.h index 49699c5e27..10c380cc20 100644 --- a/src/HAL/Include/nanoHAL_v2.h +++ b/src/HAL/Include/nanoHAL_v2.h @@ -16,6 +16,10 @@ #include "nanoHAL_Boot.h" #include +#if defined(_WIN32) +#include +#endif + typedef uint32_t GPIO_PIN; typedef enum SYSTEM_STATE @@ -65,7 +69,7 @@ typedef enum SLEEP_LEVEL //#define SYSTEM_EVENT_FLAG_UNUSED_0x00200000 0x00200000 //#define SYSTEM_EVENT_FLAG_UNUSED_0x00400000 0x00400000 //#define SYSTEM_EVENT_FLAG_UNUSED_0x00800000 0x00800000 -//#define SYSTEM_EVENT_FLAG_UNUSED_0x01000000 0x01000000 +#define SYSTEM_EVENT_FLAG_WIFI_STATION 0x01000000 #define SYSTEM_EVENT_FLAG_SPI_MASTER 0x02000000 #define SYSTEM_EVENT_FLAG_I2C_MASTER 0x04000000 #define SYSTEM_EVENT_HW_INTERRUPT 0x08000000 @@ -179,7 +183,7 @@ extern "C" void nanoHAL_Initialize_C(); void nanoHAL_Uninitialize_C(); - void HeapLocation_C(unsigned char** baseAddress, unsigned int* sizeInBytes); + void HeapLocation_C(unsigned char **baseAddress, unsigned int *sizeInBytes); // Call to the external memory configuration and initialization function // If a target has external memory it has to provide the implementation for it. @@ -212,9 +216,9 @@ extern "C" { #endif - void* platform_malloc(size_t size); - void platform_free(void* ptr); - void* platform_realloc(void* ptr, size_t size); + void *platform_malloc(size_t size); + void platform_free(void *ptr); + void *platform_realloc(void *ptr, size_t size); #ifdef __cplusplus } @@ -266,7 +270,7 @@ extern "C" { #endif - void HAL_Assert(const char* Func, int Line, const char* File); + void HAL_Assert(const char *Func, int Line, const char *File); // HAL_AssertEx is to be defined at platform layer void HAL_AssertEx(); @@ -290,7 +294,7 @@ extern "C" #else #if defined(_DEBUG) #if !defined _ASSERTE -//#error +#define ASSERT(i) _ASSERTE(i) #endif #define ASSERT(i) _ASSERTE(i) #define _SIDE_ASSERTE(i) _ASSERTE(i) @@ -336,13 +340,13 @@ extern "C" #if !defined(BUILD_RTM) - void debug_printf(const char* format, ...); + void debug_printf(const char *format, ...); #else - __inline void debug_printf(const char* format, ...) - { - } +__inline void debug_printf(const char *format, ...) +{ +} #endif // !defined(BUILD_RTM) diff --git a/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h b/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h index 98c90a40ab..fd160c45ff 100644 --- a/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h +++ b/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h @@ -100,6 +100,7 @@ extern "C" #define MBEDTLS_X509_CHECK_KEY_USAGE #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE #define MBEDTLS_X509_RSASSA_PSS_SUPPORT +#define MBEDTLS_CMAC_C /* mbed TLS modules */ #define MBEDTLS_AESNI_C diff --git a/src/PAL/Include/nanoPAL_Sockets.h b/src/PAL/Include/nanoPAL_Sockets.h index 3a1162e376..69521209f6 100644 --- a/src/PAL/Include/nanoPAL_Sockets.h +++ b/src/PAL/Include/nanoPAL_Sockets.h @@ -520,7 +520,8 @@ bool Network_Interface_Bind(int index); int Network_Interface_Open(int index); bool Network_Interface_Close(int index); int Network_Interface_Disconnect(int index); -int Network_Interface_Connect(int index, const char *ssid, const char *passphase, int options); +int Network_Interface_Start_Connect(int index, const char *ssid, const char *passphase, int options); +int Network_Interface_Connect_Result(int configIndex); bool Network_Interface_Start_Scan(int index); // Wireless AP methods diff --git a/src/PAL/Lwip/lwIP_Sockets.cpp b/src/PAL/Lwip/lwIP_Sockets.cpp index fad4583539..b46369beab 100644 --- a/src/PAL/Lwip/lwIP_Sockets.cpp +++ b/src/PAL/Lwip/lwIP_Sockets.cpp @@ -932,14 +932,9 @@ HRESULT LWIP_SOCKETS_Driver::LoadAdapterConfiguration( #if LWIP_IPV6 #if LWIP_VERSION_MAJOR == 2 -#if defined(PLATFORM_ESP32) - // ESP32 return ip_addr_t instead of ip_addr_t * on statndard lwip - config->IPv4DNSAddress1 = dns_getserver(0).u_addr.ip4.addr; - config->IPv4DNSAddress2 = dns_getserver(1).u_addr.ip4.addr; -#else config->IPv4DNSAddress1 = dns_getserver(0)->u_addr.ip4.addr; config->IPv4DNSAddress2 = dns_getserver(1)->u_addr.ip4.addr; -#endif + // FIXME IPV6 // config->IPv6DNSAddress1 = dns_getserver(0)->u_addr.ip6.addr; // config->IPv6DNSAddress2 = dns_getserver(1)->u_addr.ip6.addr; diff --git a/src/CLR/WireProtocol/WireProtocol-vs2019.vcxproj.filters b/src/System.Device.Gpio/System.Device.Gpio.filters similarity index 73% rename from src/CLR/WireProtocol/WireProtocol-vs2019.vcxproj.filters rename to src/System.Device.Gpio/System.Device.Gpio.filters index a163610fd9..220960d3b3 100644 --- a/src/CLR/WireProtocol/WireProtocol-vs2019.vcxproj.filters +++ b/src/System.Device.Gpio/System.Device.Gpio.filters @@ -15,20 +15,19 @@ - + Source Files - + Source Files - - Source Files - - - Source Files - - + Source Files + + + Header Files + + \ No newline at end of file diff --git a/src/CLR/Messaging/Messaging-vs2019.vcxproj b/src/System.Device.Gpio/System.Device.Gpio.vcxproj similarity index 81% rename from src/CLR/Messaging/Messaging-vs2019.vcxproj rename to src/System.Device.Gpio/System.Device.Gpio.vcxproj index 4443eacd31..837cae39a4 100644 --- a/src/CLR/Messaging/Messaging-vs2019.vcxproj +++ b/src/System.Device.Gpio/System.Device.Gpio.vcxproj @@ -19,21 +19,18 @@ - + + + - - {2337c4a4-3ab4-4014-9c29-9ebe32f4510e} - false - false - + - {131001E3-0201-451F-A87B-951D1C5C3EEE} + {830a7e28-7b2b-4be6-8888-a39775a0092a} Win32Proj - Messaging - 10.0.17763.0 - Messaging + Windows.Storage + 10.0.19041.0 @@ -69,27 +66,27 @@ - + - + - + - + - $(SolutionDir)$(Configuration)\ + $(BinDir) $(IntDir) - $(SolutionDir)$(Configuration)\ + $(BinDir) $(IntDir) @@ -106,8 +103,8 @@ Level3 Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include + WIN32;_DEBUG;_LIB;NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) + ..\..\targets\win32\Include;..\Include;..\CLR\Include;..\CorLib;..\HAL\Include;..\PAL\Include Windows @@ -119,7 +116,8 @@ Level3 Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) + _DEBUG;_LIB;NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) + ..\Include;..\CorLib Windows @@ -134,7 +132,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include + ..\..\targets\win32\Include;..\Include;..\CLR\Include;..\CorLib;..\HAL\Include;..\PAL\Include Windows @@ -151,6 +149,7 @@ true true NDEBUG;_LIB;%(PreprocessorDefinitions) + ..\Include;..\CorLib Windows diff --git a/src/System.Device.Gpio/sys_dev_gpio_native.h b/src/System.Device.Gpio/sys_dev_gpio_native.h index b30a83a595..4319f814e9 100644 --- a/src/System.Device.Gpio/sys_dev_gpio_native.h +++ b/src/System.Device.Gpio/sys_dev_gpio_native.h @@ -10,7 +10,6 @@ #include #include #include -#include #include typedef enum __nfpack PinEventTypes diff --git a/src/System.Device.Gpio/sys_dev_gpio_native_System_Device_Gpio_GpioController_stubs.cpp b/src/System.Device.Gpio/sys_dev_gpio_native_System_Device_Gpio_GpioController_stubs.cpp new file mode 100644 index 0000000000..67e2adcc14 --- /dev/null +++ b/src/System.Device.Gpio/sys_dev_gpio_native_System_Device_Gpio_GpioController_stubs.cpp @@ -0,0 +1,73 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#include "sys_dev_gpio_native.h" + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController::get_PinCount___I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController::DisposeNative___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController:: + IsPinModeSupported___BOOLEAN__I4__SystemDeviceGpioPinMode(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController::IsPinOpen___BOOLEAN__I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController::SetPinMode___VOID__I4__SystemDeviceGpioPinMode( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController::NativeRead___U1__I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioController::NativeWrite___VOID__I4__U1( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} diff --git a/src/System.Device.Gpio/sys_dev_gpio_native_System_Device_Gpio_GpioPin_stubs.cpp b/src/System.Device.Gpio/sys_dev_gpio_native_System_Device_Gpio_GpioPin_stubs.cpp new file mode 100644 index 0000000000..f8f16c34ab --- /dev/null +++ b/src/System.Device.Gpio/sys_dev_gpio_native_System_Device_Gpio_GpioPin_stubs.cpp @@ -0,0 +1,94 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#include "sys_dev_gpio_native.h" + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::Read___SystemDeviceGpioPinValue( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::Toggle___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::DisposeNative___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin:: + NativeIsPinModeSupported___BOOLEAN__SystemDeviceGpioPinMode(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::NativeSetPinMode___VOID__SystemDeviceGpioPinMode( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::NativeInit___BOOLEAN__I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::NativeSetDebounceTimeout___VOID( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::WriteNative___VOID__SystemDeviceGpioPinValue( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_dev_gpio_native_System_Device_Gpio_GpioPin::NativeSetAlternateFunction___VOID__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} diff --git a/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_Directory.cpp b/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_Directory.cpp index 30bd8742c9..7269586541 100644 --- a/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_Directory.cpp +++ b/src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_Directory.cpp @@ -9,6 +9,13 @@ extern void CombinePathAndName(char *outpath, const char *path1, const char *path2); extern SYSTEMTIME GetDateTime(uint16_t date, uint16_t time); +#if defined(PLATFORM_ESP32) +// ESP32 uses the DIR struct for VFS and FatFs uses FF_DIR +#define NANO_DIR FF_DIR +#else +#define NANO_DIR DIR +#endif + HRESULT Library_nf_sys_io_filesystem_System_IO_Directory::ExistsNative___STATIC__BOOLEAN__STRING( CLR_RT_StackFrame &stack) { @@ -123,7 +130,7 @@ HRESULT Library_nf_sys_io_filesystem_System_IO_Directory::GetFilesNative___STATI CLR_RT_HeapBlock &filePaths = stack.PushValue(); uint16_t fileCount = 0; - DIR currentDirectory; + NANO_DIR currentDirectory; FRESULT operationResult; static FILINFO fileInfo; @@ -253,7 +260,7 @@ HRESULT Library_nf_sys_io_filesystem_System_IO_Directory::GetDirectoriesNative__ CLR_RT_HeapBlock &folderPaths = stack.PushValue(); uint16_t directoryCount = 0; - DIR currentDirectory; + NANO_DIR currentDirectory; FRESULT operationResult; static FILINFO fileInfo; diff --git a/src/CLR/Diagnostics/Diagnostics-vs2019.vcxproj.filters b/src/System.IO.Ports/System.IO.Ports.filters similarity index 83% rename from src/CLR/Diagnostics/Diagnostics-vs2019.vcxproj.filters rename to src/System.IO.Ports/System.IO.Ports.filters index b221969501..1071ed1ec7 100644 --- a/src/CLR/Diagnostics/Diagnostics-vs2019.vcxproj.filters +++ b/src/System.IO.Ports/System.IO.Ports.filters @@ -15,19 +15,16 @@ - - Header Files - - - - - Source Files - - + Source Files - + Source Files + + + Header Files + + \ No newline at end of file diff --git a/src/CLR/Diagnostics/Diagnostics-vs2019.vcxproj b/src/System.IO.Ports/System.IO.Ports.vcxproj similarity index 82% rename from src/CLR/Diagnostics/Diagnostics-vs2019.vcxproj rename to src/System.IO.Ports/System.IO.Ports.vcxproj index ad6ab397a7..ce1bfb21da 100644 --- a/src/CLR/Diagnostics/Diagnostics-vs2019.vcxproj +++ b/src/System.IO.Ports/System.IO.Ports.vcxproj @@ -19,19 +19,17 @@ - + + - - - + - {A5E9AE41-F4FA-40CE-AD82-A7861EBA007B} + {46556AFC-C248-4082-ABE6-9B07F4E57579} Win32Proj - Diagnostics - 10.0.17763.0 - Diagnostics + Windows.Storage + 10.0.19041.0 @@ -67,27 +65,27 @@ - + - + - + - + - $(SolutionDir)$(Configuration)\ + $(BinDir) $(IntDir) - $(SolutionDir)$(Configuration)\ + $(BinDir) $(IntDir) @@ -104,8 +102,8 @@ Level3 Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include + WIN32;_DEBUG;_LIB;NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) + ..\..\targets\win32\Include;..\Include;..\CLR\Include;..\CorLib;..\HAL\Include;..\PAL\Include Windows @@ -117,7 +115,8 @@ Level3 Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) + _DEBUG;_LIB;NANOCLR_SYSTEM_COLLECTIONS=TRUE;%(PreprocessorDefinitions) + ..\Include;..\CorLib Windows @@ -132,7 +131,7 @@ true true WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - ..\..\..\targets\win32\Include;..\Include;..\CorLib;..\..\HAL\Include;..\..\PAL\Include + ..\..\targets\win32\Include;..\Include;..\CLR\Include;..\CorLib;..\HAL\Include;..\PAL\Include Windows @@ -149,6 +148,7 @@ true true NDEBUG;_LIB;%(PreprocessorDefinitions) + ..\Include;..\CorLib Windows diff --git a/src/System.IO.Ports/sys_io_ser_native.cpp b/src/System.IO.Ports/sys_io_ser_native.cpp new file mode 100644 index 0000000000..3a7ef34804 --- /dev/null +++ b/src/System.IO.Ports/sys_io_ser_native.cpp @@ -0,0 +1,106 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#include "sys_io_ser_native.h" + +// clang-format off + +static const CLR_RT_MethodHandler method_lookup[] = +{ + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::get_BytesToRead___I4, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeDispose___VOID, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeInit___VOID, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeConfig___VOID, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeWrite___VOID__SZARRAY_U1__I4__I4, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeStore___U4, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeRead___U4__SZARRAY_U1__I4__I4, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeSetWatchChar___VOID, + NULL, + NULL, + Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector___STATIC__STRING, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +}; + +const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_IO_Ports = +{ + "System.IO.Ports", + 0x61B8380C, + method_lookup, + { 100, 1, 1, 3 } +}; + +// clang-format on diff --git a/src/System.IO.Ports/sys_io_ser_native.h b/src/System.IO.Ports/sys_io_ser_native.h new file mode 100644 index 0000000000..930dbaf1ba --- /dev/null +++ b/src/System.IO.Ports/sys_io_ser_native.h @@ -0,0 +1,126 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#ifndef _SYS_IO_SER_NATIVE_H_ +#define _SYS_IO_SER_NATIVE_H_ + +#include +#include +#include +// #include +#include + +typedef enum __nfpack Handshake +{ + Handshake_None = 0, + Handshake_XOnXOff = 1, + Handshake_RequestToSend = 2, + Handshake_RequestToSendXOnXOff = 3, +} Handshake; + +typedef enum __nfpack Parity +{ + Parity_None = 0, + Parity_Odd = 1, + Parity_Even = 2, +} Parity; + +typedef enum __nfpack SerialData +{ + SerialData_Chars = 1, + SerialData_WatchChar = 2, +} SerialData; + +typedef enum __nfpack SerialMode +{ + SerialMode_Normal = 0, + SerialMode_RS485 = 1, +} SerialMode; + +typedef enum __nfpack StopBits +{ + StopBits_One = 1, + StopBits_Two = 2, + StopBits_OnePointFive = 3, +} StopBits; + +struct Library_sys_io_ser_native_System_IO_Ports_SerialDataEvent +{ + static const int FIELD__SerialDeviceIndex = 3; + static const int FIELD__Event = 4; + + //--// +}; + +struct Library_sys_io_ser_native_System_IO_Ports_SerialDataReceivedEventArgs +{ + static const int FIELD___data = 1; + + //--// +}; + +struct Library_sys_io_ser_native_System_IO_Ports_SerialDeviceController +{ + static const int FIELD_STATIC___syncLock = 0; + static const int FIELD_STATIC__s_deviceCollection = 1; + + //--// +}; + +struct Library_sys_io_ser_native_System_IO_Ports_SerialPort +{ + static const int FIELD_STATIC__s_eventListener = 2; + + static const int FIELD___disposed = 1; + static const int FIELD___syncLock = 2; + static const int FIELD___opened = 3; + static const int FIELD___writeTimeout = 4; + static const int FIELD___readTimeout = 5; + static const int FIELD___receivedBytesThreshold = 6; + static const int FIELD___baudRate = 7; + static const int FIELD___handshake = 8; + static const int FIELD___stopBits = 9; + static const int FIELD___dataBits = 10; + static const int FIELD___parity = 11; + static const int FIELD___mode = 12; + static const int FIELD___deviceId = 13; + static const int FIELD___portIndex = 14; + static const int FIELD___watchChar = 15; + static const int FIELD___callbacksDataReceivedEvent = 16; + static const int FIELD___stream = 17; + static const int FIELD___newLine = 18; + static const int FIELD___encoding = 19; + + NANOCLR_NATIVE_DECLARE(get_BytesToRead___I4); + NANOCLR_NATIVE_DECLARE(NativeDispose___VOID); + NANOCLR_NATIVE_DECLARE(NativeInit___VOID); + NANOCLR_NATIVE_DECLARE(NativeConfig___VOID); + NANOCLR_NATIVE_DECLARE(NativeWrite___VOID__SZARRAY_U1__I4__I4); + NANOCLR_NATIVE_DECLARE(NativeStore___U4); + NANOCLR_NATIVE_DECLARE(NativeRead___U4__SZARRAY_U1__I4__I4); + NANOCLR_NATIVE_DECLARE(NativeSetWatchChar___VOID); + NANOCLR_NATIVE_DECLARE(GetDeviceSelector___STATIC__STRING); + + //--// +}; + +struct Library_sys_io_ser_native_System_IO_Ports_SerialDeviceEventListener +{ + static const int FIELD___serialDevicesMap = 1; + + //--// +}; + +struct Library_sys_io_ser_native_System_IO_Ports_SerialStream +{ + static const int FIELD___serial = 1; + + //--// +}; + +extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_IO_Ports; + +#endif //_SYS_IO_SER_NATIVE_H_ diff --git a/src/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort_stubs.cpp b/src/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort_stubs.cpp new file mode 100644 index 0000000000..34fd81c7e9 --- /dev/null +++ b/src/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort_stubs.cpp @@ -0,0 +1,91 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#include "sys_io_ser_native.h" + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::get_BytesToRead___I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeDispose___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeInit___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeConfig___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeWrite___VOID__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeStore___U4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeRead___U4__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeSetWatchChar___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector___STATIC__STRING( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NANOCLR_SET_AND_LEAVE(stack.NotImplementedStub()); + + NANOCLR_NOCLEANUP(); +} diff --git a/src/Windows.Devices.SerialCommunication/win_dev_serial_native.cpp b/src/Windows.Devices.SerialCommunication/win_dev_serial_native.cpp index a0f62cfda5..9d5f7d9ab9 100644 --- a/src/Windows.Devices.SerialCommunication/win_dev_serial_native.cpp +++ b/src/Windows.Devices.SerialCommunication/win_dev_serial_native.cpp @@ -78,12 +78,13 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, }; const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_Windows_Devices_SerialCommunication = { "Windows.Devices.SerialCommunication", - 0x84A8FB94, + 0x34BAF06E, method_lookup, { 100, 1, 1, 2 } }; diff --git a/src/Windows.Storage/Windows.Storage.vcxproj b/src/Windows.Storage/Windows.Storage.vcxproj index 634a754760..7650196ad0 100644 --- a/src/Windows.Storage/Windows.Storage.vcxproj +++ b/src/Windows.Storage/Windows.Storage.vcxproj @@ -32,7 +32,7 @@ {3cae286f-0ef8-45e4-8111-afa0aa9282b4} Win32Proj Windows.Storage - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/nanoFramework.Graphics/Graphics/Native/nanoFramework_Graphics.cpp b/src/nanoFramework.Graphics/Graphics/Native/nanoFramework_Graphics.cpp index a8d1791f43..3fffc59c54 100644 --- a/src/nanoFramework.Graphics/Graphics/Native/nanoFramework_Graphics.cpp +++ b/src/nanoFramework.Graphics/Graphics/Native/nanoFramework_Graphics.cpp @@ -748,7 +748,6 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_nanoFramework_Graphics_nanoFramework_UI_DisplayControl::get_Orientation___STATIC__nanoFrameworkUIDisplayOrientation, NULL, Library_nanoFramework_Graphics_nanoFramework_UI_DisplayControl::NativeChangeOrientation___STATIC__BOOLEAN__nanoFrameworkUIDisplayOrientation, - NULL, Library_nanoFramework_Graphics_nanoFramework_UI_Ink::SetInkRegion___STATIC__VOID__U4__I4__I4__I4__I4__I4__I4__I4__nanoFrameworkUIBitmap, Library_nanoFramework_Graphics_nanoFramework_UI_Ink::ResetInkRegion___STATIC__VOID, NULL, @@ -891,8 +890,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - NULL, - NULL, Library_nanoFramework_Graphics_nanoFramework_UI_TouchCollectorConfiguration::GetTouchPoints___STATIC__VOID__BYREF_I4__SZARRAY_I2__SZARRAY_I2, Library_nanoFramework_Graphics_nanoFramework_UI_TouchCollectorConfiguration::GetTouchInput___STATIC__VOID__nanoFrameworkUITouchCollectorConfigurationTouchInput__BYREF_I4__BYREF_I4__BYREF_I4, Library_nanoFramework_Graphics_nanoFramework_UI_TouchCollectorConfiguration::SetTouchInput___STATIC__VOID__nanoFrameworkUITouchCollectorConfigurationTouchInput__I4__I4__I4, @@ -939,7 +936,7 @@ static const CLR_RT_MethodHandler method_lookup[] = const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Graphics = { "nanoFramework.Graphics", - 0xFC87C8D9, + 0xA77924CB, method_lookup, { 100, 0, 0, 2 } }; diff --git a/src/nanoFramework.ResourceManager/nanoFramework.ResourceManager.vcxproj b/src/nanoFramework.ResourceManager/nanoFramework.ResourceManager.vcxproj index 90026799e9..4f4d828d18 100644 --- a/src/nanoFramework.ResourceManager/nanoFramework.ResourceManager.vcxproj +++ b/src/nanoFramework.ResourceManager/nanoFramework.ResourceManager.vcxproj @@ -30,7 +30,7 @@ {4F6DD35B-A0C8-47EE-880A-1224FADE9276} Win32Proj Diagnostics_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/nanoFramework.Runtime.Native/Runtime.Native.vcxproj b/src/nanoFramework.Runtime.Native/Runtime.Native.vcxproj index 4ee8cc70cb..5b28371bef 100644 --- a/src/nanoFramework.Runtime.Native/Runtime.Native.vcxproj +++ b/src/nanoFramework.Runtime.Native/Runtime.Native.vcxproj @@ -33,7 +33,7 @@ {B829E436-91EA-46B3-949B-3273211C8F56} Win32Proj Diagnostics_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/nanoFramework.System.Collections/System.Collections.vcxproj b/src/nanoFramework.System.Collections/System.Collections.vcxproj index 2e165978bf..36c4495dfb 100644 --- a/src/nanoFramework.System.Collections/System.Collections.vcxproj +++ b/src/nanoFramework.System.Collections/System.Collections.vcxproj @@ -30,7 +30,7 @@ {091562A5-5C72-4115-A053-DAF183A3B45B} Win32Proj Diagnostics_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/src/nanoFramework.System.Text/System.Text.vcxproj b/src/nanoFramework.System.Text/System.Text.vcxproj index 7872251d6a..8e8d791e18 100644 --- a/src/nanoFramework.System.Text/System.Text.vcxproj +++ b/src/nanoFramework.System.Text/System.Text.vcxproj @@ -30,7 +30,7 @@ {70922447-EBF0-4473-B014-776F8C9426E7} Win32Proj Diagnostics_stub - 10.0.18362.0 + 10.0.19041.0 diff --git a/targets/ChibiOS/CMakeLists.txt b/targets/ChibiOS/CMakeLists.txt index 25b2f4499e..aac427cb5f 100644 --- a/targets/ChibiOS/CMakeLists.txt +++ b/targets/ChibiOS/CMakeLists.txt @@ -9,6 +9,9 @@ include(binutils.ChibiOS) include(STM32_CubePackage) include(NF_Utils) +# Set target series +NF_SET_STM32_TARGET_SERIES() + # Define PLATFORM base path set(BASE_PATH_FOR_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) @@ -27,6 +30,21 @@ if(DEFINED TOOL_HEX2DFU_PREFIX) endif() endif() +######################################################## +# check availability of SRecord tool, if specified +if(DEFINED TOOL_SRECORD_PREFIX) + if(NOT ((EXISTS ${TOOL_SRECORD_PREFIX}/srec_cat.exe) OR (EXISTS ${TOOL_SRECORD_PREFIX}/srec_cat))) + message(STATUS "") + message(STATUS "Couldn't find the srec_cat tool at the specified path: ${TOOL_SRECORD_PREFIX}/srec_cat.exe") + message(STATUS "Make sure that the CMake option TOOL_SRECORD_PREFIX has the correct path.") + message(STATUS "If you don't have this tool download it from https://sourceforge.net/projects/srecord/files/srecord-win32/") + message(STATUS "") + message(FATAL_ERROR "srec_cat tool not found") + else() + set(SRECORD_TOOL_AVAILABLE TRUE CACHE INTERNAL "srec_cat tool available") + endif() +endif() + # check if RTOS_SOURCE_FOLDER was specified or if it's empty (default is empty) set(NO_RTOS_SOURCE_FOLDER TRUE) if(RTOS_SOURCE_FOLDER) @@ -56,17 +74,18 @@ endif() # check if build was requested with a specifc ChibiOS version if(RTOS_VERSION_EMPTY) # no ChibiOS version actualy specified, must be empty which is fine, we'll default to a known good version - set(RTOS_VERSION "stable_20.3.x") + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS + set(RTOS_VERSION "stable_21.6.x") endif() if(NO_RTOS_SOURCE_FOLDER) # no CHIBIOS source specified, download it from it's repo - message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} from nanoFramework GitHub repo") + message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} from SVN official repo") FetchContent_Declare( chibios - GIT_REPOSITORY https://github.com/nanoframework/chibios - GIT_TAG ${RTOS_VERSION} + SVN_REPOSITORY https://svn.osdn.net/svnroot/chibios/branches/${RTOS_VERSION} + SVN_REVISION -rHEAD ) else() @@ -74,14 +93,26 @@ else() # sanity check is source path exists if(EXISTS ${RTOS_SOURCE_FOLDER}/) - message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER})") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows) - FetchContent_Declare( - chibios - GIT_REPOSITORY ${RTOS_SOURCE_FOLDER} - GIT_TAG ${RTOS_VERSION} - ) + message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER})") + FetchContent_Declare( + chibios + SOURCE_DIR ${RTOS_SOURCE_FOLDER} + ) + + else() + # running on *nix requires setting up a local git repo from SVN + # with git svn clone https://svn.osdn.net/svnroot/chibios/branches/${RTOS_VERSION} -rHEAD + message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER})") + FetchContent_Declare( + chibios + GIT_REPOSITORY ${RTOS_SOURCE_FOLDER} + GIT_TAG master + ) + + endif() else() message(FATAL_ERROR "Couldn't find ChibiOS source at ${RTOS_SOURCE_FOLDER}/") endif() @@ -112,8 +143,7 @@ if(CHIBIOS_CONTRIB_REQUIRED) FetchContent_Declare( chibios-contrib - GIT_REPOSITORY ${CHIBIOS_CONTRIB_SOURCE} - GIT_TAG nanoframework + SOURCE_DIR ${CHIBIOS_CONTRIB_SOURCE} ) else() @@ -152,6 +182,7 @@ if(NF_FEATURE_HAS_SDCARD OR NF_FEATURE_HAS_USB_MSD) # check if build was requested with a specifc FatFS version if(FATFS_VERSION_EMPTY) # no FatFS version actualy specified, must be empty which is fine, we'll default to a known good version + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS set(FATFS_VERSION_TAG "R0.14") else() # set version @@ -176,8 +207,7 @@ if(NF_FEATURE_HAS_SDCARD OR NF_FEATURE_HAS_USB_MSD) FetchContent_Declare( fatfs - GIT_REPOSITORY ${FATFS_SOURCE} - GIT_TAG ${FATFS_VERSION_TAG} + SOURCE_DIR ${FATFS_SOURCE} ) else() @@ -209,6 +239,7 @@ if(NF_SECURITY_MBEDTLS) endif() # set tag for currently supported version + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS set(MBEDTLS_GIT_TAG "mbedtls-2.26.0") # set options for mbed TLS @@ -231,12 +262,11 @@ if(NF_SECURITY_MBEDTLS) # sanity check is source path exists if(EXISTS ${MBEDTLS_SOURCE}/) - message(STATUS "mbedTLS ${FATFS_VERSION_TAG} (source from: ${MBEDTLS_SOURCE})") + message(STATUS "mbedTLS ${MBEDTLS_GIT_TAG} (source from: ${MBEDTLS_SOURCE})") FetchContent_Declare( mbedtls - GIT_REPOSITORY ${MBEDTLS_SOURCE} - GIT_TAG ${MBEDTLS_GIT_TAG} + SOURCE_DIR ${MBEDTLS_SOURCE} ) else() diff --git a/targets/ChibiOS/NETDUINO3_WIFI/cmake-variants.json b/targets/ChibiOS/NETDUINO3_WIFI/cmake-variants.json index 127188eb77..4f0de05428 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/cmake-variants.json +++ b/targets/ChibiOS/NETDUINO3_WIFI/cmake-variants.json @@ -50,10 +50,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_nanoFramework.Devices.OneWire": "ON", "API_nanoFramework.ResourceManager": "ON", diff --git a/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/chconf.h b/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/chconf.h index 176709dd8f..7d04091405 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/chconf.h +++ b/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -127,7 +147,7 @@ * @note The default is @p TRUE. */ #if !defined(CH_CFG_OPTIMIZE_SPEED) -#define CH_CFG_OPTIMIZE_SPEED FALSE +#define CH_CFG_OPTIMIZE_SPEED TRUE #endif /** @} */ @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -620,7 +651,7 @@ * @brief System structure extension. * @details User fields added to the end of the @p ch_system_t structure. */ -#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ */ #define CH_CFG_SYSTEM_INIT_HOOK() \ { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ + } + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) \ + { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -644,6 +691,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) \ { \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) \ { \ @@ -662,6 +713,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ { \ @@ -745,6 +799,15 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) \ + { \ + /* Faults handling code here.*/ \ + } + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/halconf.h b/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/halconf.h index 63b4ffd496..2aa384cd33 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/halconf.h +++ b/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/halconf.h @@ -405,6 +405,26 @@ #define SERIAL_BUFFERS_SIZE 16 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/mcuconf.h b/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/mcuconf.h index c5548028dc..fb2da4df8b 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/mcuconf.h +++ b/targets/ChibiOS/NETDUINO3_WIFI/nanoBooter/mcuconf.h @@ -22,312 +22,337 @@ */ #define STM32F4xx_MCUCONF +#define STM32F427_MCUCONF /* * HAL driver system settings. */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_CLOCK48_REQUIRED TRUE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 336 -#define STM32_PLLP_VALUE 2 -#define STM32_PLLQ_VALUE 7 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_RTCSEL STM32_RTCSEL_LSI -#define STM32_RTCPRE_VALUE 8 -#define STM32_MCO1SEL STM32_MCO1SEL_HSI -#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 -#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK -#define STM32_MCO2PRE STM32_MCO2PRE_DIV1 -#define STM32_I2SSRC STM32_I2SSRC_PLLI2S -#define STM32_PLLI2SN_VALUE 192 -#define STM32_PLLI2SR_VALUE 2 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 2 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV1 +#define STM32_I2SSRC STM32_I2SSRC_PLLI2S +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 2 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. */ -#define STM32_IRQ_EXTI0_PRIORITY 6 -#define STM32_IRQ_EXTI1_PRIORITY 6 -#define STM32_IRQ_EXTI2_PRIORITY 6 -#define STM32_IRQ_EXTI3_PRIORITY 6 -#define STM32_IRQ_EXTI4_PRIORITY 6 -#define STM32_IRQ_EXTI5_9_PRIORITY 6 -#define STM32_IRQ_EXTI10_15_PRIORITY 6 -#define STM32_IRQ_EXTI16_PRIORITY 6 -#define STM32_IRQ_EXTI17_PRIORITY 15 -#define STM32_IRQ_EXTI18_PRIORITY 6 -#define STM32_IRQ_EXTI19_PRIORITY 6 -#define STM32_IRQ_EXTI20_PRIORITY 6 -#define STM32_IRQ_EXTI21_PRIORITY 15 -#define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 +#define STM32_IRQ_TIM6_PRIORITY 7 +#define STM32_IRQ_TIM7_PRIORITY 7 +#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7 +#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7 +#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7 +#define STM32_IRQ_TIM8_CC_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART3_PRIORITY 12 +#define STM32_IRQ_UART4_PRIORITY 12 +#define STM32_IRQ_UART5_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 +#define STM32_IRQ_UART7_PRIORITY 12 +#define STM32_IRQ_UART8_PRIORITY 12 /* * ADC driver system settings. */ -#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_USE_ADC2 FALSE -#define STM32_ADC_USE_ADC3 FALSE -#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) -#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_ADC2_DMA_PRIORITY 2 -#define STM32_ADC_ADC3_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 6 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 -#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 6 -#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 6 /* * CAN driver system settings. */ -#define STM32_CAN_USE_CAN1 FALSE -#define STM32_CAN_USE_CAN2 FALSE -#define STM32_CAN_CAN1_IRQ_PRIORITY 11 -#define STM32_CAN_CAN2_IRQ_PRIORITY 11 +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_USE_CAN2 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 +#define STM32_CAN_CAN2_IRQ_PRIORITY 11 /* * DAC driver system settings. */ -#define STM32_DAC_DUAL_MODE FALSE -#define STM32_DAC_USE_DAC1_CH1 FALSE -#define STM32_DAC_USE_DAC1_CH2 FALSE -#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 -#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 -#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 -#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 -#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 FALSE +#define STM32_DAC_USE_DAC1_CH2 FALSE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) /* * GPT driver system settings. */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM6 FALSE -#define STM32_GPT_USE_TIM7 FALSE -#define STM32_GPT_USE_TIM8 FALSE -#define STM32_GPT_USE_TIM9 FALSE -#define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_USE_TIM12 FALSE -#define STM32_GPT_USE_TIM14 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM6_IRQ_PRIORITY 7 -#define STM32_GPT_TIM7_IRQ_PRIORITY 7 -#define STM32_GPT_TIM8_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 -#define STM32_GPT_TIM12_IRQ_PRIORITY 7 -#define STM32_GPT_TIM14_IRQ_PRIORITY 7 +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM6 FALSE +#define STM32_GPT_USE_TIM7 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_USE_TIM12 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 +#define STM32_GPT_TIM12_IRQ_PRIORITY 7 +#define STM32_GPT_TIM14_IRQ_PRIORITY 7 /* * I2C driver system settings. */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_USE_I2C3 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C3_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_I2C3_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") /* * I2S driver system settings. */ -#define STM32_I2S_USE_SPI2 FALSE -#define STM32_I2S_USE_SPI3 FALSE -#define STM32_I2S_SPI2_IRQ_PRIORITY 10 -#define STM32_I2S_SPI3_IRQ_PRIORITY 10 -#define STM32_I2S_SPI2_DMA_PRIORITY 1 -#define STM32_I2S_SPI3_DMA_PRIORITY 1 -#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") /* * ICU driver system settings. */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM8 FALSE -#define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM8_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 /* * MAC driver system settings. */ -#define STM32_MAC_TRANSMIT_BUFFERS 2 -#define STM32_MAC_RECEIVE_BUFFERS 4 -#define STM32_MAC_BUFFERS_SIZE 1522 -#define STM32_MAC_PHY_TIMEOUT 100 -#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE -#define STM32_MAC_ETH1_IRQ_PRIORITY 13 -#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0 +#define STM32_MAC_TRANSMIT_BUFFERS 2 +#define STM32_MAC_RECEIVE_BUFFERS 4 +#define STM32_MAC_BUFFERS_SIZE 1522 +#define STM32_MAC_PHY_TIMEOUT 100 +#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE +#define STM32_MAC_ETH1_IRQ_PRIORITY 13 +#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0 /* * PWM driver system settings. */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM8 FALSE -#define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM8_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM9 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 /* * SDC driver system settings. */ -#define STM32_SDC_SDIO_DMA_PRIORITY 3 -#define STM32_SDC_SDIO_IRQ_PRIORITY 9 -#define STM32_SDC_WRITE_TIMEOUT_MS 250 -#define STM32_SDC_READ_TIMEOUT_MS 25 -#define STM32_SDC_CLOCK_ACTIVATION_DELAY 10 -#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE -#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SDC_SDIO_DMA_PRIORITY 3 +#define STM32_SDC_SDIO_IRQ_PRIORITY 9 +#define STM32_SDC_WRITE_TIMEOUT_MS 250 +#define STM32_SDC_READ_TIMEOUT_MS 25 +#define STM32_SDC_CLOCK_ACTIVATION_DELAY 10 +#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE +#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) /* * SERIAL driver system settings. */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 TRUE -#define STM32_SERIAL_USE_USART3 FALSE -#define STM32_SERIAL_USE_UART4 FALSE -#define STM32_SERIAL_USE_UART5 FALSE -#define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART3_PRIORITY 12 -#define STM32_SERIAL_UART4_PRIORITY 12 -#define STM32_SERIAL_UART5_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 /* * SPI driver system settings. */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) -#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) -#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") /* * ST driver system settings. */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 /* * UART driver system settings. */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART3 FALSE -#define STM32_UART_USE_UART4 FALSE -#define STM32_UART_USE_UART5 FALSE -#define STM32_UART_USE_USART6 FALSE -#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) -#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) -#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) -#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) -#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) -#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) -#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) -#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) -#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) -#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) -#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART3_IRQ_PRIORITY 12 -#define STM32_UART_UART4_IRQ_PRIORITY 12 -#define STM32_UART_UART5_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART3_DMA_PRIORITY 0 -#define STM32_UART_UART4_DMA_PRIORITY 0 -#define STM32_UART_UART5_DMA_PRIORITY 0 -#define STM32_UART_USART6_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USE_UART4 FALSE +#define STM32_UART_USE_UART5 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_UART4_IRQ_PRIORITY 12 +#define STM32_UART_UART5_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_UART4_DMA_PRIORITY 0 +#define STM32_UART_UART5_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") /* * USB driver system settings. */ -#define STM32_USB_USE_OTG1 TRUE -#define STM32_USB_USE_OTG2 FALSE -#define STM32_USB_OTG1_IRQ_PRIORITY 14 -#define STM32_USB_OTG2_IRQ_PRIORITY 14 -#define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG2_RX_FIFO_SIZE 1024 -#define STM32_USB_OTG_THREAD_PRIO LOWPRIO -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_USE_OTG2 FALSE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG2_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG2_RX_FIFO_SIZE 1024 +#define STM32_USB_OTG_THREAD_PRIO LOWPRIO +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 +#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 /* * WDG driver system settings. */ -#define STM32_WDG_USE_IWDG FALSE +#define STM32_WDG_USE_IWDG FALSE // header for nanoFramework overlay drivers #include "mcuconf_nf.h" diff --git a/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/chconf.h b/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/chconf.h index f9cb68581c..0f0f0988cf 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/chconf.h +++ b/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -620,7 +651,7 @@ * @brief System structure extension. * @details User fields added to the end of the @p ch_system_t structure. */ -#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ */ #define CH_CFG_SYSTEM_INIT_HOOK() \ { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ + } + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) \ + { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -644,6 +691,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) \ { \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) \ { \ @@ -662,6 +713,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ { \ @@ -745,6 +799,15 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) \ + { \ + /* Faults handling code here.*/ \ + } + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/halconf.h b/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/halconf.h index 31de933726..b52ca80fc6 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/halconf.h +++ b/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/halconf.h @@ -416,6 +416,26 @@ #define SERIAL_BUFFERS_SIZE 16 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/mcuconf.h b/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/mcuconf.h index 76d1d005a8..cde08c526a 100644 --- a/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/mcuconf.h +++ b/targets/ChibiOS/NETDUINO3_WIFI/nanoCLR/mcuconf.h @@ -22,6 +22,7 @@ */ #define STM32F4xx_MCUCONF +#define STM32F427_MCUCONF /* * HAL driver system settings. @@ -75,6 +76,30 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 +#define STM32_IRQ_TIM6_PRIORITY 7 +#define STM32_IRQ_TIM7_PRIORITY 7 +#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7 +#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7 +#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7 +#define STM32_IRQ_TIM8_CC_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART3_PRIORITY 12 +#define STM32_IRQ_UART4_PRIORITY 12 +#define STM32_IRQ_UART5_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 +#define STM32_IRQ_UART7_PRIORITY 12 +#define STM32_IRQ_UART8_PRIORITY 12 + /* * ADC driver system settings. */ diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/cmake-variants.json b/targets/ChibiOS/ORGPAL_PALTHREE/cmake-variants.json index fc45844bba..e6ea7f8fab 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/cmake-variants.json +++ b/targets/ChibiOS/ORGPAL_PALTHREE/cmake-variants.json @@ -56,10 +56,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_System.Device.Dac": "OFF", "API_System.Net": "ON", diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/chconf.h b/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/chconf.h index 0afc022706..7d04091405 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/chconf.h +++ b/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -620,7 +651,7 @@ * @brief System structure extension. * @details User fields added to the end of the @p ch_system_t structure. */ -#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ */ #define CH_CFG_SYSTEM_INIT_HOOK() \ { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ + } + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) \ + { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -644,6 +691,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) \ { \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) \ { \ @@ -662,6 +713,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ { \ @@ -745,6 +799,15 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) \ + { \ + /* Faults handling code here.*/ \ + } + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/halconf.h b/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/halconf.h index dae1869f7d..7ca5642d80 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/halconf.h +++ b/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/halconf.h @@ -405,6 +405,46 @@ #define SERIAL_BUFFERS_SIZE 64 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/mcuconf.h b/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/mcuconf.h index 222656a3e4..9ed3334f02 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/mcuconf.h +++ b/targets/ChibiOS/ORGPAL_PALTHREE/nanoBooter/mcuconf.h @@ -304,6 +304,18 @@ #define STM32_SERIAL_USE_UART7 FALSE #define STM32_SERIAL_USE_UART8 FALSE +/* + * SIO driver system settings. + */ +#define STM32_SIO_USE_USART1 FALSE +#define STM32_SIO_USE_USART2 FALSE +#define STM32_SIO_USE_USART3 FALSE +#define STM32_SIO_USE_UART4 FALSE +#define STM32_SIO_USE_UART5 FALSE +#define STM32_SIO_USE_USART6 FALSE +#define STM32_SIO_USE_UART7 FALSE +#define STM32_SIO_USE_UART8 FALSE + /* * SPI driver system settings. */ @@ -408,8 +420,9 @@ /* * WSPI driver system settings. */ -#define STM32_WSPI_USE_QUADSPI1 FALSE -#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_WSPI_USE_QUADSPI1 FALSE +#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2 // header for nanoFramework overlay drivers #include "mcuconf_nf.h" diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/chconf.h b/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/chconf.h index f9cb68581c..0f0f0988cf 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/chconf.h +++ b/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -620,7 +651,7 @@ * @brief System structure extension. * @details User fields added to the end of the @p ch_system_t structure. */ -#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ */ #define CH_CFG_SYSTEM_INIT_HOOK() \ { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ + } + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) \ + { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -644,6 +691,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) \ { \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) \ { \ @@ -662,6 +713,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ { \ @@ -745,6 +799,15 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) \ + { \ + /* Faults handling code here.*/ \ + } + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/halconf.h b/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/halconf.h index 954222e17b..ccc3d647cb 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/halconf.h +++ b/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/halconf.h @@ -417,6 +417,26 @@ #define SERIAL_BUFFERS_SIZE 16 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/mcuconf.h b/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/mcuconf.h index 6eaa3e1582..126a26cae4 100644 --- a/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/mcuconf.h +++ b/targets/ChibiOS/ORGPAL_PALTHREE/nanoCLR/mcuconf.h @@ -304,6 +304,18 @@ #define STM32_SERIAL_USE_UART7 FALSE #define STM32_SERIAL_USE_UART8 FALSE +/* + * SIO driver system settings. + */ +#define STM32_SIO_USE_USART1 FALSE +#define STM32_SIO_USE_USART2 FALSE +#define STM32_SIO_USE_USART3 FALSE +#define STM32_SIO_USE_UART4 FALSE +#define STM32_SIO_USE_UART5 FALSE +#define STM32_SIO_USE_USART6 FALSE +#define STM32_SIO_USE_UART7 FALSE +#define STM32_SIO_USE_UART8 FALSE + /* * SPI driver system settings. */ @@ -410,7 +422,7 @@ */ #define STM32_WSPI_USE_QUADSPI1 FALSE #define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2 // NOT IN LATEST VERSION, KEEPING JUST INCASE +#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2 // header for nanoFramework overlay drivers #include "mcuconf_nf.h" diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/CMakeLists.txt b/targets/ChibiOS/ST_NUCLEO64_F091RC/CMakeLists.txt index 2162ef5580..2d30fda9fa 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/CMakeLists.txt +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/CMakeLists.txt @@ -82,3 +82,27 @@ set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAG # generate output files nf_generate_build_output_files(${NANOBOOTER_PROJECT_NAME}.elf) nf_generate_build_output_files(${NANOCLR_PROJECT_NAME}.elf) + +# generate bin file for deployment +if(SRECORD_TOOL_AVAILABLE) + + ############################################################################################################ + ## when changing the linker file make sure to update the addresses below with the offset of the CLR image ## + ## DO NOT use the leading 0x notation, just the address in plain hexadecimal formating ## + ############################################################################################################ + + if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + NF_GENERATE_BIN_PACKAGE( + ${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin + ${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin + 5000 + ${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.bin) + else() + NF_GENERATE_BIN_PACKAGE( + ${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin + ${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin + 2800 + ${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.bin) + endif() + +endif() \ No newline at end of file diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/cmake-variants.json b/targets/ChibiOS/ST_NUCLEO64_F091RC/cmake-variants.json index 5b27eb2637..a484d7a708 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/cmake-variants.json +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/cmake-variants.json @@ -30,6 +30,7 @@ "CMAKE_TOOLCHAIN_FILE": "CMake/toolchain.arm-none-eabi.cmake", "TOOLCHAIN_PREFIX": "", "TOOL_HEX2DFU_PREFIX": "", + "TOOL_SRECORD_PREFIX": "", "TARGET_SERIES": "STM32F0xx", "RTOS": "CHIBIOS", "RTOS_SOURCE_FOLDER": "", @@ -48,10 +49,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", - "API_Windows.Devices.SerialCommunication": "ON" + "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON" } } } diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/chconf.h b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/chconf.h index b510efa624..f7d416dbc7 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/chconf.h +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -620,23 +651,40 @@ * @brief System structure extension. * @details User fields added to the end of the @p ch_system_t structure. */ -#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add system custom fields here.*/ /** * @brief System initialization hook. * @details User initialization code added to the @p chSysInit() function * just before interrupts are enabled globally. */ -#define CH_CFG_SYSTEM_INIT_HOOK() \ - { \ - /* Add threads initialization code here.*/ \ - } +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add system initialization code here.*/ \ +} + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ + /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ + /* Add OS instance initialization code here.*/ \ +} /** * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. */ -#define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ /** * @brief Threads initialization hook. @@ -644,45 +692,47 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ -#define CH_CFG_THREAD_INIT_HOOK(tp) \ - { \ - /* Add threads initialization code here.*/ \ - } +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) \ - { \ - /* Add threads finalization code here.*/ \ - } +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ - { \ - /* Context switch code here.*/ \ - } +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} /** * @brief ISR enter hook. */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() \ - { \ - /* IRQ prologue code here.*/ \ - } +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} /** * @brief ISR exit hook. */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() \ - { \ - /* IRQ epilogue code here.*/ \ - } +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} /** * @brief Idle thread enter hook. @@ -690,10 +740,9 @@ * should be invoked from here. * @note This macro can be used to activate a power saving mode. */ -#define CH_CFG_IDLE_ENTER_HOOK() \ - { \ - /* Idle-enter code here.*/ \ - } +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} /** * @brief Idle thread leave hook. @@ -701,49 +750,52 @@ * should be invoked from here. * @note This macro can be used to deactivate a power saving mode. */ -#define CH_CFG_IDLE_LEAVE_HOOK() \ - { \ - /* Idle-leave code here.*/ \ - } +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. */ -#define CH_CFG_IDLE_LOOP_HOOK() \ - { \ - /* Idle loop code here.*/ \ - } +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} /** * @brief System tick event hook. * @details This hook is invoked in the system tick handler immediately * after processing the virtual timers queue. */ -#define CH_CFG_SYSTEM_TICK_HOOK() \ - { \ - /* System tick event code here.*/ \ - } +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} /** * @brief System halt hook. * @details This hook is invoked in case to a system halting error before * the system is halted. */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) \ - { \ - /* System halt code here.*/ \ - } +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} /** * @brief Trace hook. * @details This hook is invoked each time a new record is written in the * trace buffer. */ -#define CH_CFG_TRACE_HOOK(tep) \ - { \ - /* Trace code here.*/ \ - } +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ + /* Faults handling code here.*/ \ +} /** @} */ diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/halconf.h b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/halconf.h index 49d618dcd6..8f0ff525a3 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/halconf.h +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoBooter/halconf.h @@ -405,6 +405,26 @@ #define SERIAL_BUFFERS_SIZE 64 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR-DEBUG.ld b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR-DEBUG.ld index de2a8667e8..cada5652cf 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR-DEBUG.ld +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR-DEBUG.ld @@ -10,6 +10,11 @@ /* * STM32F091xC memory setup. */ + +/* +* When updating the flash0 address below make sure to update the address in NF_GENERATE_BIN_PACKAGE +*/ + MEMORY { flash0 (rx) : org = 0x08005000, len = 256k - 20k - 46k /* flash size less the space reserved for nanoBooter and application deployment*/ diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR.ld b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR.ld index f17e603438..241e3e9447 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR.ld +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/STM32F091xC_CLR.ld @@ -10,6 +10,11 @@ /* * STM32F091xC memory setup. */ + +/* +* When updating the flash0 address below make sure to update the address in NF_GENERATE_BIN_PACKAGE +*/ + MEMORY { flash0 (rx) : org = 0x08002800, len = 256k - 10k - 88k /* flash size less the space reserved for nanoBooter and application deployment*/ diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/chconf.h b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/chconf.h index af7b7438f4..d1e23c9050 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/chconf.h +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -621,7 +652,7 @@ * @details User fields added to the end of the @p ch_system_t structure. */ #define CH_CFG_SYSTEM_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ + /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ * just before interrupts are enabled globally. */ #define CH_CFG_SYSTEM_INIT_HOOK() { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ +} + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ + /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -645,6 +692,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ /* Add threads initialization code here.*/ \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -661,6 +712,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ /* Context switch code here.*/ \ @@ -735,6 +789,14 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ + /* Faults handling code here.*/ \ +} + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/halconf.h b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/halconf.h index 15dda09b4d..df71b06e45 100644 --- a/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/halconf.h +++ b/targets/ChibiOS/ST_NUCLEO64_F091RC/nanoCLR/halconf.h @@ -417,6 +417,26 @@ #define SERIAL_BUFFERS_SIZE 64 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/cmake-variants.json b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/cmake-variants.json index c7854fa2cd..c394ff177b 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/cmake-variants.json +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/cmake-variants.json @@ -48,10 +48,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_nanoFramework.Devices.OneWire": "ON", "API_nanoFramework.Devices.Can": "ON", diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/chconf.h b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/chconf.h index d1e3bd1907..8b7e15a07a 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/chconf.h +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -621,7 +652,7 @@ * @details User fields added to the end of the @p ch_system_t structure. */ #define CH_CFG_SYSTEM_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ + /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ * just before interrupts are enabled globally. */ #define CH_CFG_SYSTEM_INIT_HOOK() { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ +} + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ + /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -645,6 +692,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ /* Add threads initialization code here.*/ \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -661,6 +712,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ /* Context switch code here.*/ \ @@ -735,6 +789,14 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ + /* Faults handling code here.*/ \ +} + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/halconf.h b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/halconf.h index 8b4ca18126..07c510bffa 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/halconf.h +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/halconf.h @@ -405,6 +405,26 @@ #define SERIAL_BUFFERS_SIZE 16 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/mcuconf.h b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/mcuconf.h index ad0344da2b..b61391f1c5 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/mcuconf.h +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoBooter/mcuconf.h @@ -22,6 +22,7 @@ */ #define STM32F4xx_MCUCONF +#define STM32F429_MCUCONF /* * HAL driver system settings. @@ -72,6 +73,30 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 +#define STM32_IRQ_TIM6_PRIORITY 7 +#define STM32_IRQ_TIM7_PRIORITY 7 +#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7 +#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7 +#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7 +#define STM32_IRQ_TIM8_CC_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART3_PRIORITY 12 +#define STM32_IRQ_UART4_PRIORITY 12 +#define STM32_IRQ_UART5_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 +#define STM32_IRQ_UART7_PRIORITY 12 +#define STM32_IRQ_UART8_PRIORITY 12 + /* * ADC driver system settings. */ diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/chconf.h b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/chconf.h index af7b7438f4..d1e23c9050 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/chconf.h +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -621,7 +652,7 @@ * @details User fields added to the end of the @p ch_system_t structure. */ #define CH_CFG_SYSTEM_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ + /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ * just before interrupts are enabled globally. */ #define CH_CFG_SYSTEM_INIT_HOOK() { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ +} + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ + /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -645,6 +692,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ /* Add threads initialization code here.*/ \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -661,6 +712,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ /* Context switch code here.*/ \ @@ -735,6 +789,14 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ + /* Faults handling code here.*/ \ +} + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/halconf.h b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/halconf.h index 31743b78b9..ce2ed04e34 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/halconf.h +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/halconf.h @@ -417,6 +417,26 @@ #define SERIAL_BUFFERS_SIZE 16 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h index 79c06ff042..287551e691 100644 --- a/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h +++ b/targets/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h @@ -22,7 +22,7 @@ */ #define STM32F4xx_MCUCONF -//#define STM32F429_MCUCONF +#define STM32F429_MCUCONF /* * HAL driver system settings. @@ -73,6 +73,30 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 +#define STM32_IRQ_TIM6_PRIORITY 7 +#define STM32_IRQ_TIM7_PRIORITY 7 +#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7 +#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7 +#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7 +#define STM32_IRQ_TIM8_CC_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART3_PRIORITY 12 +#define STM32_IRQ_UART4_PRIORITY 12 +#define STM32_IRQ_UART5_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 +#define STM32_IRQ_UART7_PRIORITY 12 +#define STM32_IRQ_UART8_PRIORITY 12 + /* * ADC driver system settings. */ diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/CMakeLists.txt b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/CMakeLists.txt index bc92746c1b..955b24ce89 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/CMakeLists.txt +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/CMakeLists.txt @@ -88,3 +88,27 @@ set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAG # generate output files nf_generate_build_output_files(${NANOBOOTER_PROJECT_NAME}.elf) nf_generate_build_output_files(${NANOCLR_PROJECT_NAME}.elf) + +# generate bin file for deployment +if(SRECORD_TOOL_AVAILABLE) + + ############################################################################################################ + ## when changing the linker file make sure to update the addresses below with the offset of the CLR image ## + ## DO NOT use the leading 0x notation, just the address in plain hexadecimal formating ## + ############################################################################################################ + + if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + NF_GENERATE_BIN_PACKAGE( + ${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin + ${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin + 10000 + ${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.bin) + else() + NF_GENERATE_BIN_PACKAGE( + ${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin + ${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin + 10000 + ${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.bin) + endif() + +endif() diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/cmake-variants.json b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/cmake-variants.json index 57549a0125..1a661176a6 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/cmake-variants.json +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/cmake-variants.json @@ -30,6 +30,7 @@ "CMAKE_TOOLCHAIN_FILE": "CMake/toolchain.arm-none-eabi.cmake", "TOOLCHAIN_PREFIX": "", "TOOL_HEX2DFU_PREFIX": "", + "TOOL_SRECORD_PREFIX": "", "RTOS": "CHIBIOS", "TARGET_SERIES": "STM32F7xx", "RTOS_SOURCE_FOLDER": "", @@ -54,10 +55,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Adc": "ON", "API_System.Device.Dac": "ON", "API_System.Net": "ON", diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/chconf.h b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/chconf.h index a1fcd00529..67e6f1156d 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/chconf.h +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -621,7 +652,7 @@ * @details User fields added to the end of the @p ch_system_t structure. */ #define CH_CFG_SYSTEM_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ + /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ * just before interrupts are enabled globally. */ #define CH_CFG_SYSTEM_INIT_HOOK() { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ +} + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ + /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -645,6 +692,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ /* Add threads initialization code here.*/ \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -661,6 +712,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ /* Context switch code here.*/ \ @@ -735,6 +789,14 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ + /* Faults handling code here.*/ \ +} + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/halconf.h b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/halconf.h index f6b86fb8c5..b38a2ebd68 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/halconf.h +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/halconf.h @@ -405,6 +405,26 @@ #define SERIAL_BUFFERS_SIZE 64 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/mcuconf.h b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/mcuconf.h index 93228ac697..fb3770006f 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/mcuconf.h +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoBooter/mcuconf.h @@ -308,6 +308,18 @@ #define STM32_SERIAL_USE_UART7 FALSE #define STM32_SERIAL_USE_UART8 FALSE +/* + * SIO driver system settings. + */ +#define STM32_SIO_USE_USART1 FALSE +#define STM32_SIO_USE_USART2 FALSE +#define STM32_SIO_USE_USART3 FALSE +#define STM32_SIO_USE_UART4 FALSE +#define STM32_SIO_USE_UART5 FALSE +#define STM32_SIO_USE_USART6 FALSE +#define STM32_SIO_USE_UART7 FALSE +#define STM32_SIO_USE_UART8 FALSE + /* * SPI driver system settings. */ @@ -414,5 +426,6 @@ */ #define STM32_WSPI_USE_QUADSPI1 FALSE #define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2 #endif /* MCUCONF_H */ diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR-DEBUG.ld b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR-DEBUG.ld index 9469524e37..2fc512b7c1 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR-DEBUG.ld +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR-DEBUG.ld @@ -14,6 +14,7 @@ * * Notes: * BSS is placed in DTCM RAM in order to simplify DMA buffers management. + * When updating the flash0 address below make sure to update the address in NF_GENERATE_BIN_PACKAGE */ MEMORY { diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR.ld b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR.ld index 9469524e37..2fc512b7c1 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR.ld +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/STM32F76xx_CLR.ld @@ -14,6 +14,7 @@ * * Notes: * BSS is placed in DTCM RAM in order to simplify DMA buffers management. + * When updating the flash0 address below make sure to update the address in NF_GENERATE_BIN_PACKAGE */ MEMORY { diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/chconf.h b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/chconf.h index e5c868b7f8..cc4d2a81a6 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/chconf.h +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/chconf.h @@ -19,7 +19,27 @@ #define CHCONF_H #define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ +#define _CHIBIOS_RT_CONF_VER_7_0_ + +/*===========================================================================*/ +/** + * @name System settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Handling of instances. + * @note If enabled then threads assigned to various instances can + * interact each other using the same synchronization objects. + * If disabled then each OS instance is a separate world, no + * direct interactions are handled by the OS. + */ +#if !defined(CH_CFG_SMP_MODE) +#define CH_CFG_SMP_MODE FALSE +#endif + +/** @} */ /*===========================================================================*/ /** @@ -30,7 +50,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 @@ -150,6 +170,17 @@ #define CH_CFG_USE_TM FALSE #endif +/** + * @brief Time Stamps APIs. + * @details If enabled then the time time stamps APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TIMESTAMP) +#define CH_CFG_USE_TIMESTAMP FALSE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. @@ -621,7 +652,7 @@ * @details User fields added to the end of the @p ch_system_t structure. */ #define CH_CFG_SYSTEM_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ + /* Add system custom fields here.*/ /** * @brief System initialization hook. @@ -629,7 +660,23 @@ * just before interrupts are enabled globally. */ #define CH_CFG_SYSTEM_INIT_HOOK() { \ - /* Add threads initialization code here.*/ \ + /* Add system initialization code here.*/ \ +} + +/** + * @brief OS instance structure extension. + * @details User fields added to the end of the @p os_instance_t structure. + */ +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ + /* Add OS instance custom fields here.*/ + +/** + * @brief OS instance initialization hook. + * + * @param[in] oip pointer to the @p os_instance_t structure + */ +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ + /* Add OS instance initialization code here.*/ \ } /** @@ -645,6 +692,8 @@ * * @note It is invoked from within @p _thread_init() and implicitly from all * the threads creation APIs. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_INIT_HOOK(tp) { \ /* Add threads initialization code here.*/ \ @@ -653,6 +702,8 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. + * + * @param[in] tp pointer to the @p thread_t structure */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -661,6 +712,9 @@ /** * @brief Context switch hook. * @details This hook is invoked just before switching between threads. + * + * @param[in] ntp thread being switched in + * @param[in] otp thread being switched out */ #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ /* Context switch code here.*/ \ @@ -735,6 +789,14 @@ /* Trace code here.*/ \ } +/** + * @brief Runtime Faults Collection Unit hook. + * @details This hook is invoked each time new faults are collected and stored. + */ +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ + /* Faults handling code here.*/ \ +} + /** @} */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/halconf.h b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/halconf.h index ede05e987d..90c7601a0a 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/halconf.h +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/halconf.h @@ -426,6 +426,26 @@ #define SERIAL_BUFFERS_SIZE 64 #endif +/*===========================================================================*/ +/* SIO driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SIO_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SIO_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Support for thread synchronization API. + */ +#if !defined(SIO_USE_SYNCHRONIZATION) || defined(__DOXYGEN__) +#define SIO_USE_SYNCHRONIZATION TRUE +#endif + /*===========================================================================*/ /* SERIAL_USB driver related setting. */ /*===========================================================================*/ diff --git a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/mcuconf.h b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/mcuconf.h index 50c5203499..12b65367ba 100644 --- a/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/mcuconf.h +++ b/targets/ChibiOS/ST_STM32F769I_DISCOVERY/nanoCLR/mcuconf.h @@ -308,6 +308,18 @@ #define STM32_SERIAL_USE_UART7 FALSE #define STM32_SERIAL_USE_UART8 FALSE +/* + * SIO driver system settings. + */ +#define STM32_SIO_USE_USART1 FALSE +#define STM32_SIO_USE_USART2 FALSE +#define STM32_SIO_USE_USART3 FALSE +#define STM32_SIO_USE_UART4 FALSE +#define STM32_SIO_USE_UART5 FALSE +#define STM32_SIO_USE_USART6 FALSE +#define STM32_SIO_USE_UART7 FALSE +#define STM32_SIO_USE_UART8 FALSE + /* * SPI driver system settings. */ @@ -414,7 +426,8 @@ */ #define STM32_WSPI_USE_QUADSPI1 FALSE #define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2 // NOT IN LATEST VERSION, KEEPING JUST INCASE +#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2 + // header for nanoFramework overlay drivers #include "mcuconf_nf.h" diff --git a/targets/ChibiOS/_Include/lwipopts.h b/targets/ChibiOS/_Include/lwipopts.h index ed6875fed2..3e2c5b7a79 100644 --- a/targets/ChibiOS/_Include/lwipopts.h +++ b/targets/ChibiOS/_Include/lwipopts.h @@ -578,7 +578,7 @@ * sys_thread_new() when the thread is created. */ #ifndef TCPIP_THREAD_PRIO -#define TCPIP_THREAD_PRIO (NORMALPRIO) +#define TCPIP_THREAD_PRIO (NORMALPRIO + 2) #endif /** diff --git a/targets/ChibiOS/_Lwip/nf_lwipthread.h b/targets/ChibiOS/_Lwip/nf_lwipthread.h index 9ac8e04c33..020b758102 100644 --- a/targets/ChibiOS/_Lwip/nf_lwipthread.h +++ b/targets/ChibiOS/_Lwip/nf_lwipthread.h @@ -35,7 +35,7 @@ * @brief lwIP thread priority. */ #ifndef LWIP_THREAD_PRIORITY -#define LWIP_THREAD_PRIORITY NORMALPRIO +#define LWIP_THREAD_PRIORITY (NORMALPRIO + 2) #endif /** diff --git a/targets/ChibiOS/_common/Target_Windows_Storage.c b/targets/ChibiOS/_common/Target_Windows_Storage.c index 0c3e0857fe..5b1b9e0e9c 100644 --- a/targets/ChibiOS/_common/Target_Windows_Storage.c +++ b/targets/ChibiOS/_common/Target_Windows_Storage.c @@ -37,8 +37,9 @@ static virtual_timer_t sdCardDebounceTimer; static bool sdCardPresent; // Insertion monitor timer callback function. -static void SdCardInsertionMonitorCallback(void *p) +static void SdCardInsertionMonitorCallback(virtual_timer_t *vtp, void *p) { + (void)vtp; BaseBlockDevice *bbdp = p; bool currentStatus; diff --git a/targets/ChibiOS/_common/WireProtocol_HAL_Interface.c b/targets/ChibiOS/_common/WireProtocol_HAL_Interface.c index ab6276537d..1ca396c271 100644 --- a/targets/ChibiOS/_common/WireProtocol_HAL_Interface.c +++ b/targets/ChibiOS/_common/WireProtocol_HAL_Interface.c @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -15,79 +16,60 @@ #include #endif -WP_Message inboundMessage; - -//////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////// -// The functions below are the ones that need to be ported to new channels/HALs when required -// These are to be considered as a reference implementations when working on new ports -// -// This reference implementation provides communication through: -// - serial port (UART/USART) -// - serial over USB (USB CDC class device) -// -//////////////////////////////////////////////////////////////////////////////////////////////// - #if (HAL_USE_SERIAL_USB == TRUE) -int WP_ReceiveBytes(uint8_t *ptr, uint16_t *size) +uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size) { - // save for latter comparison - uint16_t requestedSize = *size; + // save for later comparison + uint32_t requestedSize = *size; + (void)requestedSize; - // sanity check for request of 0 size + // check for request with 0 size if (*size) { - ////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - ////////////////////////////////////////////////////////// - // change here to read (size) bytes from the input stream - // preferably with read timeout and being able to check - // if the requested number of bytes was actually read - ////////////////////////////////////////////////////////// + // read from serial stream with 100ms timeout + size_t read = chnReadTimeout(&SDU1, ptr, requestedSize, TIME_MS2I(100)); - // read from serial stream with 250ms timeout - size_t read = chnReadTimeout(&SDU1, ptr, *size, TIME_MS2I(250)); + // check if any bytes where read + if (read == 0) + { + return false; + } ptr += read; *size -= read; TRACE(TRACE_STATE, "RXMSG: Expecting %d bytes, received %d.\n", requestedSize, read); - - // check if the requested read matches the actual read count - return (requestedSize == read); } return true; } #elif (HAL_USE_SERIAL == TRUE) -int WP_ReceiveBytes(uint8_t *ptr, uint16_t *size) +uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size) { - // save for latter comparison - uint16_t requestedSize = *size; + volatile uint32_t read; + + // save for later comparison + uint32_t requestedSize = *size; + (void)requestedSize; - // sanity check for request of 0 size + // check for request with 0 size if (*size) { - ////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - ////////////////////////////////////////////////////////// - // change here to read (size) bytes from the input stream - // preferably with read timeout and being able to check - // if the requested number of bytes was actually read - ////////////////////////////////////////////////////////// + // non blocking read from serial port with 100ms timeout + read = chnReadTimeout(&SERIAL_DRIVER, ptr, requestedSize, TIME_MS2I(20)); + + TRACE(TRACE_STATE, "RXMSG: Expecting %d bytes, received %d.\n", requestedSize, read); - // non blocking read from serial port with 250ms timeout - volatile size_t read = chnReadTimeout(&SERIAL_DRIVER, ptr, *size, TIME_MS2I(250)); + // check if any bytes where read + if (read == 0) + { + return false; + } ptr += read; *size -= read; - - TRACE(TRACE_STATE, "RXMSG: Expecting %d bytes, received %d.\n", requestedSize, read); - - // check if the requested read matches the actual read count - return (requestedSize == read); } return true; @@ -100,19 +82,11 @@ int WP_ReceiveBytes(uint8_t *ptr, uint16_t *size) #if (HAL_USE_SERIAL_USB == TRUE) -int WP_TransmitMessage(WP_Message *message) +uint8_t WP_TransmitMessage(WP_Message *message) { uint32_t writeResult; bool operationResult = false; - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // change here to write (size) bytes to the output stream - // preferably with timeout and being able to check - // if the write was successful or at least buffered - ////////////////////////////////////////////////////////// - TRACE( TRACE_HEADERS, "TXMSG: 0x%08X, 0x%08X, 0x%08X\n", @@ -121,8 +95,7 @@ int WP_TransmitMessage(WP_Message *message) message->m_header.m_size); // write header to output stream - writeResult = - chnWriteTimeout(&SDU1, (const uint8_t *)&message->m_header, sizeof(message->m_header), TIME_MS2I(250)); + writeResult = chnWriteTimeout(&SDU1, (const uint8_t *)&message->m_header, sizeof(message->m_header), TIME_MS2I(10)); if (writeResult == sizeof(message->m_header)) { @@ -131,16 +104,10 @@ int WP_TransmitMessage(WP_Message *message) // if there is anything on the payload send it to the output stream if (message->m_header.m_size && message->m_payload) { - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // see description above - ////////////////////////////////////////////////////////// - // reset flag operationResult = false; - writeResult = chnWriteTimeout(&SDU1, message->m_payload, message->m_header.m_size, TIME_MS2I(250)); + writeResult = chnWriteTimeout(&SDU1, message->m_payload, message->m_header.m_size, TIME_MS2I(50)); if (writeResult == message->m_header.m_size) { @@ -155,19 +122,11 @@ int WP_TransmitMessage(WP_Message *message) } #elif (HAL_USE_SERIAL == TRUE) -int WP_TransmitMessage(WP_Message *message) +uint8_t WP_TransmitMessage(WP_Message *message) { uint32_t writeResult; bool operationResult = false; - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // change here to write (size) bytes to the output stream - // preferably with timeout and being able to check - // if the write was sucessfull or at least buffered - ////////////////////////////////////////////////////////// - TRACE( TRACE_HEADERS, "TXMSG: 0x%08X, 0x%08X, 0x%08X\n", @@ -177,7 +136,7 @@ int WP_TransmitMessage(WP_Message *message) // write header to output stream writeResult = - chnWriteTimeout(&SERIAL_DRIVER, (const uint8_t *)&message->m_header, sizeof(message->m_header), TIME_MS2I(250)); + chnWriteTimeout(&SERIAL_DRIVER, (const uint8_t *)&message->m_header, sizeof(message->m_header), TIME_MS2I(10)); if (writeResult == sizeof(message->m_header)) { @@ -186,16 +145,10 @@ int WP_TransmitMessage(WP_Message *message) // if there is anything on the payload send it to the output stream if (message->m_header.m_size && message->m_payload) { - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // see description above - ////////////////////////////////////////////////////////// - // reset flag operationResult = false; - writeResult = chnWriteTimeout(&SERIAL_DRIVER, message->m_payload, message->m_header.m_size, TIME_MS2I(250)); + writeResult = chnWriteTimeout(&SERIAL_DRIVER, message->m_payload, message->m_header.m_size, TIME_MS2I(50)); if (writeResult == message->m_header.m_size) { diff --git a/targets/ChibiOS/_common/WireProtocol_ReceiverThread.c b/targets/ChibiOS/_common/WireProtocol_ReceiverThread.c index 9341b6a195..e9a139b652 100644 --- a/targets/ChibiOS/_common/WireProtocol_ReceiverThread.c +++ b/targets/ChibiOS/_common/WireProtocol_ReceiverThread.c @@ -8,8 +8,6 @@ #include #include -extern WP_Message inboundMessage; - #if (HAL_USE_SERIAL_USB == TRUE) extern SerialUSBDriver SDU1; #endif @@ -23,6 +21,8 @@ __attribute__((noreturn)) void ReceiverThread(void const *argument) osDelay(500); + WP_Message_PrepareReception(); + // loop until thread receives a request to terminate while (1) { @@ -33,10 +33,7 @@ __attribute__((noreturn)) void ReceiverThread(void const *argument) { #endif - WP_Message_Initialize(&inboundMessage); - WP_Message_PrepareReception(&inboundMessage); - - WP_Message_Process(&inboundMessage); + WP_Message_Process(); #if (HAL_USE_SERIAL_USB == TRUE) // pass control to the OS @@ -49,9 +46,14 @@ __attribute__((noreturn)) void ReceiverThread(void const *argument) #elif (HAL_USE_SERIAL == TRUE) // delay here to give other threads a chance to run - osDelay(100); + osThreadYield(); #endif } // this function never returns } + +void WP_Message_PrepareReception_Platform() +{ + // empty on purpose, nothing to configure +} diff --git a/targets/ChibiOS/_nanoBooter/WireProtocol_App_Interface.c b/targets/ChibiOS/_nanoBooter/WireProtocol_App_Interface.c index a53c17468a..0584a52641 100644 --- a/targets/ChibiOS/_nanoBooter/WireProtocol_App_Interface.c +++ b/targets/ChibiOS/_nanoBooter/WireProtocol_App_Interface.c @@ -4,15 +4,10 @@ // See LICENSE file in the project root for full license information. // -#include -#include #include -// Initialize to a packet sequence number impossible to encounter -static uint32_t lastPacketSequence = 0x00FEFFFF; - // defining this array here makes is local helping reduce the image size because of compiler opmitizations -static const CommandHandlerLookup c_Lookup_Request[] = { +const CommandHandlerLookup c_Lookup_Request[] = { /*******************************************************************************************************************************************************************/ #define DEFINE_CMD(cmd) \ { \ @@ -47,7 +42,7 @@ static const CommandHandlerLookup c_Lookup_Request[] = { //////////////////////////////////////////////////// // defining this array here makes is local helping reduce the image size because of compiler opmitizations -static const CommandHandlerLookup c_Lookup_Reply[] = { +const CommandHandlerLookup c_Lookup_Reply[] = { /*******************************************************************************************************************************************************************/ #define DEFINE_CMD(cmd) \ { \ @@ -58,54 +53,12 @@ static const CommandHandlerLookup c_Lookup_Reply[] = { /*******************************************************************************************************************************************************************/ }; -int Messaging_ProcessPayload(WP_Message *message) +uint8_t GetSizeOfLookup_Reply() { - // Prevent processing duplicate packets - if (message->m_header.m_seq == lastPacketSequence) - { - return false; // Do not even respond to a repeat packet - } - - // save this packet sequence number - lastPacketSequence = message->m_header.m_seq; - - if (message->m_header.m_flags & WP_Flags_c_NACK) - { - // - // Bad packet... - // - return true; - } - - size_t num; - const CommandHandlerLookup *cmd; - - if (message->m_header.m_flags & WP_Flags_c_Reply) - { - num = ARRAYSIZE(c_Lookup_Reply); - cmd = c_Lookup_Reply; - } - else - { - num = ARRAYSIZE(c_Lookup_Request); - cmd = c_Lookup_Request; - } - - while (num--) - { - if (cmd->command == message->m_header.m_cmd) - { - // execute command handler and save the result - int commandHandlerExecuteResult = ((int (*)(WP_Message *))cmd->handler)(message); - - WP_ReplyToCommand(message, commandHandlerExecuteResult, false, NULL, 0); - return true; - } - - cmd++; - } - - WP_ReplyToCommand(message, false, false, NULL, 0); + return ARRAYSIZE(c_Lookup_Reply); +} - return true; +uint8_t GetSizeOfLookup_Request() +{ + return ARRAYSIZE(c_Lookup_Request); } diff --git a/targets/ChibiOS/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp b/targets/ChibiOS/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp new file mode 100644 index 0000000000..1ea2f72662 --- /dev/null +++ b/targets/ChibiOS/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp @@ -0,0 +1,1136 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#include +#include +#include "sys_io_ser_native_target.h" + +///////////////////////////////////////////////////////// +// UART PAL strucs delcared in win_dev_serial_native.h // +///////////////////////////////////////////////////////// +// TODO: uncomment when Windows.Deveices.SerialCommunication will be removed +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) +// NF_PAL_UART Uart1_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) +// NF_PAL_UART Uart2_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) +// NF_PAL_UART Uart3_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) +// NF_PAL_UART Uart4_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) +// NF_PAL_UART Uart5_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) +// NF_PAL_UART Uart6_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) +// NF_PAL_UART Uart7_PAL; +// #endif +// #if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) +// NF_PAL_UART Uart8_PAL; +// #endif + +// This callback is invoked when a transmission buffer has been completely read by the driver. +static void TxEnd1(UARTDriver *uartp) +{ + (void)uartp; + + NATIVE_INTERRUPT_START + + NF_PAL_UART *palUart; + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + if (uartp == &UARTD1) + { + palUart = &Uart1_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + if (uartp == &UARTD2) + { + palUart = &Uart2_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + if (uartp == &UARTD3) + { + palUart = &Uart3_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + if (uartp == &UARTD4) + { + palUart = &Uart4_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + if (uartp == &UARTD5) + { + palUart = &Uart5_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + if (uartp == &UARTD6) + { + palUart = &Uart6_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + if (uartp == &UARTD7) + { + palUart = &Uart7_PAL; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + if (uartp == &UARTD8) + { + palUart = &Uart8_PAL; + } +#endif + + // pop elements from ring buffer, just pop + palUart->TxRingBuffer.Pop(palUart->TxOngoingCount); + + // reset Tx ongoing count + palUart->TxOngoingCount = 0; + + Events_Set(SYSTEM_EVENT_FLAG_COM_OUT); + + NATIVE_INTERRUPT_END +} + +// This callback is invoked when a character is received but the application was not ready to receive it, the character +// is passed as parameter. +static void RxChar(UARTDriver *uartp, uint16_t c) +{ + NATIVE_INTERRUPT_START + + NF_PAL_UART *palUart; + uint8_t portIndex = 0; + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + if (uartp == &UARTD1) + { + palUart = &Uart1_PAL; + portIndex = 1; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + if (uartp == &UARTD2) + { + palUart = &Uart2_PAL; + portIndex = 2; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + if (uartp == &UARTD3) + { + palUart = &Uart3_PAL; + portIndex = 3; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + if (uartp == &UARTD4) + { + palUart = &Uart4_PAL; + portIndex = 4; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + if (uartp == &UARTD5) + { + palUart = &Uart5_PAL; + portIndex = 5; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + if (uartp == &UARTD6) + { + palUart = &Uart6_PAL; + portIndex = 6; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + if (uartp == &UARTD7) + { + palUart = &Uart7_PAL; + portIndex = 7; + } +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + if (uartp == &UARTD8) + { + palUart = &Uart8_PAL; + portIndex = 8; + } +#endif + + // store this into the UART Rx buffer + + // push char to ring buffer + // don't care about the success of the operation, if it's full we are droping the char anyway + palUart->RxRingBuffer.Push((uint8_t)c); + + // is there a read operation going on? + if (palUart->RxBytesToRead > 0) + { + // yes + // check if the requested bytes are available in the buffer... + //... or if the watch char was received + if ((palUart->RxRingBuffer.Length() >= palUart->RxBytesToRead) || (c == palUart->WatchChar)) + { + // reset Rx bytes to read count + palUart->RxBytesToRead = 0; + + // fire event for Rx buffer complete + Events_Set(SYSTEM_EVENT_FLAG_COM_IN); + } + } + else + { + // no read operation ongoing, so fire an event + + // post a managed event with the port index and event code (check if this is the watch char or just another + // another) + // TODO: check if callbacks are registered so this is called only if there is anyone listening otherwise don't + // bother for that to happen ChibiOS callback has to accept arg which we would passing the GpioPin + // CLR_RT_HeapBlock (see Gpio handler) check http://www.chibios.com/forum/viewtopic.php?f=36&t=4798 + PostManagedEvent( + EVENT_SERIAL, + 0, + portIndex, + (c == palUart->WatchChar) ? SerialData_WatchChar : SerialData_Chars); + } + + NATIVE_INTERRUPT_END +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::get_BytesToRead___I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + palUart = &Uart8_PAL; + break; +#endif + default: + // this COM port is not valid + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + } + + // get length of Rx ring buffer + stack.SetResult_U4(palUart->RxRingBuffer.Length()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeDispose___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + UnInit_UART1(); + // stop UART + uartStop(&UARTD1); + Uart1_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + UnInit_UART2(); + // stop UART + uartStop(&UARTD2); + Uart2_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + UnInit_UART3(); + // stop UART + uartStop(&UARTD3); + Uart3_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + UnInit_UART4(); + // stop UART + uartStop(&UARTD4); + Uart4_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + UnInit_UART5(); + // stop UART + uartStop(&UARTD5); + Uart5_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + UnInit_UART6(); + // stop UART + uartStop(&UARTD6); + Uart6_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + UnInit_UART7(); + // stop UART + uartStop(&UARTD7); + Uart7_PAL.UartDriver = NULL; + break; +#endif + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + UnInit_UART8(); + // stop UART + uartStop(&UARTD8); + Uart8_PAL.UartDriver = NULL; + break; +#endif + + default: + // this COM port is not valid + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + } + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeInit___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + Init_UART1(); + Uart1_PAL.UartDriver = &UARTD1; + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + Init_UART2(); + Uart2_PAL.UartDriver = &UARTD2; + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + Init_UART3(); + Uart3_PAL.UartDriver = &UARTD3; + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + Init_UART4(); + Uart4_PAL.UartDriver = &UARTD4; + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + Init_UART5(); + Uart5_PAL.UartDriver = &UARTD5; + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + Init_UART6(); + Uart6_PAL.UartDriver = &UARTD6; + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + Init_UART7(); + Uart7_PAL.UartDriver = &UARTD7; + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + Init_UART8(); + Uart8_PAL.UartDriver = &UARTD8; + palUart = &Uart8_PAL; + break; +#endif + default: + // this COM port is not valid + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + } + + // configure UART handlers + palUart->Uart_cfg.txend1_cb = TxEnd1; + palUart->Uart_cfg.rxchar_cb = RxChar; + // palUart->Uart_cfg.rxend_cb = RxEnd; + + // call the configure + return NativeConfig___VOID(stack); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeConfig___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart = NULL; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + palUart = &Uart8_PAL; + break; +#endif + } + + // setup configuration + + // data bits @ CR1:M1&M0 + // TODO + + // parity @ CR1:PS + // TODO + + // Check RS485 mode is not selected as currently not supported + if ((SerialMode)pThis[FIELD___mode].NumericByRef().s4 != SerialMode_Normal) + { + NANOCLR_SET_AND_LEAVE(CLR_E_NOTIMPL); + } + + // stop bits @ CR2:STOP1&STOP0 + // clear bits for stop bits setting + palUart->Uart_cfg.cr2 &= ~USART_CR2_STOP; + + switch ((StopBits)pThis[FIELD___stopBits].NumericByRef().s4) + { + case StopBits_One: + // already set with the above + break; + case StopBits_OnePointFive: + palUart->Uart_cfg.cr2 |= USART_CR2_STOP_1 + USART_CR2_STOP_0; + break; + case StopBits_Two: + palUart->Uart_cfg.cr2 |= USART_CR2_STOP_1; + break; + } + + // baud rate + palUart->Uart_cfg.speed = (int)pThis[FIELD___baudRate].NumericByRef().s4; + + // stop UART, better do this before changing configuration + uartStop(palUart->UartDriver); + + // get pointer to PAL UART + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + ConfigPins_UART1(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + ConfigPins_UART2(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + ConfigPins_UART3(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + ConfigPins_UART4(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + ConfigPins_UART5(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + ConfigPins_UART6(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + ConfigPins_UART7(); + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + ConfigPins_UART8(); + break; +#endif + } + + uartStart(palUart->UartDriver, &palUart->Uart_cfg); + uartStopSend(palUart->UartDriver); + uartStopReceive(palUart->UartDriver); + + // null pointers and vars + pThis = NULL; + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeWrite___VOID__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + NF_PAL_UART *palUart = NULL; + + uint8_t *data; + unsigned int length = 0; + size_t count = 0; + int16_t writeOffset = 0; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // dereference the data buffer from the argument + CLR_RT_HeapBlock_Array *dataBuffer = stack.Arg1().DereferenceArray(); + writeOffset = stack.Arg2().NumericByRef().s4; + count = stack.Arg3().NumericByRef().s4; + + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(writeOffset); + + // get the size of the buffer + length = dataBuffer->m_numOfElements; + + if (count > length) + { + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // get pointer to PAL UART + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + palUart = &Uart8_PAL; + break; +#endif + } + + // check if there is enough room in the buffer + if (palUart->TxRingBuffer.Capacity() - palUart->TxRingBuffer.Length() < count) + { + // not enough room in the buffer + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // push data to buffer + size_t bytesWritten = palUart->TxRingBuffer.Push(data, count); + + // check if all requested bytes were written + if (bytesWritten != count) + { + // not sure if this is the best exception to throw here... + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + + // null pointers and vars + pThis = NULL; + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeStore___U4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + CLR_RT_HeapBlock hbTimeout; + + NF_PAL_UART *palUart = NULL; + + size_t length = 0; + int64_t *timeoutTicks; + bool eventResult = true; + bool txOk = false; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + palUart = &Uart8_PAL; + break; +#endif + } + + // setup timeout + hbTimeout.SetInteger((CLR_INT64)pThis[FIELD___writeTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // push dummy length value onto the eval stack + // this is going to be used to store how many bytes where buffered to Tx + if (stack.m_customState == 1) + { + stack.PushValueI4(0); + + // bump custom state so the read value above is pushed only once + stack.m_customState = 2; + } + + // check if there is anything the buffer + if (palUart->TxRingBuffer.Length() > 0) + { + // check if there is a TX operation ongoing + if (palUart->TxOngoingCount == 0) + { + // OK to Tx + txOk = true; + } + else + { + // need to wait for the ongoing operation to complete before starting a new one + } + } + + if (txOk) + { + // optimize buffer for sequential reading + palUart->TxRingBuffer.OptimizeSequence(); + + // get data length available in the buffer + length = palUart->TxRingBuffer.Length(); + + // push to the stack how many bytes bytes where buffered for Tx + stack.m_evalStack[1].NumericByRef().s4 = length; + + // flush DMA buffer to ensure cache coherency + // (only required for Cortex-M7) + cacheBufferFlush(palUart->TxRingBuffer.Reader(), length); + + // set TX ongoing count + palUart->TxOngoingCount = length; + + // because the UART can be accessed from several threads need to get exclusive access to it + uartAcquireBus(palUart->UartDriver); + + // start sending data (DMA will read from the ring buffer) + uartStartSend(palUart->UartDriver, length, (uint8_t *)palUart->TxRingBuffer.Reader()); + } + + while (eventResult) + { + // non-blocking wait allowing other threads to run while we wait for the Tx operation to complete + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortOut, eventResult)); + + // done here, release the UART + uartReleaseBus(palUart->UartDriver); + + if (eventResult) + { + // event occurred + // get from the eval stack how many bytes were buffered to Tx + length = stack.m_evalStack[1].NumericByRef().s4; + + // done here + break; + } + else + { + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + } + + // pop length heap block from stack + stack.PopValue(); + + // pop timeout heap block from stack + stack.PopValue(); + + stack.SetResult_U4(length); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeRead___U4__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + CLR_RT_HeapBlock hbTimeout; + CLR_RT_HeapBlock_Array *dataBuffer; + NF_PAL_UART *palUart = NULL; + + uint8_t *data; + + size_t count = 0; + size_t bytesRead = 0; + size_t readOffset = 0; + size_t bytesToRead = 0; + + int64_t *timeoutTicks; + bool eventResult = true; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + if (!(pThis)) + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // dereference the data buffer from the argument + dataBuffer = stack.Arg1().DereferenceArray(); + // The offset to start filling the buffer + readOffset = stack.Arg2().NumericByRef().s4; + + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(readOffset); + + // get how many bytes are requested to read + count = stack.Arg3().NumericByRef().s4; + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + palUart = &Uart8_PAL; + break; +#endif + } + + // setup timeout + hbTimeout.SetInteger((CLR_INT64)pThis[FIELD___readTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // figure out what's available in the Rx ring buffer + if (palUart->RxRingBuffer.Length() >= count) + { + // read from Rx ring buffer + bytesToRead = count; + + // we have enough bytes, skip wait for event + eventResult = false; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + } + else + { + if (stack.m_customState == 1) + { + // not enough bytes available, have to read from UART + palUart->RxBytesToRead = count; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + + // don't read anything from the buffer yet + bytesToRead = 0; + } + } + + while (eventResult) + { + if (stack.m_customState == 1) + { + if (bytesToRead > 0) + { + // enough bytes available + eventResult = false; + } + else + { + // need to read from the UART + // update custom state + stack.m_customState = 2; + } + } + else + { + // wait for event + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine + .WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortIn, eventResult)); + + if (!eventResult) + { + // event timeout + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + } + } + + if (bytesToRead > 0) + { + // pop the requested bytes from the ring buffer + bytesRead = palUart->RxRingBuffer.Pop(data, bytesToRead); + } + + // pop timeout heap block from stack + stack.PopValue(); + + // return how many bytes were read + stack.SetResult_U4(bytesRead); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeSetWatchChar___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Choose the driver for this SerialDevice + switch ((int)pThis[FIELD___portIndex].NumericByRef().s4) + { +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + case 1: + palUart = &Uart1_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + case 2: + palUart = &Uart2_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + case 3: + palUart = &Uart3_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + case 4: + palUart = &Uart4_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + case 5: + palUart = &Uart5_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + case 6: + palUart = &Uart6_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + case 7: + palUart = &Uart7_PAL; + break; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + case 8: + palUart = &Uart8_PAL; + break; +#endif + default: + // this COM port is not valid + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + } + + // set watch char + palUart->WatchChar = (uint8_t)pThis[FIELD___watchChar].NumericByRef().u1; + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector___STATIC__STRING( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + // declare the device selector string whose max size is "COM1,COM2,COM3,COM4,COM5,COM6,COM7,COM8," + terminator + // and init with the terminator + char deviceSelectorString[40 + 1] = {0}; + +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) + strcat(deviceSelectorString, "COM1,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) + strcat(deviceSelectorString, "COM2,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) + strcat(deviceSelectorString, "COM3,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) + strcat(deviceSelectorString, "COM4,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) + strcat(deviceSelectorString, "COM5,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) + strcat(deviceSelectorString, "COM6,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) + strcat(deviceSelectorString, "COM7,"); +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) + strcat(deviceSelectorString, "COM8,"); +#endif + + // replace the last comma with a terminator + deviceSelectorString[hal_strlen_s(deviceSelectorString) - 1] = '\0'; + + // because the caller is expecting a result to be returned + // we need set a return result in the stack argument using the appropriate SetResult according to the variable + // type (a string here) + stack.SetResult_String(deviceSelectorString); + + NANOCLR_NOCLEANUP_NOLABEL(); +} diff --git a/targets/ChibiOS/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h b/targets/ChibiOS/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h new file mode 100644 index 0000000000..c167fc9a8a --- /dev/null +++ b/targets/ChibiOS/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h @@ -0,0 +1,186 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#ifndef _WIN_DEV_SERIAL_NATIVE_TARGET_H_ +#define _WIN_DEV_SERIAL_NATIVE_TARGET_H_ + +#include +#include +#include + +// struct representing the UART +typedef struct +{ + UARTDriver *UartDriver; + UARTConfig Uart_cfg; + + HAL_RingBuffer TxRingBuffer; + uint8_t *TxBuffer; + uint16_t TxOngoingCount; + + HAL_RingBuffer RxRingBuffer; + uint8_t *RxBuffer; + uint16_t RxBytesToRead; + + uint8_t WatchChar; +} NF_PAL_UART; + +//////////////////////////////////////////// +// declaration of the the UART PAL strucs // +//////////////////////////////////////////// +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART1) && (NF_SERIAL_COMM_STM32_UART_USE_USART1 == TRUE) +extern NF_PAL_UART Uart1_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART2) && (NF_SERIAL_COMM_STM32_UART_USE_USART2 == TRUE) +extern NF_PAL_UART Uart2_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART3) && (NF_SERIAL_COMM_STM32_UART_USE_USART3 == TRUE) +extern NF_PAL_UART Uart3_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART4) && (NF_SERIAL_COMM_STM32_UART_USE_UART4 == TRUE) +extern NF_PAL_UART Uart4_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART5) && (NF_SERIAL_COMM_STM32_UART_USE_UART5 == TRUE) +extern NF_PAL_UART Uart5_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_USART6) && (NF_SERIAL_COMM_STM32_UART_USE_USART6 == TRUE) +extern NF_PAL_UART Uart6_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART7) && (NF_SERIAL_COMM_STM32_UART_USE_UART7 == TRUE) +extern NF_PAL_UART Uart7_PAL; +#endif +#if defined(NF_SERIAL_COMM_STM32_UART_USE_UART8) && (NF_SERIAL_COMM_STM32_UART_USE_UART8 == TRUE) +extern NF_PAL_UART Uart8_PAL; +#endif + +// the following macro defines a function that configures the GPIO pins for a STM32 UART/USART +// it gets called in the Windows_Devices_SerialCommunication_SerialDevice::NativeConfig function +// this is required because the UART/USART peripherals can use multiple GPIO configuration combinations +#define UART_CONFIG_PINS(num, gpio_port_tx, gpio_port_rx, tx_pin, rx_pin, alternate_function) \ + void ConfigPins_UART##num() \ + { \ + palSetPadMode(gpio_port_tx, tx_pin, PAL_MODE_ALTERNATE(alternate_function)); \ + palSetPadMode(gpio_port_rx, rx_pin, PAL_MODE_ALTERNATE(alternate_function)); \ + } + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// when a UART/USART is defined the declarations below will have the real function/configuration +// in the target folder @ target_windows_devices_serialcommunication_config.cpp +/////////////////////////////////////////////////////////////////////////////////////////////////// +void ConfigPins_UART1(); +void ConfigPins_UART2(); +void ConfigPins_UART3(); +void ConfigPins_UART4(); +void ConfigPins_UART5(); +void ConfigPins_UART6(); +void ConfigPins_UART7(); +void ConfigPins_UART8(); + +///////////////////////////////////// +// UART Tx buffers // +// these live in the target folder // +///////////////////////////////////// +extern uint8_t Uart1_TxBuffer[]; +extern uint8_t Uart2_TxBuffer[]; +extern uint8_t Uart3_TxBuffer[]; +extern uint8_t Uart4_TxBuffer[]; +extern uint8_t Uart5_TxBuffer[]; +extern uint8_t Uart6_TxBuffer[]; +extern uint8_t Uart7_TxBuffer[]; +extern uint8_t Uart8_TxBuffer[]; + +///////////////////////////////////// +// UART Rx buffers // +// these live in the target folder // +///////////////////////////////////// +extern uint8_t Uart1_RxBuffer[]; +extern uint8_t Uart2_RxBuffer[]; +extern uint8_t Uart3_RxBuffer[]; +extern uint8_t Uart4_RxBuffer[]; +extern uint8_t Uart5_RxBuffer[]; +extern uint8_t Uart6_RxBuffer[]; +extern uint8_t Uart7_RxBuffer[]; +extern uint8_t Uart8_RxBuffer[]; + +// the following macro defines a function that initializes an UART struct +// it gets called in the Windows_Devices_SerialCommunication_SerialDevice::NativeInit function + +#if defined(STM32F7XX) || defined(STM32F0XX) + +// STM32F7 and STM32F0 use UART driver v2 +#define UART_INIT(num, tx_buffer_size, rx_buffer_size) \ + void Init_UART##num() \ + { \ + Uart##num##_PAL.Uart_cfg.txend2_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.rxend_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.rxerr_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.timeout_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.timeout = 0; \ + Uart##num##_PAL.Uart_cfg.speed = 9600; \ + Uart##num##_PAL.Uart_cfg.cr1 = 0; \ + Uart##num##_PAL.Uart_cfg.cr2 = 0; \ + Uart##num##_PAL.Uart_cfg.cr3 = 0; \ + Uart##num##_PAL.TxBuffer = Uart##num##_TxBuffer; \ + Uart##num##_PAL.TxRingBuffer.Initialize(Uart##num##_PAL.TxBuffer, tx_buffer_size); \ + Uart##num##_PAL.TxOngoingCount = 0; \ + Uart##num##_PAL.RxBuffer = Uart##num##_RxBuffer; \ + Uart##num##_PAL.RxRingBuffer.Initialize(Uart##num##_PAL.RxBuffer, rx_buffer_size); \ + Uart##num##_PAL.WatchChar = 0; \ + } + +#else + +// all other STM32F use UART driver v1 which has a different UARTConfig struct +#define UART_INIT(num, tx_buffer_size, rx_buffer_size) \ + void Init_UART##num() \ + { \ + Uart##num##_PAL.Uart_cfg.txend2_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.rxend_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.rxerr_cb = NULL; \ + Uart##num##_PAL.Uart_cfg.speed = 9600; \ + Uart##num##_PAL.Uart_cfg.cr1 = 0; \ + Uart##num##_PAL.Uart_cfg.cr2 = 0; \ + Uart##num##_PAL.Uart_cfg.cr3 = 0; \ + Uart##num##_PAL.TxBuffer = Uart##num##_TxBuffer; \ + Uart##num##_PAL.TxRingBuffer.Initialize(Uart##num##_PAL.TxBuffer, tx_buffer_size); \ + Uart##num##_PAL.TxOngoingCount = 0; \ + Uart##num##_PAL.RxBuffer = Uart##num##_RxBuffer; \ + Uart##num##_PAL.RxRingBuffer.Initialize(Uart##num##_PAL.RxBuffer, rx_buffer_size); \ + Uart##num##_PAL.WatchChar = 0; \ + } + +#endif + +// when a UART/USART is defined the declarations below will have the real function/configuration +// in the target folder @ target_windows_devices_serialcommunication_config.cpp +void Init_UART1(); +void Init_UART2(); +void Init_UART3(); +void Init_UART4(); +void Init_UART5(); +void Init_UART6(); +void Init_UART7(); +void Init_UART8(); + +// the following macro defines a function that un initializes an UART struct +// it gets called in the Windows_Devices_SerialCommunication_SerialDevice::NativeDispose function +#define UART_UNINIT(num) \ + void UnInit_UART##num() \ + { \ + return; \ + } + +// when a UART/USART is defined the declarations below will have the real function/configuration +// in the target folder @ target_windows_devices_serialcommunication_config.cpp +void UnInit_UART1(); +void UnInit_UART2(); +void UnInit_UART3(); +void UnInit_UART4(); +void UnInit_UART5(); +void UnInit_UART6(); +void UnInit_UART7(); +void UnInit_UART8(); + +#endif //_WIN_DEV_SERIAL_NATIVE_TARGET_H_ diff --git a/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp b/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp index 6878f57917..b7489a9e96 100644 --- a/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp +++ b/targets/ChibiOS/_nanoCLR/Windows.Devices.Gpio/cpu_gpio.cpp @@ -43,8 +43,9 @@ bool IsValidGpioPin(GPIO_PIN pinNumber) return (pinNumber <= GPIO_MAX_PIN); } -static void DebounceTimerCallback(void *arg) +static void DebounceTimerCallback(virtual_timer_t *vtp, void *arg) { + (void)vtp; gpio_input_state *pState = (gpio_input_state *)arg; // get current pin state diff --git a/targets/ChibiOS/_nanoCLR/nanoFramework.Hardware.Stm32/nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory.cpp b/targets/ChibiOS/_nanoCLR/nanoFramework.Hardware.Stm32/nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory.cpp index 7a6ab762ad..44a47e0084 100644 --- a/targets/ChibiOS/_nanoCLR/nanoFramework.Hardware.Stm32/nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory.cpp +++ b/targets/ChibiOS/_nanoCLR/nanoFramework.Hardware.Stm32/nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory.cpp @@ -5,42 +5,44 @@ #include "nf_hardware_stm32_native.h" - -HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory::ReadBytes___STATIC__VOID__U4__SZARRAY_U1( CLR_RT_StackFrame& stack ) +HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory:: + ReadBytes___STATIC__VOID__U4__SZARRAY_U1(CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); uint32_t position = stack.Arg0().NumericByRef().u4; // dereference the data buffer from the argument - CLR_RT_HeapBlock_Array* buffer = stack.Arg1().DereferenceArray(); + CLR_RT_HeapBlock_Array *buffer = stack.Arg1().DereferenceArray(); // get a the pointer to the byffer by using the first element of the array - uint8_t* data = buffer->GetFirstElement(); + uint8_t *data = buffer->GetFirstElement(); // get the length of the data buffer - uint32_t dataLength = buffer->m_numOfElements; + uint32_t dataLength = buffer->m_numOfElements; // address of bkp register 0 - __IO uint32_t* baseAddress = &(RTC->BKP0R); - uint8_t* storeAddress = ((uint8_t*)baseAddress + position); - uint32_t* registerAddress = NULL; + __IO uint32_t *baseAddress = &(RTC->BKP0R); + uint8_t *storeAddress = ((uint8_t *)baseAddress + position); + uint32_t *registerAddress = NULL; uint32_t tempRegisterValue; uint32_t counter = 0; uint32_t remainder; int32_t index = 3; // sanity check for out of range position - if(position > (BACKUP_SIZE - 1) ) NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + if (position > (BACKUP_SIZE - 1)) + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); // sanity check for over sized data buffer - if( (position + dataLength) > BACKUP_SIZE) NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + if ((position + dataLength) > BACKUP_SIZE) + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); // check if the store address is starting at a register address boundary - remainder = (uint32_t)((uint32_t*)storeAddress) % sizeof(RTC_BKP0R_Msk); + remainder = (uint32_t)((uint32_t *)storeAddress) % sizeof(RTC_BKP0R_Msk); + registerAddress = (uint32_t *)(storeAddress - remainder); - if(remainder > 0) + if (remainder > 0) { // read register - registerAddress = (uint32_t*)(storeAddress - remainder); tempRegisterValue = *registerAddress; // adjust remainder to the amount of bytes to move @@ -48,17 +50,16 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo do { - *data = (uint8_t)(tempRegisterValue >> ( (remainder - 1) * 8)); + *data = (uint8_t)(tempRegisterValue >> ((remainder - 1) * 8)); data++; remainder--; counter++; - } - while(remainder && (counter < dataLength)); + } while (remainder && (counter < dataLength)); registerAddress++; } // keep reading into the buffer if there enough bytes - if( (dataLength - counter) >= 4) + if ((dataLength - counter) >= 4) { // load register tempRegisterValue = *registerAddress; @@ -69,13 +70,13 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo data++; counter++; - if(index < 0) + if (index < 0) { index = 3; registerAddress++; // is there enough data in buffer for another round - if( (dataLength - counter) < 4) + if ((dataLength - counter) < 4) { // no, exit loop break; @@ -84,35 +85,33 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo // load register tempRegisterValue = *registerAddress; } - } - while(1); + } while (1); } // now read the remaining bytes, if any - if((dataLength - counter) > 0) + if ((dataLength - counter) > 0) { remainder = dataLength - counter; - + // read register tempRegisterValue = *registerAddress; - // adjust remainder to the amount of bytes to move - remainder = 4 - remainder; - + int offset = 3; do { - *data = (uint8_t)(tempRegisterValue >> (remainder * 8)); + *data = (uint8_t)(tempRegisterValue >> (offset * 8)); remainder--; data++; counter++; - } - while(remainder); + offset--; + } while (remainder); } NANOCLR_NOCLEANUP(); } -HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory::WriteBytes___STATIC__VOID__U4__SZARRAY_U1( CLR_RT_StackFrame& stack ) +HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory:: + WriteBytes___STATIC__VOID__U4__SZARRAY_U1(CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); @@ -120,53 +119,62 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo uint32_t position = stack.Arg0().NumericByRef().u4; // dereference the data buffer from the argument - CLR_RT_HeapBlock_Array* buffer = stack.Arg1().DereferenceArray(); + CLR_RT_HeapBlock_Array *buffer = stack.Arg1().DereferenceArray(); // get a the pointer to the byffer by using the first element of the array - uint8_t* data = buffer->GetFirstElement(); + uint8_t *data = buffer->GetFirstElement(); // get the length of the data buffer - uint32_t dataLength = buffer->m_numOfElements; + uint32_t dataLength = buffer->m_numOfElements; // address of bkp register 0 - __IO uint32_t* baseAddress = &(RTC->BKP0R); - uint8_t* storeAddress = ((uint8_t*)baseAddress + position); - uint32_t* registerAddress = NULL; + __IO uint32_t *baseAddress = &(RTC->BKP0R); + uint8_t *storeAddress = ((uint8_t *)baseAddress + position); + uint32_t *registerAddress = NULL; uint32_t tempRegisterValue; uint32_t counter = 0; uint32_t remainder; int32_t index = 3; + uint32_t tempMask, tempLen; // sanity check for out of range position - if(position > (BACKUP_SIZE - 1) ) NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + if (position > (BACKUP_SIZE - 1)) + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); // sanity check for over sized data buffer - if( (position + dataLength) > BACKUP_SIZE) NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); + if ((position + dataLength) > BACKUP_SIZE) + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_RANGE); - // write has to be done register wide, so if a write address is "in the middle" of a register, need to read it first and overwrite as required - // this can happen at the begining and/or at the end of the buffer + // write has to be done register wide, so if a write address is "in the middle" of a register, need to read it first + // and overwrite as required this can happen at the begining and/or at the end of the buffer // check if the store address is starting at a register address boundary - remainder = (uint32_t)((uint32_t*)storeAddress) % sizeof(RTC_BKP0R_Msk); + remainder = (uint32_t)((uint32_t *)storeAddress) % sizeof(RTC_BKP0R_Msk); + registerAddress = (uint32_t *)(storeAddress - remainder); - if(remainder > 0) + if (remainder > 0) { // read register - registerAddress = (uint32_t*)(storeAddress - remainder); tempRegisterValue = *registerAddress; // adjust remainder to the amount of bytes to move remainder = 4 - remainder; // clear the bytes we'll be filling - tempRegisterValue &= (uint32_t)(0xFFFFFF00 << ( (remainder - 1) * 8)); + tempMask = 0x00000000; + tempLen = (dataLength > 2) ? 3 : (dataLength > 1) ? 2 : 1; + for (int i = remainder - 1; i >= 0 && tempLen > 0; i--, tempLen--) + { + tempMask |= (uint32_t)(0x000000FF << (i * 8)); + } + + tempRegisterValue &= ~tempMask; do { - tempRegisterValue |= (uint32_t)((uint32_t)*data << ( (remainder - 1) * 8)); + tempRegisterValue |= (uint32_t)((uint32_t)*data << ((remainder - 1) * 8)); remainder--; data++; counter++; - } - while(remainder && (counter < dataLength)); + } while (remainder && (counter < dataLength)); // write back register *registerAddress = tempRegisterValue; @@ -174,7 +182,7 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo } // keep processing the buffer if there enough bytes - if( (dataLength - counter) >= 4) + if ((dataLength - counter) >= 4) { // clear register *registerAddress = 0; @@ -185,13 +193,13 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo data++; counter++; - if(index < 0) + if (index < 0) { index = 3; registerAddress++; // is there enough data in buffer for another round - if( (dataLength - counter) < 4) + if ((dataLength - counter) < 4) { // no, exit loop break; @@ -200,32 +208,32 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo // clear register *registerAddress = 0; } - } - while(1); + } while (1); } // take care of the remaining bytes, if any - if((dataLength - counter) > 0) + if ((dataLength - counter) > 0) { remainder = dataLength - counter; - + // read register tempRegisterValue = *registerAddress; // clear the bytes we'll be filling - tempRegisterValue &= (uint32_t)(0x00FFFFFF >> ( (remainder - 1) * 8)); + tempRegisterValue &= (uint32_t)(0x00FFFFFF >> ((remainder - 1) * 8)); // adjust remainder to the amount of bytes to move remainder = 4 - remainder; + int offset = 3; do { - tempRegisterValue |= (uint32_t)((uint32_t)*data << (remainder * 8)); + tempRegisterValue |= (uint32_t)((uint32_t)*data << (offset * 8)); remainder--; data++; counter++; - } - while(remainder); + offset--; + } while (remainder); // write back register *registerAddress = tempRegisterValue; @@ -234,7 +242,8 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo NANOCLR_NOCLEANUP(); } -HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory::GetSize___STATIC__I4( CLR_RT_StackFrame& stack ) +HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemory::GetSize___STATIC__I4( + CLR_RT_StackFrame &stack) { NANOCLR_HEADER(); @@ -242,4 +251,3 @@ HRESULT Library_nf_hardware_stm32_native_nanoFramework_Hardware_Stm32_BackupMemo NANOCLR_NOCLEANUP_NOLABEL(); } - \ No newline at end of file diff --git a/targets/ChibiOS/_nanoCLR/targetHAL.cpp b/targets/ChibiOS/_nanoCLR/targetHAL.cpp index 54b4731767..ef83c39b99 100644 --- a/targets/ChibiOS/_nanoCLR/targetHAL.cpp +++ b/targets/ChibiOS/_nanoCLR/targetHAL.cpp @@ -26,6 +26,7 @@ #endif #if (HAL_USE_UART == TRUE) #include +#include #endif // global mutex protecting the internal state of the interpreter, including event flags diff --git a/targets/ChibiOS/_nanoCLR/targetPAL_Events.cpp b/targets/ChibiOS/_nanoCLR/targetPAL_Events.cpp index dc633a1504..0b2861dc3f 100644 --- a/targets/ChibiOS/_nanoCLR/targetPAL_Events.cpp +++ b/targets/ChibiOS/_nanoCLR/targetPAL_Events.cpp @@ -21,8 +21,9 @@ bool Events_Uninitialize_Platform() return true; } -static void local_Events_SetBoolTimer_Callback(void *arg) +static void local_Events_SetBoolTimer_Callback(virtual_timer_t *vtp, void *arg) { + (void)vtp; NATIVE_PROFILE_PAL_EVENTS(); bool *timerCompleteFlag = (bool *)arg; diff --git a/targets/ChibiOS/_nanoCLR/targetPAL_Time.cpp b/targets/ChibiOS/_nanoCLR/targetPAL_Time.cpp index 8ac76fee1b..aafa3ac1e7 100644 --- a/targets/ChibiOS/_nanoCLR/targetPAL_Time.cpp +++ b/targets/ChibiOS/_nanoCLR/targetPAL_Time.cpp @@ -13,8 +13,9 @@ static virtual_timer_t nextEventTimer; void* nextEventCallbackDummyArg = NULL; -static void NextEventTimer_Callback( void* arg ) +static void NextEventTimer_Callback(virtual_timer_t *vtp, void* arg ) { + (void)vtp; (void)arg; // this call also schedules the next one, if there is one diff --git a/targets/FreeRTOS/CMakeLists.txt b/targets/FreeRTOS/CMakeLists.txt index 9aa73f9ef3..321b6fd9f1 100644 --- a/targets/FreeRTOS/CMakeLists.txt +++ b/targets/FreeRTOS/CMakeLists.txt @@ -45,6 +45,7 @@ endif() # check if build was requested with a specifc FreeRTOS version if(RTOS_VERSION_EMPTY) # no FreeRTOS version actualy specified, must be empty which is fine, we'll default to a known good version + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS set(RTOS_VERSION "V10.4.1-kernel-only") endif() @@ -101,7 +102,8 @@ endif() # check if build was requested with a specifc CMSIS version if(CMSIS_VERSION_EMPTY) - # no CMSIS version actualy specified, must be empty which is fine, we'll default to a known good version + # no CMSIS version actualy specified, must be empty which is fine, we'll default to a known good version* + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS set(CMSIS_GIT_TAG "5.5.1") else() # set Git tag diff --git a/targets/FreeRTOS/NXP/NXP_MIMXRT1060_EVK/cmake-variants.json b/targets/FreeRTOS/NXP/NXP_MIMXRT1060_EVK/cmake-variants.json index 9e71a3ace8..dc3e615011 100644 --- a/targets/FreeRTOS/NXP/NXP_MIMXRT1060_EVK/cmake-variants.json +++ b/targets/FreeRTOS/NXP/NXP_MIMXRT1060_EVK/cmake-variants.json @@ -52,6 +52,7 @@ "API_Windows.Devices.Pwm": "OFF", "API_Windows.Devices.Wifi": "OFF", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_nanoFramework.ResourceManager": "ON", "API_nanoFramework.System.Collections": "ON", "API_System.Net": "ON", diff --git a/targets/FreeRTOS/NXP/_common/WireProtocol_HAL_Interface.c b/targets/FreeRTOS/NXP/_common/WireProtocol_HAL_Interface.c index 4105b7edda..2c002110d4 100644 --- a/targets/FreeRTOS/NXP/_common/WireProtocol_HAL_Interface.c +++ b/targets/FreeRTOS/NXP/_common/WireProtocol_HAL_Interface.c @@ -12,8 +12,6 @@ #include #include -WP_Message inboundMessage; - bool WP_Initialise(); static bool WP_Port_Intitialised = false; @@ -32,7 +30,6 @@ lpuart_rtos_config_t lpuart_config = { bool WP_Initialise() { - NVIC_SetPriority(BOARD_UART_IRQ, 5); lpuart_config.srcclk = BOARD_DebugConsoleSrcFreq(); @@ -49,37 +46,42 @@ bool WP_Initialise() return WP_Port_Intitialised; } -int WP_ReceiveBytes(uint8_t *ptr, uint16_t *size) +uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size) { // TODO: Initialise Port if not already done, Wire Protocol should be calling this directly at startup if (!WP_Port_Intitialised) + { WP_Initialise(); + } - // save for latter comparison - uint16_t requestedSize = *size; + // save for later comparison + uint32_t requestedSize = *size; - // int readData = 0; - // sanity check for request of 0 size + // check for request with 0 size if (*size) { size_t read = 0; - LPUART_RTOS_Receive(&handle, ptr, *size, &read); + LPUART_RTOS_Receive(&handle, ptr, requestedSize, &read); + + // check if any bytes where read + if (read == 0) + { + return false; + } ptr += read; *size -= read; - - // check if the requested read matches the actual read count - return (requestedSize == read); } return true; } -int WP_TransmitMessage(WP_Message *message) +uint8_t WP_TransmitMessage(WP_Message *message) { - if (!WP_Port_Intitialised) + { WP_Initialise(); + } if (kStatus_Success != LPUART_RTOS_Send(&handle, (uint8_t *)&message->m_header, sizeof(message->m_header))) { diff --git a/targets/FreeRTOS/NXP/_nanoBooter/WireProtocol_App_Interface.c b/targets/FreeRTOS/NXP/_nanoBooter/WireProtocol_App_Interface.c index ad24884476..38a7b3a959 100644 --- a/targets/FreeRTOS/NXP/_nanoBooter/WireProtocol_App_Interface.c +++ b/targets/FreeRTOS/NXP/_nanoBooter/WireProtocol_App_Interface.c @@ -4,15 +4,10 @@ // See LICENSE file in the project root for full license information. // -#include -#include #include -// Initialize to a packet sequence number impossible to encounter -static uint32_t lastPacketSequence = 0x00FEFFFF; - // defining this array here makes is local helping reduce the image size because of compiler opmitizations -static const CommandHandlerLookup c_Lookup_Request[] = { +const CommandHandlerLookup c_Lookup_Request[] = { /*******************************************************************************************************************************************************************/ #define DEFINE_CMD(cmd) \ { \ @@ -46,7 +41,7 @@ static const CommandHandlerLookup c_Lookup_Request[] = { //////////////////////////////////////////////////// // defining this array here makes is local helping reduce the image size because of compiler opmitizations -static const CommandHandlerLookup c_Lookup_Reply[] = { +const CommandHandlerLookup c_Lookup_Reply[] = { /*******************************************************************************************************************************************************************/ #define DEFINE_CMD(cmd) \ { \ @@ -57,54 +52,12 @@ static const CommandHandlerLookup c_Lookup_Reply[] = { /*******************************************************************************************************************************************************************/ }; -int Messaging_ProcessPayload(WP_Message *message) +uint8_t GetSizeOfLookup_Reply() { - // Prevent processing duplicate packets - if (message->m_header.m_seq == lastPacketSequence) - { - return false; // Do not even respond to a repeat packet - } - - // save this packet sequence number - lastPacketSequence = message->m_header.m_seq; - - if (message->m_header.m_flags & WP_Flags_c_NACK) - { - // - // Bad packet... - // - return true; - } - - size_t num; - const CommandHandlerLookup *cmd; - - if (message->m_header.m_flags & WP_Flags_c_Reply) - { - num = ARRAYSIZE(c_Lookup_Reply); - cmd = c_Lookup_Reply; - } - else - { - num = ARRAYSIZE(c_Lookup_Request); - cmd = c_Lookup_Request; - } - - while (num--) - { - if (cmd->command == message->m_header.m_cmd) - { - // execute command handler and save the result - int commandHandlerExecuteResult = ((int (*)(WP_Message *))cmd->handler)(message); - - WP_ReplyToCommand(message, commandHandlerExecuteResult, false, NULL, 0); - return true; - } - - cmd++; - } - - WP_ReplyToCommand(message, false, false, NULL, 0); + return ARRAYSIZE(c_Lookup_Reply); +} - return true; +uint8_t GetSizeOfLookup_Request() +{ + return ARRAYSIZE(c_Lookup_Request); } diff --git a/targets/FreeRTOS/NXP/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp b/targets/FreeRTOS/NXP/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp new file mode 100644 index 0000000000..e55a6fc9bb --- /dev/null +++ b/targets/FreeRTOS/NXP/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp @@ -0,0 +1,767 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#include "sys_io_ser_native_target.h" + +///////////////////////////////////////////////////////// +// UART PAL strucs delcared in win_dev_serial_native.h // +///////////////////////////////////////////////////////// + +static LPUART_Type *const lpuart_bases[] = LPUART_BASE_PTRS; + +// Static UART config/data structs. +static NF_PAL_UART Uart_PAL1, Uart_PAL2, Uart_PAL3, Uart_PAL4, Uart_PAL5, Uart_PAL6, Uart_PAL7, Uart_PAL8; + +// Array of pointers to above config UART structs. +NF_PAL_UART *const + Uart_PAL[]{NULL, &Uart_PAL1, &Uart_PAL2, &Uart_PAL3, &Uart_PAL4, &Uart_PAL5, &Uart_PAL6, &Uart_PAL7, &Uart_PAL8}; + +// Task firing up event after receiving wanted amount of bytes +static void vREvent(void *pvParameters) +{ + // This is main UART struct, holding config, handlers, and the rest of variables.d + (void)pvParameters; + uint32_t ulNotifiedValue; + + while (1) + { + xTaskNotifyWait( + pdFALSE, // Don't clear bits on entry. + 0xffffffff, // Clear all bits on exit. + &ulNotifiedValue, // Stores the notified value. + portMAX_DELAY); + + // Check is there event from task reading bytes. + if ((ulNotifiedValue & 0x02) != 0) + { + Events_Set(SYSTEM_EVENT_FLAG_COM_IN); + } + } +} + +// Task for transmitting data through blocking uart +static void vWEvent(void *pvParameters) +{ + uint32_t ulNotifiedValue; + uint8_t *uartNum_p = (uint8_t *)pvParameters; + uint8_t uartNum = *uartNum_p; + NF_PAL_UART *palUart = Uart_PAL[uartNum]; + + while (1) + { + xTaskNotifyWait( + pdFALSE, // Don't clear bits on entry. + 0xffffffff, // Clear all bits on exit. + &ulNotifiedValue, // Stores the notified value. + portMAX_DELAY); + + if ((ulNotifiedValue & 0x01) != 0) + { + LPUART_WriteBlocking(lpuart_bases[uartNum], palUart->xfer.data, palUart->xfer.dataSize); + Events_Set(SYSTEM_EVENT_FLAG_COM_OUT); + } + } +} + +static void UART_Handle(LPUART_Type *base, uint8_t uartNum) +{ + NATIVE_INTERRUPT_START + uint32_t status; + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + NF_PAL_UART *palUart = Uart_PAL[uartNum]; + + status = LPUART_GetStatusFlags(base); + + if (kLPUART_RxOverrunFlag & status) + { + + // Clear overrun flag, otherwise the RX does not work. + base->STAT |= 1U << LPUART_STAT_OR_SHIFT; + } + + if (kLPUART_RxDataRegFullFlag & status) + { + char byte = LPUART_ReadByte(base); + // push char to ring buffer + // don't care about the success of the operation, if it's full we are droping the char anyway + palUart->RxRingBuffer.Push((uint8_t)byte); + + // is there a read operation going on? + if (palUart->RxBytesToRead > 0) + { + // check if the requested bytes are available in the buffer + if (palUart->RxRingBuffer.Length() >= palUart->RxBytesToRead) + { + // reset Rx bytes to read count + palUart->RxBytesToRead = 0; + + // Notify task that we want to receive data. + xTaskNotifyFromISR(palUart->xRTaskToNotify, 0x02, eSetBits, &xHigherPriorityTaskWoken); + } + } + } + + portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + NATIVE_INTERRUPT_END +} + +// Override of the default MIMXRT1060 UART interrupt routines to simple UART_Handle function, which +// reads 1 byte of input data to RTOS stream buffer, if theres buffer overflow it drops data and clears interrupts. + +extern "C" +{ + // LPUART8 is currently used for debugging, disable it or will collide with debugger + // void LPUART1_IRQHandler(void) { UART_Handle(LPUART1, 1); } + void LPUART2_IRQHandler(void) + { + UART_Handle(LPUART2, 2); + } + void LPUART3_IRQHandler(void) + { + UART_Handle(LPUART3, 3); + } + void LPUART4_IRQHandler(void) + { + UART_Handle(LPUART4, 4); + } + void LPUART5_IRQHandler(void) + { + UART_Handle(LPUART5, 5); + } + void LPUART6_IRQHandler(void) + { + UART_Handle(LPUART6, 6); + } + void LPUART7_IRQHandler(void) + { + UART_Handle(LPUART7, 7); + } + void LPUART8_IRQHandler(void) + { + UART_Handle(LPUART8, 8); + } +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::get_BytesToRead___I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + + uint8_t uartNum = 0; + size_t read_count = 0; + + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0]))) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + palUart = Uart_PAL[uartNum]; + read_count = palUart->RxBytesToRead; + + stack.SetResult_U4(read_count); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeDispose___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + + uint8_t uartNum = 0; + LPUART_Type *base = NULL; + + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + base = lpuart_bases[uartNum]; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0])) || base == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + palUart = Uart_PAL[uartNum]; + + // Free ring buffers memory + free(palUart->TxBuffer); + free(palUart->RxBuffer); + + // Deinitialize device and delete FreeRTOS idle tasks + LPUART_Deinit(base); + vTaskDelete(palUart->xRTaskToNotify); + vTaskDelete(palUart->xWTaskToNotify); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeInit___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + status_t status = 0; + uint8_t uartNum = 0; + lpuart_config_t *config = NULL; + LPUART_Type *base = NULL; + + uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + config = &Uart_PAL[uartNum]->uartCfg; + base = lpuart_bases[uartNum]; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0])) || config == NULL || base == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + NF_PAL_UART *palUart = Uart_PAL[uartNum]; + + // Allocate memory for TX and RX circular buffer + palUart->TxBuffer = (uint8_t *)malloc(UART_TX_BUFER_SIZE * sizeof(uint8_t)); + if (palUart->TxBuffer == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + } + + palUart->RxBuffer = (uint8_t *)malloc(UART_RX_BUFER_SIZE * sizeof(uint8_t)); + if (palUart->RxBuffer == NULL) + { + free(palUart->TxBuffer); + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + } + + // Initialize TX and RX buffer + palUart->TxRingBuffer.Initialize(palUart->TxBuffer, UART_TX_BUFER_SIZE); + palUart->TxOngoingCount = 0; + palUart->WatchChar = 0; + palUart->RxRingBuffer.Initialize(palUart->RxBuffer, UART_RX_BUFER_SIZE); + palUart->RxBytesToRead = 0; + + // Get default config structure for initializing given UART peripheral and enable TX, RX + LPUART_GetDefaultConfig(config); + config->enableRx = true; + config->enableTx = true; + + // FreeRTOS Task needs parameter data survive after this function finish, so write this parameter to Uart_PAL + // structure. + palUart->uartNum = uartNum; + + // Enable RX interrupts + EnableIRQ((IRQn_Type)(19 + uartNum)); + NVIC_SetPriority((IRQn_Type)(19 + uartNum), UART_INTERRUPT_PRIO); + + // Initialize UART peripheral with default config + status = LPUART_Init(base, config, GetSrcFreq()); + if (status != kStatus_Success) + { + NANOCLR_SET_AND_LEAVE(CLR_E_IO); + } + + // Create idle task waiting for read/write. + BaseType_t xReturned = xTaskCreate( + vREvent, + "UART Read Event", + configMINIMAL_STACK_SIZE, + (void *)palUart, + configMAX_PRIORITIES - 1, + &palUart->xRTaskToNotify); + if (xReturned == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + } + + xReturned = xTaskCreate( + vWEvent, + "UART Read Event", + configMINIMAL_STACK_SIZE, + (void *)palUart, + configMAX_PRIORITIES, + &palUart->xWTaskToNotify); + if (xReturned == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + } + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeConfig___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + status_t status = 0; + uint8_t uartNum = 0; + lpuart_config_t *config = NULL; + LPUART_Type *base = NULL; + + uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + config = &Uart_PAL[uartNum]->uartCfg; + base = lpuart_bases[uartNum]; + + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0])) || config == NULL || base == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_IO); + } + + // Check RS485 mode is not selected as currently not supported + if ((SerialMode)pThis[FIELD___mode].NumericByRef().s4 != SerialMode_Normal) + { + NANOCLR_SET_AND_LEAVE(CLR_E_NOTIMPL); + } + + config->baudRate_Bps = (uint32_t)pThis[FIELD___baudRate].NumericByRef().s4; + + switch (pThis[FIELD___dataBits].NumericByRef().s4) + { + default: + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + case 7: + config->dataBitsCount = kLPUART_SevenDataBits; + break; + case 8: + config->dataBitsCount = kLPUART_EightDataBits; + break; + } + + switch (pThis[FIELD___parity].NumericByRef().s4) + { + default: + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + case Parity_None: + config->parityMode = kLPUART_ParityDisabled; + break; + case Parity_Even: + config->parityMode = kLPUART_ParityEven; + break; + case Parity_Odd: + config->parityMode = kLPUART_ParityOdd; + break; + } + + switch ((StopBits)pThis[FIELD___stopBits].NumericByRef().s4) + { + default: + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + break; + case StopBits_One: + config->stopBitCount = kLPUART_OneStopBit; + break; + case StopBits_Two: + config->stopBitCount = kLPUART_TwoStopBit; + break; + } + + // write config to UART peripheral + status = LPUART_Init(base, config, GetSrcFreq()); + if (status != kStatus_Success) + { + NANOCLR_SET_AND_LEAVE(CLR_E_IO); + } + + // Enable interrupts after setting configuration + // Disable transmitter and receiver + base->CTRL &= ~(1U << 19); + base->CTRL &= ~(1U << 18); + // Enable receiver interrupt + base->CTRL |= 1U << LPUART_CTRL_RIE_SHIFT; + // Enable receiver ovverun interrupt + base->CTRL |= 1U << LPUART_CTRL_ORIE_SHIFT; + // Renable transmitter and receiver + base->CTRL |= 1U << 19; + base->CTRL |= 1U << 18; + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeWrite___VOID__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + uint8_t *data = NULL; + uint8_t uartNum = 0; + size_t length = 0; + size_t count = 0; + size_t writeOffset = 0; + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // Get UART device number + uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0]))) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + NF_PAL_UART *palUart = Uart_PAL[uartNum]; + + // dereference the data buffer from the argument + CLR_RT_HeapBlock_Array *dataBuffer = stack.Arg1().DereferenceArray(); + writeOffset = stack.Arg2().NumericByRef().s4; + count = stack.Arg3().NumericByRef().s4; + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(writeOffset); + + // get the size of the buffer + length = (size_t)dataBuffer->m_numOfElements; + + if (count > length) + { + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // check if there is enough room in the buffer + if (palUart->TxRingBuffer.Capacity() - palUart->TxRingBuffer.Length() < length) + { + // not enough room in the buffer + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // push data to buffer + size_t bytesWritten = palUart->TxRingBuffer.Push(data, length); + + // check if all requested bytes were written + if (bytesWritten != length) + { + // not sure if this is the best exception to throw here... + NANOCLR_SET_AND_LEAVE(CLR_E_IO); + } + + // null pointers and vars + pThis = NULL; + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeStore___U4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + NF_PAL_UART *palUart = NULL; + + size_t length = 0; + + int64_t *timeoutTicks; + bool eventResult = true; + bool txOk = false; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + uint8_t uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0]))) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + palUart = Uart_PAL[uartNum]; + + // as we are transsmiting data, we can discard recive buffer + // assuming that we can't RX and TX simultaneously + size_t rx_size = 0; + palUart->RxRingBuffer.Push(1); + rx_size = palUart->RxRingBuffer.Length(); + palUart->RxRingBuffer.Pop(rx_size); + + // setup timeout from _writeTimeout field + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTimeSpan(pThis[FIELD___writeTimeout], timeoutTicks)); + + // push dummy length value onto the eval stack + // this is going to be used to store how many bytes where buffered to Tx + if (stack.m_customState == 1) + { + stack.PushValueI4(0); + // bump custom state so the read value above is pushed only once + stack.m_customState = 2; + } + + // check if there is anything the buffer + if (palUart->TxRingBuffer.Length() > 0) + { + // check if there is a TX operation ongoing + if (palUart->TxOngoingCount == 0) + { + // OK to Tx + txOk = true; + } + else + { + // need to wait for the ongoing operation to complete before starting a new one + } + } + + if (txOk) + { + // Optimize buffer for sequential reading + palUart->TxRingBuffer.OptimizeSequence(); + + // Get data length available in the buffer + length = palUart->TxRingBuffer.Length(); + + // Push to the stack how many bytes bytes where buffered for Tx + stack.m_evalStack[1].NumericByRef().s4 = length; + + // Set TX ongoing count + palUart->TxOngoingCount = length; + + // Set transfer structure to nano ring buffer + palUart->xfer.data = (uint8_t *)palUart->TxRingBuffer.Reader(); + palUart->xfer.dataSize = length; + // Notify task that we want to transmit data. + xTaskNotify(palUart->xWTaskToNotify, 0x01, eSetBits); + } + + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortOut, eventResult)); + + if (eventResult) + { + // Notify the task that the transmission is complete. + // pop elements from ring buffer, just pop + palUart->TxRingBuffer.Pop(palUart->TxOngoingCount); + + // reset Tx ongoing count + palUart->TxOngoingCount = 0; + + length = stack.m_evalStack[1].NumericByRef().s4; + } + else + { + palUart->TxRingBuffer.Pop(palUart->TxOngoingCount); + palUart->TxOngoingCount = 0; + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + + // pop length and timeout heap block from stack + stack.PopValue(); + stack.PopValue(); + + stack.SetResult_U4(length); + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeRead___U4__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + CLR_RT_HeapBlock_Array *dataBuffer = NULL; + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + int64_t *timeoutTicks; + + bool eventResult = true; + + uint8_t uartNum = 0; + size_t bytesRead = 0; + size_t bytesToRead = 0; + size_t readOffset = 0; + + uint8_t *data = NULL; + + size_t count = 0; + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + uartNum = pThis[FIELD___portIndex].NumericByRef().s4; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0]))) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + NF_PAL_UART *palUart = Uart_PAL[uartNum]; + + // dereference the data buffer from the argument + dataBuffer = stack.Arg1().DereferenceArray(); + // The offset to start filling the buffer + readOffset = stack.Arg2().NumericByRef().s4; + + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(readOffset); + + // get how many bytes are requested to read + count = stack.Arg3().NumericByRef().s4; + + CLR_RT_HeapBlock hbTimeout; + hbTimeout.SetInteger( + (CLR_INT64)pThis[FIELD___readTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + // setup timeout + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // Check what's avaliable in Rx ring buffer + if (palUart->RxRingBuffer.Length() >= count) + { + // read from Rx ring buffer + bytesToRead = count; + + // we have enough bytes, skip wait for event + eventResult = false; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + } + else + { + + if (stack.m_customState == 1) + { + + // not enough bytes available, have to read from UART + palUart->RxBytesToRead = count; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + + // don't read anything from the buffer yet + bytesToRead = 0; + } + } + + while (eventResult) + { + if (stack.m_customState == 1) + { + if (bytesToRead > 0) + { + // enough bytes available + eventResult = false; + } + else + { // need to read from the UART + // update custom state + stack.m_customState = 2; + } + } + else + { + // wait for event + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine + .WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortIn, eventResult)); + + if (!eventResult) + { + // event timeout + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + } + } + + if (bytesToRead > 0) + { + // pop the requested bytes from the ring buffer + bytesRead = palUart->RxRingBuffer.Pop(data, bytesToRead); + } + + // pop timeout heap block from stack and return how many bytes were read + stack.PopValue(); + + // return how many bytes were read + stack.SetResult_U4(bytesRead); + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeSetWatchChar___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + uint8_t uartNum; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Choose the driver for this SerialDevice + uartNum = (uint8_t)pThis[FIELD___portIndex].NumericByRef().s4; + + // Quit if parameters or device is invalid or out of range + if (uartNum >= (sizeof(Uart_PAL) / sizeof(Uart_PAL[0]))) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + palUart = Uart_PAL[uartNum]; + + // set watch char + palUart->WatchChar = (uint8_t)pThis[FIELD___watchChar].NumericByRef().u1; + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector___STATIC__STRING( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + char deviceSelectorString[41] = {0}; + int len = 0; + for (uint8_t i = 1; i < (sizeof(Uart_PAL) / sizeof(Uart_PAL[0])); i++) + { + if (Uart_PAL[i] != NULL) + { + char com[6] = "COM1,"; + com[3] = i + '0'; + len += 5; + strcat(deviceSelectorString, com); + } + } + // remove trailing comma + deviceSelectorString[len - 1] = 0; + + // because the caller is expecting a result to be returned + // we need set a return result in the stack argument using the appropriate SetResult according to the variable type + // (a string here) + stack.SetResult_String(deviceSelectorString); + + NANOCLR_NOCLEANUP_NOLABEL(); +} diff --git a/targets/FreeRTOS/NXP/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h b/targets/FreeRTOS/NXP/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h new file mode 100644 index 0000000000..3d18899b19 --- /dev/null +++ b/targets/FreeRTOS/NXP/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h @@ -0,0 +1,39 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#ifndef _SYS_IO_SER_NATIVE_ +#define _SYS_IO_SER_NATIVE_ + +#define UART_INTERRUPT_PRIO 4U + +#include "FreeRTOS.h" +#include +#include +#include + +#include "fsl_lpuart.h" + +typedef struct +{ + uint8_t uartNum; + + lpuart_config_t uartCfg; + lpuart_transfer_t xfer; + + HAL_RingBuffer TxRingBuffer; + uint8_t *TxBuffer; + uint16_t TxOngoingCount; + + HAL_RingBuffer RxRingBuffer; + uint8_t *RxBuffer; + uint16_t RxBytesToRead; + uint8_t WatchChar; + + TaskHandle_t xRTaskToNotify; + TaskHandle_t xWTaskToNotify; + +} NF_PAL_UART; + +#endif //_SYS_IO_SER_NATIVE_ diff --git a/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.SerialCommunication/win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDevice.cpp b/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.SerialCommunication/win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDevice.cpp index 67c0c5796b..67baf891b2 100644 --- a/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.SerialCommunication/win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDevice.cpp +++ b/targets/FreeRTOS/NXP/_nanoCLR/Windows.Devices.SerialCommunication/win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDevice.cpp @@ -65,84 +65,86 @@ static void vWEvent(void *pvParameters) } } -static void UART_Handle(LPUART_Type *base, uint8_t uartNum) -{ - NATIVE_INTERRUPT_START - uint32_t status; - BaseType_t xHigherPriorityTaskWoken = pdFALSE; - NF_PAL_UART *palUart = Uart_PAL[uartNum]; - - status = LPUART_GetStatusFlags(base); - - if (kLPUART_RxOverrunFlag & status) - { - - // Clear overrun flag, otherwise the RX does not work. - base->STAT |= 1U << LPUART_STAT_OR_SHIFT; - } - - if (kLPUART_RxDataRegFullFlag & status) - { - char byte = LPUART_ReadByte(base); - // push char to ring buffer - // don't care about the success of the operation, if it's full we are droping the char anyway - palUart->RxRingBuffer.Push((uint8_t)byte); - - // is there a read operation going on? - if (palUart->RxBytesToRead > 0) - { - // check if the requested bytes are available in the buffer - if (palUart->RxRingBuffer.Length() >= palUart->RxBytesToRead) - { - // reset Rx bytes to read count - palUart->RxBytesToRead = 0; - - // Notify task that we want to receive data. - xTaskNotifyFromISR(palUart->xRTaskToNotify, 0x02, eSetBits, &xHigherPriorityTaskWoken); - } - } - } - - portYIELD_FROM_ISR(xHigherPriorityTaskWoken); - NATIVE_INTERRUPT_END -} +// MOVED TO sys_io_ser_native_System_IO_Ports_SerialPort +// static void UART_Handle(LPUART_Type *base, uint8_t uartNum) +// { +// NATIVE_INTERRUPT_START +// uint32_t status; +// BaseType_t xHigherPriorityTaskWoken = pdFALSE; +// NF_PAL_UART *palUart = Uart_PAL[uartNum]; + +// status = LPUART_GetStatusFlags(base); + +// if (kLPUART_RxOverrunFlag & status) +// { + +// // Clear overrun flag, otherwise the RX does not work. +// base->STAT |= 1U << LPUART_STAT_OR_SHIFT; +// } + +// if (kLPUART_RxDataRegFullFlag & status) +// { +// char byte = LPUART_ReadByte(base); +// // push char to ring buffer +// // don't care about the success of the operation, if it's full we are droping the char anyway +// palUart->RxRingBuffer.Push((uint8_t)byte); + +// // is there a read operation going on? +// if (palUart->RxBytesToRead > 0) +// { +// // check if the requested bytes are available in the buffer +// if (palUart->RxRingBuffer.Length() >= palUart->RxBytesToRead) +// { +// // reset Rx bytes to read count +// palUart->RxBytesToRead = 0; + +// // Notify task that we want to receive data. +// xTaskNotifyFromISR(palUart->xRTaskToNotify, 0x02, eSetBits, &xHigherPriorityTaskWoken); +// } +// } +// } + +// portYIELD_FROM_ISR(xHigherPriorityTaskWoken); +// NATIVE_INTERRUPT_END +// } // Override of the default MIMXRT1060 UART interrupt routines to simple UART_Handle function, which // reads 1 byte of input data to RTOS stream buffer, if theres buffer overflow it drops data and clears interrupts. -extern "C" -{ - // LPUART8 is currently used for debugging, disable it or will collide with debugger - // void LPUART1_IRQHandler(void) { UART_Handle(LPUART1, 1); } - void LPUART2_IRQHandler(void) - { - UART_Handle(LPUART2, 2); - } - void LPUART3_IRQHandler(void) - { - UART_Handle(LPUART3, 3); - } - void LPUART4_IRQHandler(void) - { - UART_Handle(LPUART4, 4); - } - void LPUART5_IRQHandler(void) - { - UART_Handle(LPUART5, 5); - } - void LPUART6_IRQHandler(void) - { - UART_Handle(LPUART6, 6); - } - void LPUART7_IRQHandler(void) - { - UART_Handle(LPUART7, 7); - } - void LPUART8_IRQHandler(void) - { - UART_Handle(LPUART8, 8); - } -} +// MOVED TO sys_io_ser_native_System_IO_Ports_SerialPort +// extern "C" +// { +// // LPUART8 is currently used for debugging, disable it or will collide with debugger +// // void LPUART1_IRQHandler(void) { UART_Handle(LPUART1, 1); } +// void LPUART2_IRQHandler(void) +// { +// UART_Handle(LPUART2, 2); +// } +// void LPUART3_IRQHandler(void) +// { +// UART_Handle(LPUART3, 3); +// } +// void LPUART4_IRQHandler(void) +// { +// UART_Handle(LPUART4, 4); +// } +// void LPUART5_IRQHandler(void) +// { +// UART_Handle(LPUART5, 5); +// } +// void LPUART6_IRQHandler(void) +// { +// UART_Handle(LPUART6, 6); +// } +// void LPUART7_IRQHandler(void) +// { +// UART_Handle(LPUART7, 7); +// } +// void LPUART8_IRQHandler(void) +// { +// UART_Handle(LPUART8, 8); +// } +// } // Deinitialize serial port and allocated free memory HRESULT Library_win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDevice::NativeDispose___VOID( diff --git a/targets/FreeRTOS/_common/WireProtocol_ReceiverThread.c b/targets/FreeRTOS/_common/WireProtocol_ReceiverThread.c index 710fe11d92..02082be613 100644 --- a/targets/FreeRTOS/_common/WireProtocol_ReceiverThread.c +++ b/targets/FreeRTOS/_common/WireProtocol_ReceiverThread.c @@ -7,24 +7,19 @@ #include "task.h" #include "WireProtocol_HAL_Interface.h" -extern WP_Message inboundMessage; - -void WP_Message_Initialize(WP_Message *a); -void WP_Message_PrepareReception(WP_Message *a); -void WP_Message_Process(WP_Message *a); +void WP_Message_Process(); +void WP_Message_PrepareReception(); void ReceiverThread(void *argument) { (void)argument; + WP_Message_PrepareReception(); + // loop forever while (1) { - - WP_Message_Initialize(&inboundMessage); - WP_Message_PrepareReception(&inboundMessage); - - WP_Message_Process(&inboundMessage); + WP_Message_Process(); // Allow other tasks a chance to run taskYIELD(); @@ -32,3 +27,8 @@ void ReceiverThread(void *argument) // nothing to deinitialize or cleanup, so it's safe to return } + +void WP_Message_PrepareReception_Platform() +{ + // empty on purpose, nothing to configure +} diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/CMakeLists.txt b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/CMakeLists.txt index a6a1a92faf..ee88c58480 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/CMakeLists.txt +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/CMakeLists.txt @@ -32,6 +32,7 @@ add_subdirectory("nanoCLR") #add_subdirectory("Graphics") #endif() + ####################### # nanoCLR executable @@ -82,9 +83,21 @@ foreach( IDF_libraries ${PROJECT_LINK_LIBS} ) # Add psram workarounds for newlib if( "${LIBSHORT}" STREQUAL "newlib" ) - set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " ${ESP32_IDF_PATH}/components/newlib/lib/libc-psram-workaround.a " ) - set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " ${ESP32_IDF_PATH}/components/newlib/lib/libm-psram-workaround.a " ) - endif() + if(USE_PSRAM_FIX) + message("Build including newlib with PSRAM workarrounds") + set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " ${ESP32_IDF_PATH}/components/newlib/lib/libc-psram-workaround.a " ) + set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " ${ESP32_IDF_PATH}/components/newlib/lib/libm-psram-workaround.a " ) + add_compile_options("-mfix-esp32-psram-cache-issue") + target_compile_options(NanoApiLib PUBLIC "-mfix-esp32-psram-cache-issue") + if(USE_NETWORKING_OPTION) + target_compile_options(NetworkLib PUBLIC "-mfix-esp32-psram-cache-issue") + endif() + else() + message("Build including normal newlib (no psram work arounds)") + set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " ${ESP32_IDF_PATH}/components/newlib/lib/libc.a " ) + set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " ${ESP32_IDF_PATH}/components/newlib/lib/libm.a " ) + endif() + endif() set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -l${LIBSHORT} " ) @@ -95,7 +108,7 @@ foreach( IDF_libraries ${PROJECT_LINK_LIBS} ) if( "${LIBSHORT}" STREQUAL "bt" ) set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -L${ESP32_IDF_PATH}/components/bt/lib -lbtdm_app " ) endif() - + # Add options into LINK_FLAGS in same position as IDF link if( "${LIBSHORT}" STREQUAL "cxx" ) # Cxx Library needs an undefine @@ -107,7 +120,7 @@ foreach( IDF_libraries ${PROJECT_LINK_LIBS} ) set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -L ${ESP32_IDF_PATH}/components/esp32/lib -lcore -lrtc -lnet80211 -lpp -lwpa -lsmartconfig -lcoexist -lwps -lwpa2 -lespnow -lphy -lmesh") set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -L ${CMAKE_CURRENT_SOURCE_DIR} -T esp32_out.ld ") - set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -L ${ESP32_IDF_PATH}/components/esp32/ld -u ld_include_panic_highint_hdl -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld ") + set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -L ${ESP32_IDF_PATH}/components/esp32/ld -u ld_include_panic_highint_hdl -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld ") endif() @@ -122,7 +135,7 @@ if(USE_NETWORKING_OPTION) set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -L${CMAKE_CURRENT_BINARY_DIR} -lNetworkLib " ) endif() -set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--whole-archive -L${CMAKE_CURRENT_BINARY_DIR} -lNanoApiLib -Wl,--no-whole-archive " ) +set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--whole-archive -L${CMAKE_CURRENT_BINARY_DIR} -lNanoApiLib -Wl,--no-whole-archive " ) set_property(TARGET ${NANOCLR_PROJECT_NAME}.elf APPEND_STRING PROPERTY LINK_FLAGS " -lgcc -lstdc++ -lgcov -Wl,--end-group -Wl,-EL ") @@ -168,7 +181,6 @@ target_compile_definitions(${NANOCLR_PROJECT_NAME}.elf PUBLIC "-DPLATFORM_ESP32 # ESP32 has FPU target_compile_definitions(NanoApiLib PUBLIC "-DPLATFORM_ESP32 -DUSE_FPU=TRUE ") - # build types that have debugging capabilities AND are NOT RTM have to have the define 'NANOCLR_ENABLE_SOURCELEVELDEBUGGING' if((NOT NF_BUILD_RTM) OR NF_FEATURE_DEBUGGER) target_compile_definitions(${NANOCLR_PROJECT_NAME}.elf PUBLIC "-DNANOCLR_ENABLE_SOURCELEVELDEBUGGING ") diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/CMakeLists.txt b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/CMakeLists.txt index 2f352803c7..0d2254d162 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/CMakeLists.txt +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/CMakeLists.txt @@ -3,7 +3,41 @@ # See LICENSE file in the project root for full license information. # -# Fix issue in IDF 3.3.1 where cpu.h gives a compile error +option(USE_PSRAM_FIX "Enable ESP32 psram fix" OFF) + +message("") + +# Select build variant +if(${TARGET_VARIANT} STREQUAL "BLE") + message("-- *** ESP32 BLE variant selected ***") + message("-- *** Support for BLE, no PSRAM support ***") + message("-- *** Suitable for ESP32 versions 1 to 3 ***") + set( ESP32_VARIANT_LIBRARY "_BLE") +elseif(${TARGET_VARIANT} STREQUAL "V3") + message("-- *** ESP32 V3 only variant selected ***") + message("-- *** Support for PSRAM and BLE ***") + message("-- *** Suitable for ESP32 version 3 only ***") + set( ESP32_VARIANT_LIBRARY "_V3") +else() + message("-- *** ESP32 generic variant selected ***") + message("-- *** Support for PSRAM with fixes ***") + message("-- *** Suitable for ESP32 versions 1 to 3 ***") + set( ESP32_VARIANT_LIBRARY "") + set( USE_PSRAM_FIX ON CACHE INTERNAL "Esp32 Psram fix enabled") + if (USE_ESP32_BLE) + set( USE_ESP32_BLE OFF CACHE INTERNAL "Make sure BLE is off" ) + message("-- *** BLE disabled as no room in generic build ***") + endif() +endif() + +message("") + +set ( ESP32_LIBS_PATH "${ESP32_LIBS_PATH}${ESP32_VARIANT_LIBRARY}") +message("-- *** Using library path:${ESP32_LIBS_PATH} ***") + +message("") + +# Fix issue in IDF 3.3.5 where cpu.h gives a compile error file(COPY "cpu.h" DESTINATION "${ESP32_IDF_PATH}/components/soc/esp32/include/soc/") @@ -316,7 +350,7 @@ list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libapp_trace.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libapp_update.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libasio.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libaws_iot.a) -#list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libbootloader_support.a) +list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libbootloader_support.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libbt.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libcoap.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libconsole.a) @@ -347,11 +381,12 @@ list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libjsmn.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libjson.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/liblibsodium.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/liblog.a) -# list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libmbedtls.a) +list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libmbedtls.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libmdns.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libmicro-ecc.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libmqtt.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libnewlib.a) +list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libnimble.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libnghttp.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libnvs_flash.a) # list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libopenssl.a) @@ -372,7 +407,6 @@ list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libwear_levelling.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libwifi_provisioning.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libwpa_supplicant.a) list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libxtensa-debug-module.a) -list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/libbootloader_support.a) # Lwip lib is built separately #list(APPEND DIRECT_LINK_LIBS ${DIRECT_LINK_PATH}/liblwip.a) diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/CopyLibs.cmd b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32/CopyLibs.cmd similarity index 98% rename from targets/FreeRTOS_ESP32/ESP32_WROOM_32/CopyLibs.cmd rename to targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32/CopyLibs.cmd index f1580dd6a6..e849cebde8 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/CopyLibs.cmd +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32/CopyLibs.cmd @@ -1,6 +1,6 @@ echo off -SET idfVer=3.3.1 +SET idfVer=3.3.5 SET targetDir=c:\Esp32_tools\libs-v%idfVer% echo Copy IDF libraries to %targetDir% @@ -58,6 +58,7 @@ copy /Y build\micro-ecc\libmicro-ecc.a %targetDir% copy /Y build\mqtt\libmqtt.a %targetDir% copy /Y build\newlib\libnewlib.a %targetDir% +copy /Y build\nimble\libnimble.a %targetDir% copy /Y build\nghttp\libnghttp.a %targetDir% copy /Y build\nvs_flash\libnvs_flash.a %targetDir% diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32/sdkconfig b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32/sdkconfig new file mode 100644 index 0000000000..6e7efc7352 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32/sdkconfig @@ -0,0 +1,827 @@ +# +# Automatically generated file; DO NOT EDIT. +# Espressif IoT Development Framework Configuration +# +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 + +# +# SDK tool configuration +# +CONFIG_TOOLPREFIX="xtensa-esp32-elf-" +CONFIG_PYTHON="python" +CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +CONFIG_APP_EXCLUDE_PROJECT_VER_VAR= +CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR= +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 + +# +# Bootloader config +# +CONFIG_LOG_BOOTLOADER_LEVEL_NONE= +CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= +CONFIG_LOG_BOOTLOADER_LEVEL_WARN= +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= +CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= +CONFIG_LOG_BOOTLOADER_LEVEL=3 +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +CONFIG_BOOTLOADER_FACTORY_RESET= +CONFIG_BOOTLOADER_APP_TEST= +CONFIG_BOOTLOADER_WDT_ENABLE=y +CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE= +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +CONFIG_APP_ROLLBACK_ENABLE= + +# +# Security features +# +CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT= +CONFIG_SECURE_BOOT_ENABLED= +CONFIG_FLASH_ENCRYPTION_ENABLED= + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_PORT="COM4" +CONFIG_ESPTOOLPY_BAUD_115200B= +CONFIG_ESPTOOLPY_BAUD_230400B= +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD_2MB= +CONFIG_ESPTOOLPY_BAUD_OTHER= +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_FLASHMODE_QIO= +CONFIG_FLASHMODE_QOUT= +CONFIG_FLASHMODE_DIO=y +CONFIG_FLASHMODE_DOUT= +CONFIG_ESPTOOLPY_FLASHMODE="dio" +CONFIG_ESPTOOLPY_FLASHFREQ_80M= +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_26M= +CONFIG_ESPTOOLPY_FLASHFREQ_20M= +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_FLASHSIZE_1MB= +CONFIG_ESPTOOLPY_FLASHSIZE_2MB= +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE_8MB= +CONFIG_ESPTOOLPY_FLASHSIZE_16MB= +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +CONFIG_ESPTOOLPY_BEFORE_NORESET= +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +CONFIG_ESPTOOLPY_AFTER_NORESET= +CONFIG_ESPTOOLPY_AFTER="hard_reset" +CONFIG_MONITOR_BAUD_9600B= +CONFIG_MONITOR_BAUD_57600B= +CONFIG_MONITOR_BAUD_115200B= +CONFIG_MONITOR_BAUD_230400B= +CONFIG_MONITOR_BAUD_921600B=y +CONFIG_MONITOR_BAUD_2MB= +CONFIG_MONITOR_BAUD_OTHER= +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=921600 + +# +# Example Configuration +# +CONFIG_BLINK_GPIO=5 + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +CONFIG_PARTITION_TABLE_TWO_OTA= +CONFIG_PARTITION_TABLE_CUSTOM= +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y + +# +# Compiler options +# +CONFIG_OPTIMIZATION_LEVEL_DEBUG=y +CONFIG_OPTIMIZATION_LEVEL_RELEASE= +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= +CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= +CONFIG_CXX_EXCEPTIONS= +CONFIG_STACK_CHECK_NONE=y +CONFIG_STACK_CHECK_NORM= +CONFIG_STACK_CHECK_STRONG= +CONFIG_STACK_CHECK_ALL= +CONFIG_STACK_CHECK= +CONFIG_WARN_WRITE_STRINGS= +CONFIG_DISABLE_GCC8_WARNINGS= + +# +# Component config +# + +# +# Application Level Tracing +# +CONFIG_ESP32_APPTRACE_DEST_TRAX= +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_ENABLE= +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_AWS_IOT_SDK=y +CONFIG_AWS_IOT_MQTT_HOST="" +CONFIG_AWS_IOT_MQTT_PORT=8883 +CONFIG_AWS_IOT_MQTT_TX_BUF_LEN=512 +CONFIG_AWS_IOT_MQTT_RX_BUF_LEN=512 +CONFIG_AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS=5 +CONFIG_AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL=1000 +CONFIG_AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL=128000 + +# +# Thing Shadow +# +CONFIG_AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER= +CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES=80 +CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS=10 +CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES=10 +CONFIG_AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED=120 +CONFIG_AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME=60 +CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME=20 + +# +# Bluetooth +# +CONFIG_BT_ENABLED= +CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 +CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF= +CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF= +CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 +CONFIG_BT_RESERVE_DRAM=0 +CONFIG_BLE_MESH= + +# +# Driver configurations +# + +# +# ADC configuration +# +CONFIG_ADC_FORCE_XPD_FSM= +CONFIG_ADC2_DISABLE_DAC= + +# +# SPI configuration +# +CONFIG_SPI_MASTER_IN_IRAM=y +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +CONFIG_SPI_SLAVE_IN_IRAM=y +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y + +# +# CAN Configuration +# +CONFIG_CAN_ISR_IN_IRAM= + +# +# eFuse Bit Manager +# +CONFIG_EFUSE_CUSTOM_TABLE= +CONFIG_EFUSE_VIRTUAL= +CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE= +CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y +CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT= +CONFIG_EFUSE_MAX_BLK_LEN=192 + +# +# ESP32-specific +# +CONFIG_IDF_TARGET_ESP32=y +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_REV_MIN_0=y +CONFIG_ESP32_REV_MIN_1= +CONFIG_ESP32_REV_MIN_2= +CONFIG_ESP32_REV_MIN_3= +CONFIG_ESP32_REV_MIN=0 +CONFIG_ESP32_DPORT_WORKAROUND=y +CONFIG_ESP32_DEFAULT_CPU_FREQ_80= +CONFIG_ESP32_DEFAULT_CPU_FREQ_160= +CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 +CONFIG_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +CONFIG_SPIRAM_BOOT_INIT=y +CONFIG_SPIRAM_IGNORE_NOTFOUND=y +CONFIG_SPIRAM_USE_MEMMAP= +CONFIG_SPIRAM_USE_CAPS_ALLOC= +CONFIG_SPIRAM_USE_MALLOC=y +CONFIG_SPIRAM_TYPE_AUTO=y +CONFIG_SPIRAM_TYPE_ESPPSRAM32= +CONFIG_SPIRAM_TYPE_ESPPSRAM64= +CONFIG_SPIRAM_SIZE=-1 +CONFIG_SPIRAM_SPEED_40M=y +CONFIG_SPIRAM_MEMTEST=y +CONFIG_SPIRAM_CACHE_WORKAROUND=y +CONFIG_SPIRAM_BANKSWITCH_ENABLE=y +CONFIG_SPIRAM_BANKSWITCH_RESERVE=8 +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 +CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST= +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY= +CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY= + +# +# PSRAM clock and cs IO for ESP32-DOWD +# +CONFIG_D0WD_PSRAM_CLK_IO=17 +CONFIG_D0WD_PSRAM_CS_IO=16 + +# +# PSRAM clock and cs IO for ESP32-D2WD +# +CONFIG_D2WD_PSRAM_CLK_IO=9 +CONFIG_D2WD_PSRAM_CS_IO=10 + +# +# PSRAM clock and cs IO for ESP32-PICO +# +CONFIG_PICO_PSRAM_CS_IO=10 +CONFIG_SPIRAM_SPIWP_SD3_PIN=7 +CONFIG_SPIRAM_2T_MODE= +CONFIG_MEMMAP_TRACEMEM= +CONFIG_MEMMAP_TRACEMEM_TWOBANKS= +CONFIG_ESP32_TRAX= +CONFIG_TRACEMEM_RESERVE_DRAM=0x0 +CONFIG_TWO_UNIVERSAL_MAC_ADDRESS= +CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y +CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_IPC_TASK_STACK_SIZE=1024 +CONFIG_TIMER_TASK_STACK_SIZE=3584 +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= +CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF= +CONFIG_NEWLIB_STDIN_LINE_ENDING_LF= +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +CONFIG_NEWLIB_NANO_FORMAT= +CONFIG_CONSOLE_UART_DEFAULT=y +CONFIG_CONSOLE_UART_CUSTOM= +CONFIG_CONSOLE_UART_NONE= +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_RESERVE_MEM=512 +CONFIG_ESP32_PANIC_PRINT_HALT= +CONFIG_ESP32_PANIC_PRINT_REBOOT=y +CONFIG_ESP32_PANIC_SILENT_REBOOT= +CONFIG_ESP32_PANIC_GDBSTUB= +CONFIG_ESP32_DEBUG_OCDAWARE=y +CONFIG_ESP32_DEBUG_STUBS_ENABLE=y +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y +CONFIG_TASK_WDT= +CONFIG_BROWNOUT_DET=y +CONFIG_BROWNOUT_DET_LVL_SEL_0=y +CONFIG_BROWNOUT_DET_LVL_SEL_1= +CONFIG_BROWNOUT_DET_LVL_SEL_2= +CONFIG_BROWNOUT_DET_LVL_SEL_3= +CONFIG_BROWNOUT_DET_LVL_SEL_4= +CONFIG_BROWNOUT_DET_LVL_SEL_5= +CONFIG_BROWNOUT_DET_LVL_SEL_6= +CONFIG_BROWNOUT_DET_LVL_SEL_7= +CONFIG_BROWNOUT_DET_LVL=0 +CONFIG_REDUCE_PHY_TX_POWER=y +CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y +CONFIG_ESP32_TIME_SYSCALL_USE_RTC= +CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= +CONFIG_ESP32_TIME_SYSCALL_USE_NONE= +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y +CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= +CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC= +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256= +CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 +CONFIG_ESP32_XTAL_FREQ_40= +CONFIG_ESP32_XTAL_FREQ_26= +CONFIG_ESP32_XTAL_FREQ_AUTO=y +CONFIG_ESP32_XTAL_FREQ=0 +CONFIG_DISABLE_BASIC_ROM_CONSOLE= +CONFIG_NO_BLOBS= +CONFIG_ESP_TIMER_PROFILING= +CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS= +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0 +CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16 +CONFIG_ESP32_WIFI_CSI_ENABLED= +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1= +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE= +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT= + +# +# PHY +# +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION= +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 + +# +# Power Management +# +CONFIG_PM_ENABLE=y +CONFIG_PM_DFS_INIT_AUTO= +CONFIG_PM_USE_RTC_TIMER_REF= +CONFIG_PM_PROFILING= +CONFIG_PM_TRACE= + +# +# ADC-Calibration +# +CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y +CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y +CONFIG_ADC_CAL_LUT_ENABLE=y + +# +# Event Loop Library +# +CONFIG_EVENT_LOOP_PROFILING= + +# +# ESP HTTP client +# +CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y +CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH= + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +CONFIG_HTTPD_LOG_PURGE_DATA= + +# +# ESP HTTPS OTA +# +CONFIG_OTA_ALLOW_HTTP= + +# +# Core dump +# +CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= +CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_ENABLE_COREDUMP= + +# +# Ethernet +# +CONFIG_DMA_RX_BUF_NUM=10 +CONFIG_DMA_TX_BUF_NUM=10 +CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE= +CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000 +CONFIG_EMAC_TASK_PRIORITY=20 +CONFIG_EMAC_TASK_STACK_SIZE=3072 + +# +# FAT Filesystem support +# +CONFIG_FATFS_CODEPAGE_DYNAMIC= +CONFIG_FATFS_CODEPAGE_437=y +CONFIG_FATFS_CODEPAGE_720= +CONFIG_FATFS_CODEPAGE_737= +CONFIG_FATFS_CODEPAGE_771= +CONFIG_FATFS_CODEPAGE_775= +CONFIG_FATFS_CODEPAGE_850= +CONFIG_FATFS_CODEPAGE_852= +CONFIG_FATFS_CODEPAGE_855= +CONFIG_FATFS_CODEPAGE_857= +CONFIG_FATFS_CODEPAGE_860= +CONFIG_FATFS_CODEPAGE_861= +CONFIG_FATFS_CODEPAGE_862= +CONFIG_FATFS_CODEPAGE_863= +CONFIG_FATFS_CODEPAGE_864= +CONFIG_FATFS_CODEPAGE_865= +CONFIG_FATFS_CODEPAGE_866= +CONFIG_FATFS_CODEPAGE_869= +CONFIG_FATFS_CODEPAGE_932= +CONFIG_FATFS_CODEPAGE_936= +CONFIG_FATFS_CODEPAGE_949= +CONFIG_FATFS_CODEPAGE_950= +CONFIG_FATFS_CODEPAGE=437 +CONFIG_FATFS_LFN_NONE= +CONFIG_FATFS_LFN_HEAP=y +CONFIG_FATFS_LFN_STACK= +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_API_ENCODING_ANSI_OEM=y +CONFIG_FATFS_API_ENCODING_UTF_16= +CONFIG_FATFS_API_ENCODING_UTF_8= +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y +CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y + +# +# Modbus configuration +# +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT= +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +CONFIG_MB_TIMER_PORT_ENABLED=y +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 + +# +# FreeRTOS +# +CONFIG_FREERTOS_UNICORE= +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_CORETIMER_0=y +CONFIG_FREERTOS_CORETIMER_1= +CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL= +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= +CONFIG_FREERTOS_ASSERT_DISABLE= +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +CONFIG_FREERTOS_LEGACY_HOOKS= +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_SUPPORT_STATIC_ALLOCATION=y +CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK= +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_USE_TRACE_FACILITY= +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= +CONFIG_FREERTOS_USE_TICKLESS_IDLE= +CONFIG_FREERTOS_DEBUG_INTERNALS= +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE= + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +CONFIG_HEAP_POISONING_LIGHT= +CONFIG_HEAP_POISONING_COMPREHENSIVE= +CONFIG_HEAP_TRACING= + +# +# libsodium +# + +# +# Log output +# +CONFIG_LOG_DEFAULT_LEVEL_NONE= +CONFIG_LOG_DEFAULT_LEVEL_ERROR= +CONFIG_LOG_DEFAULT_LEVEL_WARN= +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_LOG_DEFAULT_LEVEL_DEBUG= +CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_COLORS=y + +# +# LWIP +# +CONFIG_L2_TO_L3_COPY= +CONFIG_ETHARP_SUPPORT_VLAN=y +CONFIG_LWIP_IRAM_OPTIMIZATION= +CONFIG_LWIP_MAX_SOCKETS=10 +CONFIG_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS=y +CONFIG_USE_ONLY_LWIP_SELECT= +CONFIG_LWIP_SO_LINGER= +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +CONFIG_LWIP_SO_RCVBUF=y +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +CONFIG_LWIP_IP4_REASSEMBLY= +CONFIG_LWIP_IP6_REASSEMBLY= +CONFIG_LWIP_STATS= +CONFIG_LWIP_ETHARP_TRUST_IP_MAC= +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +CONFIG_LWIP_DHCP_RESTORE_LAST_IP= + +# +# DHCP server +# +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +CONFIG_LWIP_AUTOIP= +CONFIG_LWIP_IPV6_AUTOCONFIG= +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_TCP_ISN_HOOK=y +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=6 +CONFIG_TCP_MSS=1436 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= +CONFIG_TCP_OVERSIZE_MSS=y +CONFIG_TCP_OVERSIZE_QUARTER_MSS= +CONFIG_TCP_OVERSIZE_DISABLE= +CONFIG_LWIP_TCP_RTO_TIME=1500 + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=2048 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +CONFIG_TCPIP_TASK_AFFINITY_CPU0= +CONFIG_TCPIP_TASK_AFFINITY_CPU1= +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +CONFIG_PPP_SUPPORT= + +# +# ICMP +# +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING= + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 + +# +# SNTP +# +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC= +CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC= +CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC= +CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN= +CONFIG_MBEDTLS_DEBUG= +CONFIG_MBEDTLS_ECP_RESTARTABLE=y +CONFIG_MBEDTLS_CMAC_C=y +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_MPI_USE_INTERRUPT= +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_HAVE_TIME=y +CONFIG_MBEDTLS_HAVE_TIME_DATE=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +CONFIG_MBEDTLS_TLS_SERVER_ONLY= +CONFIG_MBEDTLS_TLS_CLIENT_ONLY= +CONFIG_MBEDTLS_TLS_DISABLED= +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +CONFIG_MBEDTLS_PSK_MODES= +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +CONFIG_MBEDTLS_SSL_PROTO_SSL3= +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +CONFIG_MBEDTLS_SSL_PROTO_DTLS= +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +CONFIG_MBEDTLS_CAMELLIA_C= +CONFIG_MBEDTLS_DES_C= +CONFIG_MBEDTLS_RC4_DISABLED=y +CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= +CONFIG_MBEDTLS_RC4_ENABLED= +CONFIG_MBEDTLS_BLOWFISH_C= +CONFIG_MBEDTLS_XTEA_C= +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +CONFIG_MBEDTLS_RIPEMD160_C=y + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +CONFIG_MQTT_USE_CUSTOM_CONFIG= +CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED= +CONFIG_MQTT_CUSTOM_OUTBOX= + +# +# NVS +# + +# +# OpenSSL +# +CONFIG_OPENSSL_DEBUG= +CONFIG_OPENSSL_ASSERT_DO_NOTHING=y +CONFIG_OPENSSL_ASSERT_EXIT= + +# +# PThreads +# +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0= +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1= +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" + +# +# SPI Flash driver +# +CONFIG_SPI_FLASH_VERIFY_WRITE= +CONFIG_SPI_FLASH_ENABLE_COUNTERS= +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +CONFIG_SPIFFS_CACHE_STATS= +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +CONFIG_SPIFFS_GC_STATS= +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +CONFIG_SPIFFS_DBG= +CONFIG_SPIFFS_API_DBG= +CONFIG_SPIFFS_GC_DBG= +CONFIG_SPIFFS_CACHE_DBG= +CONFIG_SPIFFS_CHECK_DBG= +CONFIG_SPIFFS_TEST_VISUALISATION= + +# +# TCP/IP Adapter +# +CONFIG_IP_LOST_TIMER_INTERVAL=120 +CONFIG_TCPIP_LWIP=y + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +CONFIG_UNITY_ENABLE_COLOR= +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +CONFIG_UNITY_ENABLE_FIXTURE= + +# +# Virtual file system +# +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y + +# +# Wear Levelling +# +CONFIG_WL_SECTOR_SIZE_512= +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 + +# +# Supplicant +# +CONFIG_WPA_WPS_WARS= +CONFIG_WPA_DEBUG_PRINT= diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32BLE/CopyLibs.cmd b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32BLE/CopyLibs.cmd new file mode 100644 index 0000000000..806f8206b3 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32BLE/CopyLibs.cmd @@ -0,0 +1,90 @@ +echo off + +SET idfVer=3.3.5 +SET targetDir=c:\Esp32_tools\libs-v%idfVer%_BLE + +echo Copy IDF libraries to %targetDir% + +rmdir /S /Q %targetDir% +mkdir %targetDir% + + +copy /Y build\bootloader\bootloader.bin %targetDir% + +copy /Y build\app_trace\libapp_trace.a %targetDir% +copy /Y build\app_update\libapp_update.a %targetDir% +copy /Y build\asio\libasio.a %targetDir% +copy /Y build\aws_iot\libaws_iot.a %targetDir% +copy /Y build\bootloader\bootloader_support\libbootloader_support.a %targetDir% + +copy /Y build\bt\libbt.a %targetDir% + +copy /Y build\coap\libcoap.a %targetDir% +copy /Y build\console\libconsole.a %targetDir% + +copy /Y build\cxx\libcxx.a %targetDir% +copy /Y build\driver\libdriver.a %targetDir% +copy /Y build\efuse\libefuse.a %targetDir% +copy /Y build\esp-tls\libesp-tls.a %targetDir% +copy /Y build\esp32\libesp32.a %targetDir% + +copy /Y build\esp_adc_cal\libesp_adc_cal.a %targetDir% +copy /Y build\esp_event\libesp_event.a %targetDir% + +copy /Y build\esp_http_client\libesp_http_client.a %targetDir% +copy /Y build\esp_http_server\libesp_http_server.a %targetDir% + +copy /Y build\esp_https_ota\libesp_https_ota.a %targetDir% +copy /Y build\esp_https_server\libesp_https_server.a %targetDir% +copy /Y build\esp_ringbuf\libesp_ringbuf.a %targetDir% +copy /Y build\espcoredump\libespcoredump.a %targetDir% +copy /Y build\ethernet\libethernet.a %targetDir% +copy /Y build\expat\libexpat.a %targetDir% +copy /Y build\fatfs\libfatfs.a %targetDir% +copy /Y build\freemodbus\libfreemodbus.a %targetDir% +copy /Y build\freertos\libfreertos.a %targetDir% +copy /Y build\heap\libheap.a %targetDir% +copy /Y build\idf_test\libidf_test.a %targetDir% +copy /Y build\jsmn\libjsmn.a %targetDir% +copy /Y build\json\libjson.a %targetDir% +copy /Y build\libsodium\liblibsodium.a %targetDir% +copy /Y build\log\liblog.a %targetDir% + +copy /Y build\main\libmain.a %targetDir% +copy /Y build\lwip\liblwip.a %targetDir% +copy /Y build\mbedtls\libmbedtls.a %targetDir% +copy /Y build\mdns\libmdns.a %targetDir% +copy /Y build\micro-ecc\libmicro-ecc.a %targetDir% +copy /Y build\mqtt\libmqtt.a %targetDir% + +copy /Y build\newlib\libnewlib.a %targetDir% +copy /Y build\nimble\libnimble.a %targetDir% + +copy /Y build\nghttp\libnghttp.a %targetDir% +copy /Y build\nvs_flash\libnvs_flash.a %targetDir% +copy /Y build\openssl\libopenssl.a %targetDir% + +copy /Y build\protobuf-c\libprotobuf-c.a %targetDir% +copy /Y build\protocomm\libprotocomm.a %targetDir% +copy /Y build\pthread\libpthread.a %targetDir% +copy /Y build\sdmmc\libsdmmc.a %targetDir% +copy /Y build\smartconfig_ack\libsmartconfig_ack.a %targetDir% +copy /Y build\soc\libsoc.a %targetDir% +copy /Y build\spi_flash\libspi_flash.a %targetDir% +copy /Y build\spiffs\libspiffs.a %targetDir% + +copy /Y build\tcp_transport\libtcp_transport.a %targetDir% +copy /Y build\tcpip_adapter\libtcpip_adapter.a %targetDir% +copy /Y build\ulp\libulp.a %targetDir% +copy /Y build\unity\libunity.a %targetDir% +copy /Y build\vfs\libvfs.a %targetDir% +copy /Y build\wear_levelling\libwear_levelling.a %targetDir% +copy /Y build\wifi_provisioning\libwifi_provisioning.a %targetDir% +copy /Y build\wpa_supplicant\libwpa_supplicant.a %targetDir% +copy /Y build\xtensa-debug-module\libxtensa-debug-module.a %targetDir% + + + + + + diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32BLE/sdkconfig b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32BLE/sdkconfig new file mode 100644 index 0000000000..8f06aa47db --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32BLE/sdkconfig @@ -0,0 +1,862 @@ +# +# Automatically generated file; DO NOT EDIT. +# Espressif IoT Development Framework Configuration +# +CONFIG_IDF_TARGET="esp32" +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 + +# +# SDK tool configuration +# +CONFIG_TOOLPREFIX="xtensa-esp32-elf-" +CONFIG_PYTHON="python" +CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y + +# +# Application manager +# +CONFIG_APP_COMPILE_TIME_DATE=y +CONFIG_APP_EXCLUDE_PROJECT_VER_VAR= +CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR= +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 + +# +# Bootloader config +# +CONFIG_LOG_BOOTLOADER_LEVEL_NONE= +CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= +CONFIG_LOG_BOOTLOADER_LEVEL_WARN= +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= +CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= +CONFIG_LOG_BOOTLOADER_LEVEL=3 +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +CONFIG_BOOTLOADER_FACTORY_RESET= +CONFIG_BOOTLOADER_APP_TEST= +CONFIG_BOOTLOADER_WDT_ENABLE=y +CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE= +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +CONFIG_APP_ROLLBACK_ENABLE= + +# +# Security features +# +CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT= +CONFIG_SECURE_BOOT_ENABLED= +CONFIG_FLASH_ENCRYPTION_ENABLED= + +# +# Serial flasher config +# +CONFIG_ESPTOOLPY_PORT="COM4" +CONFIG_ESPTOOLPY_BAUD_115200B= +CONFIG_ESPTOOLPY_BAUD_230400B= +CONFIG_ESPTOOLPY_BAUD_921600B=y +CONFIG_ESPTOOLPY_BAUD_2MB= +CONFIG_ESPTOOLPY_BAUD_OTHER= +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_BAUD=921600 +CONFIG_ESPTOOLPY_COMPRESSED=y +CONFIG_FLASHMODE_QIO= +CONFIG_FLASHMODE_QOUT= +CONFIG_FLASHMODE_DIO=y +CONFIG_FLASHMODE_DOUT= +CONFIG_ESPTOOLPY_FLASHMODE="dio" +CONFIG_ESPTOOLPY_FLASHFREQ_80M= +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_26M= +CONFIG_ESPTOOLPY_FLASHFREQ_20M= +CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_FLASHSIZE_1MB= +CONFIG_ESPTOOLPY_FLASHSIZE_2MB= +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_ESPTOOLPY_FLASHSIZE_8MB= +CONFIG_ESPTOOLPY_FLASHSIZE_16MB= +CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +CONFIG_ESPTOOLPY_BEFORE_RESET=y +CONFIG_ESPTOOLPY_BEFORE_NORESET= +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +CONFIG_ESPTOOLPY_AFTER_NORESET= +CONFIG_ESPTOOLPY_AFTER="hard_reset" +CONFIG_MONITOR_BAUD_9600B= +CONFIG_MONITOR_BAUD_57600B= +CONFIG_MONITOR_BAUD_115200B= +CONFIG_MONITOR_BAUD_230400B= +CONFIG_MONITOR_BAUD_921600B=y +CONFIG_MONITOR_BAUD_2MB= +CONFIG_MONITOR_BAUD_OTHER= +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=921600 + +# +# Example Configuration +# +CONFIG_BLINK_GPIO=5 + +# +# Partition Table +# +CONFIG_PARTITION_TABLE_SINGLE_APP=y +CONFIG_PARTITION_TABLE_TWO_OTA= +CONFIG_PARTITION_TABLE_CUSTOM= +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" +CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y + +# +# Compiler options +# +CONFIG_OPTIMIZATION_LEVEL_DEBUG=y +CONFIG_OPTIMIZATION_LEVEL_RELEASE= +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= +CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= +CONFIG_CXX_EXCEPTIONS= +CONFIG_STACK_CHECK_NONE=y +CONFIG_STACK_CHECK_NORM= +CONFIG_STACK_CHECK_STRONG= +CONFIG_STACK_CHECK_ALL= +CONFIG_STACK_CHECK= +CONFIG_WARN_WRITE_STRINGS= +CONFIG_DISABLE_GCC8_WARNINGS= + +# +# Component config +# + +# +# Application Level Tracing +# +CONFIG_ESP32_APPTRACE_DEST_TRAX= +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_ENABLE= +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_AWS_IOT_SDK=y +CONFIG_AWS_IOT_MQTT_HOST="" +CONFIG_AWS_IOT_MQTT_PORT=8883 +CONFIG_AWS_IOT_MQTT_TX_BUF_LEN=512 +CONFIG_AWS_IOT_MQTT_RX_BUF_LEN=512 +CONFIG_AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS=5 +CONFIG_AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL=1000 +CONFIG_AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL=128000 + +# +# Thing Shadow +# +CONFIG_AWS_IOT_OVERRIDE_THING_SHADOW_RX_BUFFER= +CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES=80 +CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS=10 +CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES=10 +CONFIG_AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED=120 +CONFIG_AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME=60 +CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME=20 + +# +# Bluetooth +# +CONFIG_BT_ENABLED=y + +# +# Bluetooth controller +# +CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY=y +CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY= +CONFIG_BTDM_CONTROLLER_MODE_BTDM= +CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3 +CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 +CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF= +CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF= +CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0=y +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1= +CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 +CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y +CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4= + +# +# MODEM SLEEP Options +# +CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y +CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG=y +CONFIG_BTDM_MODEM_SLEEP_MODE_EVED= +CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL=y +CONFIG_BLE_SCAN_DUPLICATE=y +CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y +CONFIG_SCAN_DUPLICATE_BY_ADV_DATA= +CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR= +CONFIG_SCAN_DUPLICATE_TYPE=0 +CONFIG_DUPLICATE_SCAN_CACHE_SIZE=200 +CONFIG_BLE_MESH_SCAN_DUPLICATE_EN= +CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED=y +CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y +CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100 +CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 +CONFIG_BTDM_COEX_BT_OPTIONS= +CONFIG_BLUEDROID_ENABLED= +CONFIG_BT_RESERVE_DRAM=0xdb5c +CONFIG_NIMBLE_ENABLED=y +CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y +CONFIG_NIMBLE_MEM_ALLOC_MODE_DEFAULT= +CONFIG_NIMBLE_MAX_CONNECTIONS=3 +CONFIG_NIMBLE_MAX_BONDS=3 +CONFIG_NIMBLE_MAX_CCCDS=8 +CONFIG_NIMBLE_L2CAP_COC_MAX_NUM=0 +CONFIG_NIMBLE_PINNED_TO_CORE_0=y +CONFIG_NIMBLE_PINNED_TO_CORE_1= +CONFIG_NIMBLE_PINNED_TO_CORE=0 +CONFIG_NIMBLE_TASK_STACK_SIZE=4096 +CONFIG_NIMBLE_ROLE_CENTRAL=y +CONFIG_NIMBLE_ROLE_PERIPHERAL=y +CONFIG_NIMBLE_ROLE_BROADCASTER=y +CONFIG_NIMBLE_ROLE_OBSERVER=y +CONFIG_NIMBLE_NVS_PERSIST=y +CONFIG_NIMBLE_SM_LEGACY=y +CONFIG_NIMBLE_SM_SC=y +CONFIG_NIMBLE_DEBUG= +CONFIG_NIMBLE_SM_SC_DEBUG_KEYS= +CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME="nimble" +CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31 +CONFIG_NIMBLE_ATT_PREFERRED_MTU=256 +CONFIG_NIMBLE_SVC_GAP_APPEARANCE=0 +CONFIG_NIMBLE_ACL_BUF_COUNT=12 +CONFIG_NIMBLE_ACL_BUF_SIZE=255 +CONFIG_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 +CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 +CONFIG_NIMBLE_MSYS1_BLOCK_COUNT=12 +CONFIG_NIMBLE_HS_FLOW_CTRL=y +CONFIG_NIMBLE_HS_FLOW_CTRL_ITVL=1000 +CONFIG_NIMBLE_HS_FLOW_CTRL_THRESH=2 +CONFIG_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT=y +CONFIG_NIMBLE_RPA_TIMEOUT=900 +CONFIG_NIMBLE_MESH=y +CONFIG_NIMBLE_MESH_PROXY=y +CONFIG_NIMBLE_MESH_PROV=y +CONFIG_NIMBLE_MESH_PB_ADV=y +CONFIG_NIMBLE_MESH_PB_GATT=y +CONFIG_NIMBLE_MESH_GATT_PROXY=y +CONFIG_NIMBLE_MESH_RELAY= +CONFIG_NIMBLE_MESH_LOW_POWER= +CONFIG_NIMBLE_MESH_FRIEND= +CONFIG_NIMBLE_MESH_DEVICE_NAME="nimble-mesh-node" +CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS=y +CONFIG_BLE_MESH= + +# +# Driver configurations +# + +# +# ADC configuration +# +CONFIG_ADC_FORCE_XPD_FSM= +CONFIG_ADC2_DISABLE_DAC= + +# +# SPI configuration +# +CONFIG_SPI_MASTER_IN_IRAM=y +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +CONFIG_SPI_SLAVE_IN_IRAM=y +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y + +# +# CAN Configuration +# +CONFIG_CAN_ISR_IN_IRAM= + +# +# eFuse Bit Manager +# +CONFIG_EFUSE_CUSTOM_TABLE= +CONFIG_EFUSE_VIRTUAL= +CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE= +CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y +CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT= +CONFIG_EFUSE_MAX_BLK_LEN=192 + +# +# ESP32-specific +# +CONFIG_IDF_TARGET_ESP32=y +CONFIG_ESP32_REV_MIN_0=y +CONFIG_ESP32_REV_MIN_1= +CONFIG_ESP32_REV_MIN_2= +CONFIG_ESP32_REV_MIN_3= +CONFIG_ESP32_REV_MIN=0 +CONFIG_ESP32_DPORT_WORKAROUND=y +CONFIG_ESP32_DEFAULT_CPU_FREQ_80= +CONFIG_ESP32_DEFAULT_CPU_FREQ_160= +CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 +CONFIG_SPIRAM_SUPPORT= +CONFIG_MEMMAP_TRACEMEM= +CONFIG_MEMMAP_TRACEMEM_TWOBANKS= +CONFIG_ESP32_TRAX= +CONFIG_TRACEMEM_RESERVE_DRAM=0x0 +CONFIG_TWO_UNIVERSAL_MAC_ADDRESS= +CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y +CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_MAIN_TASK_STACK_SIZE=3584 +CONFIG_IPC_TASK_STACK_SIZE=1024 +CONFIG_TIMER_TASK_STACK_SIZE=3584 +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= +CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF= +CONFIG_NEWLIB_STDIN_LINE_ENDING_LF= +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +CONFIG_NEWLIB_NANO_FORMAT= +CONFIG_CONSOLE_UART_DEFAULT=y +CONFIG_CONSOLE_UART_CUSTOM= +CONFIG_CONSOLE_UART_NONE= +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_RESERVE_MEM=512 +CONFIG_ESP32_PANIC_PRINT_HALT= +CONFIG_ESP32_PANIC_PRINT_REBOOT=y +CONFIG_ESP32_PANIC_SILENT_REBOOT= +CONFIG_ESP32_PANIC_GDBSTUB= +CONFIG_ESP32_DEBUG_OCDAWARE=y +CONFIG_ESP32_DEBUG_STUBS_ENABLE=y +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y +CONFIG_TASK_WDT= +CONFIG_BROWNOUT_DET=y +CONFIG_BROWNOUT_DET_LVL_SEL_0=y +CONFIG_BROWNOUT_DET_LVL_SEL_1= +CONFIG_BROWNOUT_DET_LVL_SEL_2= +CONFIG_BROWNOUT_DET_LVL_SEL_3= +CONFIG_BROWNOUT_DET_LVL_SEL_4= +CONFIG_BROWNOUT_DET_LVL_SEL_5= +CONFIG_BROWNOUT_DET_LVL_SEL_6= +CONFIG_BROWNOUT_DET_LVL_SEL_7= +CONFIG_BROWNOUT_DET_LVL=0 +CONFIG_REDUCE_PHY_TX_POWER=y +CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y +CONFIG_ESP32_TIME_SYSCALL_USE_RTC= +CONFIG_ESP32_TIME_SYSCALL_USE_FRC1= +CONFIG_ESP32_TIME_SYSCALL_USE_NONE= +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y +CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL= +CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC= +CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256= +CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 +CONFIG_ESP32_XTAL_FREQ_40= +CONFIG_ESP32_XTAL_FREQ_26= +CONFIG_ESP32_XTAL_FREQ_AUTO=y +CONFIG_ESP32_XTAL_FREQ=0 +CONFIG_DISABLE_BASIC_ROM_CONSOLE= +CONFIG_ESP_TIMER_PROFILING= +CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS= +CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 + +# +# Wi-Fi +# +CONFIG_SW_COEXIST_ENABLE=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 +CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER= +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0 +CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16 +CONFIG_ESP32_WIFI_CSI_ENABLED= +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +CONFIG_ESP32_WIFI_NVS_ENABLED=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1= +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE= +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT= + +# +# PHY +# +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION= +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 + +# +# Power Management +# +CONFIG_PM_ENABLE=y +CONFIG_PM_DFS_INIT_AUTO= +CONFIG_PM_USE_RTC_TIMER_REF= +CONFIG_PM_PROFILING= +CONFIG_PM_TRACE= + +# +# ADC-Calibration +# +CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y +CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y +CONFIG_ADC_CAL_LUT_ENABLE=y + +# +# Event Loop Library +# +CONFIG_EVENT_LOOP_PROFILING= + +# +# ESP HTTP client +# +CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y +CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH= + +# +# HTTP Server +# +CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 +CONFIG_HTTPD_MAX_URI_LEN=512 +CONFIG_HTTPD_ERR_RESP_NO_DELAY=y +CONFIG_HTTPD_PURGE_BUF_LEN=32 +CONFIG_HTTPD_LOG_PURGE_DATA= + +# +# ESP HTTPS OTA +# +CONFIG_OTA_ALLOW_HTTP= + +# +# Core dump +# +CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= +CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_ENABLE_COREDUMP= + +# +# Ethernet +# +CONFIG_DMA_RX_BUF_NUM=10 +CONFIG_DMA_TX_BUF_NUM=10 +CONFIG_EMAC_L2_TO_L3_RX_BUF_MODE= +CONFIG_EMAC_CHECK_LINK_PERIOD_MS=2000 +CONFIG_EMAC_TASK_PRIORITY=20 +CONFIG_EMAC_TASK_STACK_SIZE=3072 + +# +# FAT Filesystem support +# +CONFIG_FATFS_CODEPAGE_DYNAMIC= +CONFIG_FATFS_CODEPAGE_437=y +CONFIG_FATFS_CODEPAGE_720= +CONFIG_FATFS_CODEPAGE_737= +CONFIG_FATFS_CODEPAGE_771= +CONFIG_FATFS_CODEPAGE_775= +CONFIG_FATFS_CODEPAGE_850= +CONFIG_FATFS_CODEPAGE_852= +CONFIG_FATFS_CODEPAGE_855= +CONFIG_FATFS_CODEPAGE_857= +CONFIG_FATFS_CODEPAGE_860= +CONFIG_FATFS_CODEPAGE_861= +CONFIG_FATFS_CODEPAGE_862= +CONFIG_FATFS_CODEPAGE_863= +CONFIG_FATFS_CODEPAGE_864= +CONFIG_FATFS_CODEPAGE_865= +CONFIG_FATFS_CODEPAGE_866= +CONFIG_FATFS_CODEPAGE_869= +CONFIG_FATFS_CODEPAGE_932= +CONFIG_FATFS_CODEPAGE_936= +CONFIG_FATFS_CODEPAGE_949= +CONFIG_FATFS_CODEPAGE_950= +CONFIG_FATFS_CODEPAGE=437 +CONFIG_FATFS_LFN_NONE= +CONFIG_FATFS_LFN_HEAP=y +CONFIG_FATFS_LFN_STACK= +CONFIG_FATFS_MAX_LFN=255 +CONFIG_FATFS_API_ENCODING_ANSI_OEM=y +CONFIG_FATFS_API_ENCODING_UTF_16= +CONFIG_FATFS_API_ENCODING_UTF_8= +CONFIG_FATFS_FS_LOCK=0 +CONFIG_FATFS_TIMEOUT_MS=10000 +CONFIG_FATFS_PER_FILE_CACHE=y + +# +# Modbus configuration +# +CONFIG_MB_QUEUE_LENGTH=20 +CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 +CONFIG_MB_SERIAL_BUF_SIZE=256 +CONFIG_MB_SERIAL_TASK_PRIO=10 +CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT= +CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 +CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 +CONFIG_MB_CONTROLLER_STACK_SIZE=4096 +CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 +CONFIG_MB_TIMER_PORT_ENABLED=y +CONFIG_MB_TIMER_GROUP=0 +CONFIG_MB_TIMER_INDEX=0 + +# +# FreeRTOS +# +CONFIG_FREERTOS_UNICORE= +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF +CONFIG_FREERTOS_CORETIMER_0=y +CONFIG_FREERTOS_CORETIMER_1= +CONFIG_FREERTOS_HZ=100 +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE= +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL= +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK= +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE= +CONFIG_FREERTOS_ASSERT_DISABLE= +CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +CONFIG_FREERTOS_LEGACY_HOOKS= +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_SUPPORT_STATIC_ALLOCATION=y +CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK= +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +CONFIG_FREERTOS_USE_TRACE_FACILITY= +CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= +CONFIG_FREERTOS_USE_TICKLESS_IDLE= +CONFIG_FREERTOS_DEBUG_INTERNALS= +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE= + +# +# Heap memory debugging +# +CONFIG_HEAP_POISONING_DISABLED=y +CONFIG_HEAP_POISONING_LIGHT= +CONFIG_HEAP_POISONING_COMPREHENSIVE= +CONFIG_HEAP_TRACING= + +# +# libsodium +# + +# +# Log output +# +CONFIG_LOG_DEFAULT_LEVEL_NONE= +CONFIG_LOG_DEFAULT_LEVEL_ERROR= +CONFIG_LOG_DEFAULT_LEVEL_WARN= +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +CONFIG_LOG_DEFAULT_LEVEL_DEBUG= +CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_COLORS=y + +# +# LWIP +# +CONFIG_L2_TO_L3_COPY= +CONFIG_ETHARP_SUPPORT_VLAN=y +CONFIG_LWIP_IRAM_OPTIMIZATION= +CONFIG_LWIP_MAX_SOCKETS=10 +CONFIG_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS=y +CONFIG_USE_ONLY_LWIP_SELECT= +CONFIG_LWIP_SO_LINGER= +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y +CONFIG_LWIP_SO_RCVBUF=y +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +CONFIG_LWIP_IP4_REASSEMBLY= +CONFIG_LWIP_IP6_REASSEMBLY= +CONFIG_LWIP_STATS= +CONFIG_LWIP_ETHARP_TRUST_IP_MAC= +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +CONFIG_LWIP_DHCP_RESTORE_LAST_IP= + +# +# DHCP server +# +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +CONFIG_LWIP_AUTOIP= +CONFIG_LWIP_IPV6_AUTOCONFIG= +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 + +# +# TCP +# +CONFIG_LWIP_TCP_ISN_HOOK=y +CONFIG_LWIP_MAX_ACTIVE_TCP=16 +CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_TCP_MAXRTX=12 +CONFIG_TCP_SYNMAXRTX=6 +CONFIG_TCP_MSS=1436 +CONFIG_TCP_MSL=60000 +CONFIG_TCP_SND_BUF_DEFAULT=5744 +CONFIG_TCP_WND_DEFAULT=5744 +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= +CONFIG_TCP_OVERSIZE_MSS=y +CONFIG_TCP_OVERSIZE_QUARTER_MSS= +CONFIG_TCP_OVERSIZE_DISABLE= +CONFIG_LWIP_TCP_RTO_TIME=1500 + +# +# UDP +# +CONFIG_LWIP_MAX_UDP_PCBS=16 +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=2048 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +CONFIG_TCPIP_TASK_AFFINITY_CPU0= +CONFIG_TCPIP_TASK_AFFINITY_CPU1= +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +CONFIG_PPP_SUPPORT= + +# +# ICMP +# +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_BROADCAST_PING= + +# +# LWIP RAW API +# +CONFIG_LWIP_MAX_RAW_PCBS=16 + +# +# SNTP +# +CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +CONFIG_LWIP_ESP_LWIP_ASSERT=y + +# +# mbedTLS +# +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC= +CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC= +CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN= +CONFIG_MBEDTLS_DEBUG= +CONFIG_MBEDTLS_ECP_RESTARTABLE=y +CONFIG_MBEDTLS_CMAC_C=y +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_MPI_USE_INTERRUPT= +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_HAVE_TIME=y +CONFIG_MBEDTLS_HAVE_TIME_DATE=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +CONFIG_MBEDTLS_TLS_SERVER_ONLY= +CONFIG_MBEDTLS_TLS_CLIENT_ONLY= +CONFIG_MBEDTLS_TLS_DISABLED= +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y + +# +# TLS Key Exchange Methods +# +CONFIG_MBEDTLS_PSK_MODES= +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +CONFIG_MBEDTLS_SSL_PROTO_SSL3= +CONFIG_MBEDTLS_SSL_PROTO_TLS1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +CONFIG_MBEDTLS_SSL_PROTO_DTLS= +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y + +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +CONFIG_MBEDTLS_CAMELLIA_C= +CONFIG_MBEDTLS_DES_C= +CONFIG_MBEDTLS_RC4_DISABLED=y +CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= +CONFIG_MBEDTLS_RC4_ENABLED= +CONFIG_MBEDTLS_BLOWFISH_C= +CONFIG_MBEDTLS_XTEA_C= +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +CONFIG_MBEDTLS_RIPEMD160_C=y + +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y + +# +# mDNS +# +CONFIG_MDNS_MAX_SERVICES=10 + +# +# ESP-MQTT Configurations +# +CONFIG_MQTT_PROTOCOL_311=y +CONFIG_MQTT_TRANSPORT_SSL=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET=y +CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y +CONFIG_MQTT_USE_CUSTOM_CONFIG= +CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED= +CONFIG_MQTT_CUSTOM_OUTBOX= + +# +# NVS +# + +# +# OpenSSL +# +CONFIG_OPENSSL_DEBUG= +CONFIG_OPENSSL_ASSERT_DO_NOTHING=y +CONFIG_OPENSSL_ASSERT_EXIT= + +# +# PThreads +# +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0= +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1= +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" + +# +# SPI Flash driver +# +CONFIG_SPI_FLASH_VERIFY_WRITE= +CONFIG_SPI_FLASH_ENABLE_COUNTERS= +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS= +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED= +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y +CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 +CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 + +# +# SPIFFS Configuration +# +CONFIG_SPIFFS_MAX_PARTITIONS=3 + +# +# SPIFFS Cache Configuration +# +CONFIG_SPIFFS_CACHE=y +CONFIG_SPIFFS_CACHE_WR=y +CONFIG_SPIFFS_CACHE_STATS= +CONFIG_SPIFFS_PAGE_CHECK=y +CONFIG_SPIFFS_GC_MAX_RUNS=10 +CONFIG_SPIFFS_GC_STATS= +CONFIG_SPIFFS_PAGE_SIZE=256 +CONFIG_SPIFFS_OBJ_NAME_LEN=32 +CONFIG_SPIFFS_USE_MAGIC=y +CONFIG_SPIFFS_USE_MAGIC_LENGTH=y +CONFIG_SPIFFS_META_LENGTH=4 +CONFIG_SPIFFS_USE_MTIME=y + +# +# Debug Configuration +# +CONFIG_SPIFFS_DBG= +CONFIG_SPIFFS_API_DBG= +CONFIG_SPIFFS_GC_DBG= +CONFIG_SPIFFS_CACHE_DBG= +CONFIG_SPIFFS_CHECK_DBG= +CONFIG_SPIFFS_TEST_VISUALISATION= + +# +# TCP/IP Adapter +# +CONFIG_IP_LOST_TIMER_INTERVAL=120 +CONFIG_TCPIP_LWIP=y + +# +# Unity unit testing library +# +CONFIG_UNITY_ENABLE_FLOAT=y +CONFIG_UNITY_ENABLE_DOUBLE=y +CONFIG_UNITY_ENABLE_COLOR= +CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y +CONFIG_UNITY_ENABLE_FIXTURE= + +# +# Virtual file system +# +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y + +# +# Wear Levelling +# +CONFIG_WL_SECTOR_SIZE_512= +CONFIG_WL_SECTOR_SIZE_4096=y +CONFIG_WL_SECTOR_SIZE=4096 + +# +# Wi-Fi Provisioning Manager +# +CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 + +# +# Supplicant +# +CONFIG_WPA_WPS_WARS= +CONFIG_WPA_DEBUG_PRINT= diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32V3/CopyLibs.cmd b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32V3/CopyLibs.cmd new file mode 100644 index 0000000000..92540453e5 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32V3/CopyLibs.cmd @@ -0,0 +1,90 @@ +echo off + +SET idfVer=3.3.5 +SET targetDir=c:\Esp32_tools\libs-v%idfVer%_V3 + +echo Copy IDF libraries to %targetDir% + +rmdir /S /Q %targetDir% +mkdir %targetDir% + + +copy /Y build\bootloader\bootloader.bin %targetDir% + +copy /Y build\app_trace\libapp_trace.a %targetDir% +copy /Y build\app_update\libapp_update.a %targetDir% +copy /Y build\asio\libasio.a %targetDir% +copy /Y build\aws_iot\libaws_iot.a %targetDir% +copy /Y build\bootloader\bootloader_support\libbootloader_support.a %targetDir% + +copy /Y build\bt\libbt.a %targetDir% + +copy /Y build\coap\libcoap.a %targetDir% +copy /Y build\console\libconsole.a %targetDir% + +copy /Y build\cxx\libcxx.a %targetDir% +copy /Y build\driver\libdriver.a %targetDir% +copy /Y build\efuse\libefuse.a %targetDir% +copy /Y build\esp-tls\libesp-tls.a %targetDir% +copy /Y build\esp32\libesp32.a %targetDir% + +copy /Y build\esp_adc_cal\libesp_adc_cal.a %targetDir% +copy /Y build\esp_event\libesp_event.a %targetDir% + +copy /Y build\esp_http_client\libesp_http_client.a %targetDir% +copy /Y build\esp_http_server\libesp_http_server.a %targetDir% + +copy /Y build\esp_https_ota\libesp_https_ota.a %targetDir% +copy /Y build\esp_https_server\libesp_https_server.a %targetDir% +copy /Y build\esp_ringbuf\libesp_ringbuf.a %targetDir% +copy /Y build\espcoredump\libespcoredump.a %targetDir% +copy /Y build\ethernet\libethernet.a %targetDir% +copy /Y build\expat\libexpat.a %targetDir% +copy /Y build\fatfs\libfatfs.a %targetDir% +copy /Y build\freemodbus\libfreemodbus.a %targetDir% +copy /Y build\freertos\libfreertos.a %targetDir% +copy /Y build\heap\libheap.a %targetDir% +copy /Y build\idf_test\libidf_test.a %targetDir% +copy /Y build\jsmn\libjsmn.a %targetDir% +copy /Y build\json\libjson.a %targetDir% +copy /Y build\libsodium\liblibsodium.a %targetDir% +copy /Y build\log\liblog.a %targetDir% + +copy /Y build\main\libmain.a %targetDir% +copy /Y build\lwip\liblwip.a %targetDir% +copy /Y build\mbedtls\libmbedtls.a %targetDir% +copy /Y build\mdns\libmdns.a %targetDir% +copy /Y build\micro-ecc\libmicro-ecc.a %targetDir% +copy /Y build\mqtt\libmqtt.a %targetDir% + +copy /Y build\newlib\libnewlib.a %targetDir% +copy /Y build\nimble\libnimble.a %targetDir% + +copy /Y build\nghttp\libnghttp.a %targetDir% +copy /Y build\nvs_flash\libnvs_flash.a %targetDir% +copy /Y build\openssl\libopenssl.a %targetDir% + +copy /Y build\protobuf-c\libprotobuf-c.a %targetDir% +copy /Y build\protocomm\libprotocomm.a %targetDir% +copy /Y build\pthread\libpthread.a %targetDir% +copy /Y build\sdmmc\libsdmmc.a %targetDir% +copy /Y build\smartconfig_ack\libsmartconfig_ack.a %targetDir% +copy /Y build\soc\libsoc.a %targetDir% +copy /Y build\spi_flash\libspi_flash.a %targetDir% +copy /Y build\spiffs\libspiffs.a %targetDir% + +copy /Y build\tcp_transport\libtcp_transport.a %targetDir% +copy /Y build\tcpip_adapter\libtcpip_adapter.a %targetDir% +copy /Y build\ulp\libulp.a %targetDir% +copy /Y build\unity\libunity.a %targetDir% +copy /Y build\vfs\libvfs.a %targetDir% +copy /Y build\wear_levelling\libwear_levelling.a %targetDir% +copy /Y build\wifi_provisioning\libwifi_provisioning.a %targetDir% +copy /Y build\wpa_supplicant\libwpa_supplicant.a %targetDir% +copy /Y build\xtensa-debug-module\libxtensa-debug-module.a %targetDir% + + + + + + diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32V3/sdkconfig similarity index 72% rename from targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig rename to targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32V3/sdkconfig index 356b5d45da..74e6ef3845 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/Wroom32V3/sdkconfig @@ -18,6 +18,7 @@ CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y CONFIG_APP_COMPILE_TIME_DATE=y CONFIG_APP_EXCLUDE_PROJECT_VER_VAR= CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR= +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 # # Bootloader config @@ -44,18 +45,19 @@ CONFIG_APP_ROLLBACK_ENABLE= CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT= CONFIG_SECURE_BOOT_ENABLED= CONFIG_FLASH_ENCRYPTION_ENABLED= +CONFIG_SECURE_DISABLE_ROM_DL_MODE= # # Serial flasher config # -CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" -CONFIG_ESPTOOLPY_BAUD_115200B=y +CONFIG_ESPTOOLPY_PORT="COM4" +CONFIG_ESPTOOLPY_BAUD_115200B= CONFIG_ESPTOOLPY_BAUD_230400B= -CONFIG_ESPTOOLPY_BAUD_921600B= +CONFIG_ESPTOOLPY_BAUD_921600B=y CONFIG_ESPTOOLPY_BAUD_2MB= CONFIG_ESPTOOLPY_BAUD_OTHER= CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_BAUD=115200 +CONFIG_ESPTOOLPY_BAUD=921600 CONFIG_ESPTOOLPY_COMPRESSED=y CONFIG_FLASHMODE_QIO= CONFIG_FLASHMODE_QOUT= @@ -82,13 +84,18 @@ CONFIG_ESPTOOLPY_AFTER_NORESET= CONFIG_ESPTOOLPY_AFTER="hard_reset" CONFIG_MONITOR_BAUD_9600B= CONFIG_MONITOR_BAUD_57600B= -CONFIG_MONITOR_BAUD_115200B=y +CONFIG_MONITOR_BAUD_115200B= CONFIG_MONITOR_BAUD_230400B= -CONFIG_MONITOR_BAUD_921600B= +CONFIG_MONITOR_BAUD_921600B=y CONFIG_MONITOR_BAUD_2MB= CONFIG_MONITOR_BAUD_OTHER= CONFIG_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_MONITOR_BAUD=115200 +CONFIG_MONITOR_BAUD=921600 + +# +# Example Configuration +# +CONFIG_BLINK_GPIO=5 # # Partition Table @@ -162,6 +169,8 @@ CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY= CONFIG_BTDM_CONTROLLER_MODE_BTDM= CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3 CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 +CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF= +CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF= CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 @@ -174,216 +183,71 @@ CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4= # # MODEM SLEEP Options # -CONFIG_BTDM_CONTROLLER_MODEM_SLEEP= +CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y +CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG=y +CONFIG_BTDM_MODEM_SLEEP_MODE_EVED= +CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL=y CONFIG_BLE_SCAN_DUPLICATE=y CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y CONFIG_SCAN_DUPLICATE_BY_ADV_DATA= CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR= CONFIG_SCAN_DUPLICATE_TYPE=0 -CONFIG_DUPLICATE_SCAN_CACHE_SIZE=50 +CONFIG_DUPLICATE_SCAN_CACHE_SIZE=200 CONFIG_BLE_MESH_SCAN_DUPLICATE_EN= -CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED= +CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED=y CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100 CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 CONFIG_BTDM_COEX_BT_OPTIONS= -CONFIG_BLUEDROID_ENABLED=y -CONFIG_BLUEDROID_PINNED_TO_CORE_0=y -CONFIG_BLUEDROID_PINNED_TO_CORE_1= -CONFIG_BLUEDROID_PINNED_TO_CORE=0 -CONFIG_BTC_TASK_STACK_SIZE=3072 -CONFIG_BTU_TASK_STACK_SIZE=4096 -CONFIG_BLUEDROID_MEM_DEBUG= -CONFIG_CLASSIC_BT_ENABLED= -CONFIG_GATTS_ENABLE=y -CONFIG_GATTS_SEND_SERVICE_CHANGE_MANUAL= -CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO=y -CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE=0 -CONFIG_GATTC_ENABLE=y -CONFIG_GATTC_CACHE_NVS_FLASH= -CONFIG_BLE_SMP_ENABLE=y -CONFIG_SMP_SLAVE_CON_PARAMS_UPD_ENABLE= -CONFIG_BT_STACK_NO_LOG= - -# -# BT DEBUG LOG LEVEL -# -CONFIG_HCI_TRACE_LEVEL_NONE= -CONFIG_HCI_TRACE_LEVEL_ERROR= -CONFIG_HCI_TRACE_LEVEL_WARNING=y -CONFIG_HCI_TRACE_LEVEL_API= -CONFIG_HCI_TRACE_LEVEL_EVENT= -CONFIG_HCI_TRACE_LEVEL_DEBUG= -CONFIG_HCI_TRACE_LEVEL_VERBOSE= -CONFIG_HCI_INITIAL_TRACE_LEVEL=2 -CONFIG_BTM_TRACE_LEVEL_NONE= -CONFIG_BTM_TRACE_LEVEL_ERROR= -CONFIG_BTM_TRACE_LEVEL_WARNING=y -CONFIG_BTM_TRACE_LEVEL_API= -CONFIG_BTM_TRACE_LEVEL_EVENT= -CONFIG_BTM_TRACE_LEVEL_DEBUG= -CONFIG_BTM_TRACE_LEVEL_VERBOSE= -CONFIG_BTM_INITIAL_TRACE_LEVEL=2 -CONFIG_L2CAP_TRACE_LEVEL_NONE= -CONFIG_L2CAP_TRACE_LEVEL_ERROR= -CONFIG_L2CAP_TRACE_LEVEL_WARNING=y -CONFIG_L2CAP_TRACE_LEVEL_API= -CONFIG_L2CAP_TRACE_LEVEL_EVENT= -CONFIG_L2CAP_TRACE_LEVEL_DEBUG= -CONFIG_L2CAP_TRACE_LEVEL_VERBOSE= -CONFIG_L2CAP_INITIAL_TRACE_LEVEL=2 -CONFIG_RFCOMM_TRACE_LEVEL_NONE= -CONFIG_RFCOMM_TRACE_LEVEL_ERROR= -CONFIG_RFCOMM_TRACE_LEVEL_WARNING=y -CONFIG_RFCOMM_TRACE_LEVEL_API= -CONFIG_RFCOMM_TRACE_LEVEL_EVENT= -CONFIG_RFCOMM_TRACE_LEVEL_DEBUG= -CONFIG_RFCOMM_TRACE_LEVEL_VERBOSE= -CONFIG_RFCOMM_INITIAL_TRACE_LEVEL=2 -CONFIG_SDP_TRACE_LEVEL_NONE= -CONFIG_SDP_TRACE_LEVEL_ERROR= -CONFIG_SDP_TRACE_LEVEL_WARNING=y -CONFIG_SDP_TRACE_LEVEL_API= -CONFIG_SDP_TRACE_LEVEL_EVENT= -CONFIG_SDP_TRACE_LEVEL_DEBUG= -CONFIG_SDP_TRACE_LEVEL_VERBOSE= -CONFIG_SDP_INITIAL_TRACE_LEVEL=2 -CONFIG_GAP_TRACE_LEVEL_NONE= -CONFIG_GAP_TRACE_LEVEL_ERROR= -CONFIG_GAP_TRACE_LEVEL_WARNING=y -CONFIG_GAP_TRACE_LEVEL_API= -CONFIG_GAP_TRACE_LEVEL_EVENT= -CONFIG_GAP_TRACE_LEVEL_DEBUG= -CONFIG_GAP_TRACE_LEVEL_VERBOSE= -CONFIG_GAP_INITIAL_TRACE_LEVEL=2 -CONFIG_BNEP_TRACE_LEVEL_NONE= -CONFIG_BNEP_TRACE_LEVEL_ERROR= -CONFIG_BNEP_TRACE_LEVEL_WARNING=y -CONFIG_BNEP_TRACE_LEVEL_API= -CONFIG_BNEP_TRACE_LEVEL_EVENT= -CONFIG_BNEP_TRACE_LEVEL_DEBUG= -CONFIG_BNEP_TRACE_LEVEL_VERBOSE= -CONFIG_BNEP_INITIAL_TRACE_LEVEL=2 -CONFIG_PAN_TRACE_LEVEL_NONE= -CONFIG_PAN_TRACE_LEVEL_ERROR= -CONFIG_PAN_TRACE_LEVEL_WARNING=y -CONFIG_PAN_TRACE_LEVEL_API= -CONFIG_PAN_TRACE_LEVEL_EVENT= -CONFIG_PAN_TRACE_LEVEL_DEBUG= -CONFIG_PAN_TRACE_LEVEL_VERBOSE= -CONFIG_PAN_INITIAL_TRACE_LEVEL=2 -CONFIG_A2D_TRACE_LEVEL_NONE= -CONFIG_A2D_TRACE_LEVEL_ERROR= -CONFIG_A2D_TRACE_LEVEL_WARNING=y -CONFIG_A2D_TRACE_LEVEL_API= -CONFIG_A2D_TRACE_LEVEL_EVENT= -CONFIG_A2D_TRACE_LEVEL_DEBUG= -CONFIG_A2D_TRACE_LEVEL_VERBOSE= -CONFIG_A2D_INITIAL_TRACE_LEVEL=2 -CONFIG_AVDT_TRACE_LEVEL_NONE= -CONFIG_AVDT_TRACE_LEVEL_ERROR= -CONFIG_AVDT_TRACE_LEVEL_WARNING=y -CONFIG_AVDT_TRACE_LEVEL_API= -CONFIG_AVDT_TRACE_LEVEL_EVENT= -CONFIG_AVDT_TRACE_LEVEL_DEBUG= -CONFIG_AVDT_TRACE_LEVEL_VERBOSE= -CONFIG_AVDT_INITIAL_TRACE_LEVEL=2 -CONFIG_AVCT_TRACE_LEVEL_NONE= -CONFIG_AVCT_TRACE_LEVEL_ERROR= -CONFIG_AVCT_TRACE_LEVEL_WARNING=y -CONFIG_AVCT_TRACE_LEVEL_API= -CONFIG_AVCT_TRACE_LEVEL_EVENT= -CONFIG_AVCT_TRACE_LEVEL_DEBUG= -CONFIG_AVCT_TRACE_LEVEL_VERBOSE= -CONFIG_AVCT_INITIAL_TRACE_LEVEL=2 -CONFIG_AVRC_TRACE_LEVEL_NONE= -CONFIG_AVRC_TRACE_LEVEL_ERROR= -CONFIG_AVRC_TRACE_LEVEL_WARNING=y -CONFIG_AVRC_TRACE_LEVEL_API= -CONFIG_AVRC_TRACE_LEVEL_EVENT= -CONFIG_AVRC_TRACE_LEVEL_DEBUG= -CONFIG_AVRC_TRACE_LEVEL_VERBOSE= -CONFIG_AVRC_INITIAL_TRACE_LEVEL=2 -CONFIG_MCA_TRACE_LEVEL_NONE= -CONFIG_MCA_TRACE_LEVEL_ERROR= -CONFIG_MCA_TRACE_LEVEL_WARNING=y -CONFIG_MCA_TRACE_LEVEL_API= -CONFIG_MCA_TRACE_LEVEL_EVENT= -CONFIG_MCA_TRACE_LEVEL_DEBUG= -CONFIG_MCA_TRACE_LEVEL_VERBOSE= -CONFIG_MCA_INITIAL_TRACE_LEVEL=2 -CONFIG_HID_TRACE_LEVEL_NONE= -CONFIG_HID_TRACE_LEVEL_ERROR= -CONFIG_HID_TRACE_LEVEL_WARNING=y -CONFIG_HID_TRACE_LEVEL_API= -CONFIG_HID_TRACE_LEVEL_EVENT= -CONFIG_HID_TRACE_LEVEL_DEBUG= -CONFIG_HID_TRACE_LEVEL_VERBOSE= -CONFIG_HID_INITIAL_TRACE_LEVEL=2 -CONFIG_APPL_TRACE_LEVEL_NONE= -CONFIG_APPL_TRACE_LEVEL_ERROR= -CONFIG_APPL_TRACE_LEVEL_WARNING=y -CONFIG_APPL_TRACE_LEVEL_API= -CONFIG_APPL_TRACE_LEVEL_EVENT= -CONFIG_APPL_TRACE_LEVEL_DEBUG= -CONFIG_APPL_TRACE_LEVEL_VERBOSE= -CONFIG_APPL_INITIAL_TRACE_LEVEL=2 -CONFIG_GATT_TRACE_LEVEL_NONE= -CONFIG_GATT_TRACE_LEVEL_ERROR= -CONFIG_GATT_TRACE_LEVEL_WARNING=y -CONFIG_GATT_TRACE_LEVEL_API= -CONFIG_GATT_TRACE_LEVEL_EVENT= -CONFIG_GATT_TRACE_LEVEL_DEBUG= -CONFIG_GATT_TRACE_LEVEL_VERBOSE= -CONFIG_GATT_INITIAL_TRACE_LEVEL=2 -CONFIG_SMP_TRACE_LEVEL_NONE= -CONFIG_SMP_TRACE_LEVEL_ERROR= -CONFIG_SMP_TRACE_LEVEL_WARNING=y -CONFIG_SMP_TRACE_LEVEL_API= -CONFIG_SMP_TRACE_LEVEL_EVENT= -CONFIG_SMP_TRACE_LEVEL_DEBUG= -CONFIG_SMP_TRACE_LEVEL_VERBOSE= -CONFIG_SMP_INITIAL_TRACE_LEVEL=2 -CONFIG_BTIF_TRACE_LEVEL_NONE= -CONFIG_BTIF_TRACE_LEVEL_ERROR= -CONFIG_BTIF_TRACE_LEVEL_WARNING=y -CONFIG_BTIF_TRACE_LEVEL_API= -CONFIG_BTIF_TRACE_LEVEL_EVENT= -CONFIG_BTIF_TRACE_LEVEL_DEBUG= -CONFIG_BTIF_TRACE_LEVEL_VERBOSE= -CONFIG_BTIF_INITIAL_TRACE_LEVEL=2 -CONFIG_BTC_TRACE_LEVEL_NONE= -CONFIG_BTC_TRACE_LEVEL_ERROR= -CONFIG_BTC_TRACE_LEVEL_WARNING=y -CONFIG_BTC_TRACE_LEVEL_API= -CONFIG_BTC_TRACE_LEVEL_EVENT= -CONFIG_BTC_TRACE_LEVEL_DEBUG= -CONFIG_BTC_TRACE_LEVEL_VERBOSE= -CONFIG_BTC_INITIAL_TRACE_LEVEL=2 -CONFIG_OSI_TRACE_LEVEL_NONE= -CONFIG_OSI_TRACE_LEVEL_ERROR= -CONFIG_OSI_TRACE_LEVEL_WARNING=y -CONFIG_OSI_TRACE_LEVEL_API= -CONFIG_OSI_TRACE_LEVEL_EVENT= -CONFIG_OSI_TRACE_LEVEL_DEBUG= -CONFIG_OSI_TRACE_LEVEL_VERBOSE= -CONFIG_OSI_INITIAL_TRACE_LEVEL=2 -CONFIG_BLUFI_TRACE_LEVEL_NONE= -CONFIG_BLUFI_TRACE_LEVEL_ERROR= -CONFIG_BLUFI_TRACE_LEVEL_WARNING=y -CONFIG_BLUFI_TRACE_LEVEL_API= -CONFIG_BLUFI_TRACE_LEVEL_EVENT= -CONFIG_BLUFI_TRACE_LEVEL_DEBUG= -CONFIG_BLUFI_TRACE_LEVEL_VERBOSE= -CONFIG_BLUFI_INITIAL_TRACE_LEVEL=2 -CONFIG_BT_ACL_CONNECTIONS=4 -CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST= -CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY= -CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK= -CONFIG_SMP_ENABLE=y -CONFIG_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY= -CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT=30 +CONFIG_BLUEDROID_ENABLED= CONFIG_BT_RESERVE_DRAM=0xdb5c +CONFIG_NIMBLE_ENABLED=y +CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y +CONFIG_NIMBLE_MEM_ALLOC_MODE_DEFAULT= +CONFIG_NIMBLE_MAX_CONNECTIONS=3 +CONFIG_NIMBLE_MAX_BONDS=3 +CONFIG_NIMBLE_MAX_CCCDS=8 +CONFIG_NIMBLE_L2CAP_COC_MAX_NUM=0 +CONFIG_NIMBLE_PINNED_TO_CORE_0=y +CONFIG_NIMBLE_PINNED_TO_CORE_1= +CONFIG_NIMBLE_PINNED_TO_CORE=0 +CONFIG_NIMBLE_TASK_STACK_SIZE=4096 +CONFIG_NIMBLE_ROLE_CENTRAL=y +CONFIG_NIMBLE_ROLE_PERIPHERAL=y +CONFIG_NIMBLE_ROLE_BROADCASTER=y +CONFIG_NIMBLE_ROLE_OBSERVER=y +CONFIG_NIMBLE_NVS_PERSIST=y +CONFIG_NIMBLE_SM_LEGACY=y +CONFIG_NIMBLE_SM_SC=y +CONFIG_NIMBLE_DEBUG= +CONFIG_NIMBLE_SM_SC_DEBUG_KEYS= +CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME="nimble" +CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31 +CONFIG_NIMBLE_ATT_PREFERRED_MTU=256 +CONFIG_NIMBLE_SVC_GAP_APPEARANCE=0 +CONFIG_NIMBLE_ACL_BUF_COUNT=12 +CONFIG_NIMBLE_ACL_BUF_SIZE=255 +CONFIG_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 +CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 +CONFIG_NIMBLE_MSYS1_BLOCK_COUNT=12 +CONFIG_NIMBLE_HS_FLOW_CTRL=y +CONFIG_NIMBLE_HS_FLOW_CTRL_ITVL=1000 +CONFIG_NIMBLE_HS_FLOW_CTRL_THRESH=2 +CONFIG_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT=y +CONFIG_NIMBLE_RPA_TIMEOUT=900 +CONFIG_NIMBLE_MESH=y +CONFIG_NIMBLE_MESH_PROXY=y +CONFIG_NIMBLE_MESH_PROV=y +CONFIG_NIMBLE_MESH_PB_ADV=y +CONFIG_NIMBLE_MESH_PB_GATT=y +CONFIG_NIMBLE_MESH_GATT_PROXY=y +CONFIG_NIMBLE_MESH_RELAY= +CONFIG_NIMBLE_MESH_LOW_POWER= +CONFIG_NIMBLE_MESH_FRIEND= +CONFIG_NIMBLE_MESH_DEVICE_NAME="nimble-mesh-node" +CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS=y +CONFIG_BLE_MESH= # # Driver configurations @@ -403,6 +267,11 @@ CONFIG_SPI_MASTER_ISR_IN_IRAM=y CONFIG_SPI_SLAVE_IN_IRAM=y CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# +# CAN Configuration +# +CONFIG_CAN_ISR_IN_IRAM= + # # eFuse Bit Manager # @@ -417,12 +286,12 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 # ESP32-specific # CONFIG_IDF_TARGET_ESP32=y -CONFIG_ESP32_REV_MIN_0=y +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_REV_MIN_0= CONFIG_ESP32_REV_MIN_1= CONFIG_ESP32_REV_MIN_2= -CONFIG_ESP32_REV_MIN_3= -CONFIG_ESP32_REV_MIN=0 -CONFIG_ESP32_DPORT_WORKAROUND=y +CONFIG_ESP32_REV_MIN_3=y +CONFIG_ESP32_REV_MIN=3 CONFIG_ESP32_DEFAULT_CPU_FREQ_80= CONFIG_ESP32_DEFAULT_CPU_FREQ_160= CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y @@ -435,17 +304,20 @@ CONFIG_SPIRAM_SUPPORT=y CONFIG_SPIRAM_BOOT_INIT=y CONFIG_SPIRAM_IGNORE_NOTFOUND=y CONFIG_SPIRAM_USE_MEMMAP= -CONFIG_SPIRAM_USE_CAPS_ALLOC=y -CONFIG_SPIRAM_USE_MALLOC= +CONFIG_SPIRAM_USE_CAPS_ALLOC= +CONFIG_SPIRAM_USE_MALLOC=y CONFIG_SPIRAM_TYPE_AUTO=y CONFIG_SPIRAM_TYPE_ESPPSRAM32= CONFIG_SPIRAM_TYPE_ESPPSRAM64= CONFIG_SPIRAM_SIZE=-1 CONFIG_SPIRAM_SPEED_40M=y CONFIG_SPIRAM_MEMTEST=y -CONFIG_SPIRAM_CACHE_WORKAROUND=y -CONFIG_SPIRAM_BANKSWITCH_ENABLE= +CONFIG_SPIRAM_BANKSWITCH_ENABLE=y +CONFIG_SPIRAM_BANKSWITCH_RESERVE=8 +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST= +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 +CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY= CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY= # @@ -465,6 +337,7 @@ CONFIG_D2WD_PSRAM_CS_IO=10 # CONFIG_PICO_PSRAM_CS_IO=10 CONFIG_SPIRAM_SPIWP_SD3_PIN=7 +CONFIG_SPIRAM_2T_MODE= CONFIG_MEMMAP_TRACEMEM= CONFIG_MEMMAP_TRACEMEM_TWOBANKS= CONFIG_ESP32_TRAX= @@ -536,16 +409,11 @@ CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 # Wi-Fi # CONFIG_SW_COEXIST_ENABLE=y -CONFIG_SW_COEXIST_PREFERENCE_WIFI= -CONFIG_SW_COEXIST_PREFERENCE_BT= -CONFIG_SW_COEXIST_PREFERENCE_BALANCE=y -CONFIG_SW_COEXIST_PREFERENCE_VALUE=2 CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 -CONFIG_ESP32_WIFI_STATIC_TX_BUFFER= -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 +CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0 +CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16 CONFIG_ESP32_WIFI_CSI_ENABLED= CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y CONFIG_ESP32_WIFI_TX_BA_WIN=6 @@ -558,6 +426,7 @@ CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE= CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT= # # PHY @@ -702,7 +571,8 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 CONFIG_FREERTOS_ISR_STACKSIZE=1536 CONFIG_FREERTOS_LEGACY_HOOKS= CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -CONFIG_SUPPORT_STATIC_ALLOCATION= +CONFIG_SUPPORT_STATIC_ALLOCATION=y +CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK= CONFIG_TIMER_TASK_PRIORITY=1 CONFIG_TIMER_TASK_STACK_DEPTH=2048 CONFIG_TIMER_QUEUE_LENGTH=10 @@ -726,7 +596,6 @@ CONFIG_HEAP_TRACING= # # libsodium # -CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y # # Log output @@ -744,14 +613,19 @@ CONFIG_LOG_COLORS=y # LWIP # CONFIG_L2_TO_L3_COPY= +CONFIG_ETHARP_SUPPORT_VLAN=y CONFIG_LWIP_IRAM_OPTIMIZATION= CONFIG_LWIP_MAX_SOCKETS=10 +CONFIG_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS=y CONFIG_USE_ONLY_LWIP_SELECT= +CONFIG_LWIP_SO_LINGER= CONFIG_LWIP_SO_REUSE=y CONFIG_LWIP_SO_REUSE_RXTOALL=y CONFIG_LWIP_SO_RCVBUF=y -CONFIG_LWIP_IP_FRAG= -CONFIG_LWIP_IP_REASSEMBLY= +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +CONFIG_LWIP_IP4_REASSEMBLY= +CONFIG_LWIP_IP6_REASSEMBLY= CONFIG_LWIP_STATS= CONFIG_LWIP_ETHARP_TRUST_IP_MAC= CONFIG_ESP_GRATUITOUS_ARP=y @@ -766,14 +640,17 @@ CONFIG_LWIP_DHCP_RESTORE_LAST_IP= CONFIG_LWIP_DHCPS_LEASE_UNIT=60 CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 CONFIG_LWIP_AUTOIP= +CONFIG_LWIP_IPV6_AUTOCONFIG= CONFIG_LWIP_NETIF_LOOPBACK=y CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 # # TCP # +CONFIG_LWIP_TCP_ISN_HOOK=y CONFIG_LWIP_MAX_ACTIVE_TCP=16 CONFIG_LWIP_MAX_LISTENING_TCP=16 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y CONFIG_TCP_MAXRTX=12 CONFIG_TCP_SYNMAXRTX=6 CONFIG_TCP_MSS=1436 @@ -786,6 +663,7 @@ CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= CONFIG_TCP_OVERSIZE_MSS=y CONFIG_TCP_OVERSIZE_QUARTER_MSS= CONFIG_TCP_OVERSIZE_DISABLE= +CONFIG_LWIP_TCP_RTO_TIME=1500 # # UDP @@ -797,12 +675,14 @@ CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y CONFIG_TCPIP_TASK_AFFINITY_CPU0= CONFIG_TCPIP_TASK_AFFINITY_CPU1= CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 CONFIG_PPP_SUPPORT= # # ICMP # -CONFIG_LWIP_MULTICAST_PING= +CONFIG_LWIP_MULTICAST_PING=y CONFIG_LWIP_BROADCAST_PING= # @@ -815,6 +695,7 @@ CONFIG_LWIP_MAX_RAW_PCBS=16 # CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +CONFIG_LWIP_ESP_LWIP_ASSERT=y # # mbedTLS @@ -826,13 +707,14 @@ CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC= CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN= CONFIG_MBEDTLS_DEBUG= -CONFIG_MBEDTLS_ECP_RESTARTABLE= -CONFIG_MBEDTLS_CMAC_C= +CONFIG_MBEDTLS_ECP_RESTARTABLE=y +CONFIG_MBEDTLS_CMAC_C=y CONFIG_MBEDTLS_HARDWARE_AES=y -CONFIG_MBEDTLS_HARDWARE_MPI= -CONFIG_MBEDTLS_HARDWARE_SHA= +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_MPI_USE_INTERRUPT= +CONFIG_MBEDTLS_HARDWARE_SHA=y CONFIG_MBEDTLS_HAVE_TIME=y -CONFIG_MBEDTLS_HAVE_TIME_DATE= +CONFIG_MBEDTLS_HAVE_TIME_DATE=y CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y CONFIG_MBEDTLS_TLS_SERVER_ONLY= CONFIG_MBEDTLS_TLS_CLIENT_ONLY= @@ -874,7 +756,7 @@ CONFIG_MBEDTLS_BLOWFISH_C= CONFIG_MBEDTLS_XTEA_C= CONFIG_MBEDTLS_CCM_C=y CONFIG_MBEDTLS_GCM_C=y -CONFIG_MBEDTLS_RIPEMD160_C= +CONFIG_MBEDTLS_RIPEMD160_C=y # # Certificates @@ -1015,3 +897,9 @@ CONFIG_WL_SECTOR_SIZE=4096 # Wi-Fi Provisioning Manager # CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 + +# +# Supplicant +# +CONFIG_WPA_WPS_WARS= +CONFIG_WPA_DEBUG_PRINT= diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/ffconf.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/ffconf.h new file mode 100644 index 0000000000..9ed6180ada --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/Libraries/ffconf.h @@ -0,0 +1,284 @@ +#include +#include "sdkconfig.h" +/*---------------------------------------------------------------------------/ +/ FatFs - Configuration file +/---------------------------------------------------------------------------*/ + +#define FFCONF_DEF 89352 /* Revision ID */ + +/*---------------------------------------------------------------------------/ +/ Function Configurations +/---------------------------------------------------------------------------*/ + +#define FF_FS_READONLY 0 +/* This option switches read-only configuration. (0:Read/Write or 1:Read-only) +/ Read-only configuration removes writing API functions, f_write(), f_sync(), +/ f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() +/ and optional writing functions as well. */ + +#define FF_FS_MINIMIZE 0 +/* This option defines minimization level to remove some basic API functions. +/ +/ 0: Basic functions are fully enabled. +/ 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_truncate() and f_rename() +/ are removed. +/ 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. +/ 3: f_lseek() function is removed in addition to 2. */ + +#define FF_USE_STRFUNC 1 +/* This option switches string functions, f_gets(), f_putc(), f_puts() and f_printf(). +/ +/ 0: Disable string functions. +/ 1: Enable without LF-CRLF conversion. +/ 2: Enable with LF-CRLF conversion. */ + +#define FF_USE_FIND 1 +/* This option switches filtered directory read functions, f_findfirst() and +/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */ + +#define FF_USE_MKFS 1 +/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ + +#define FF_USE_FASTSEEK 0 +/* This option switches fast seek function. (0:Disable or 1:Enable) */ + +#define FF_USE_EXPAND 0 +/* This option switches f_expand function. (0:Disable or 1:Enable) */ + +#define FF_USE_CHMOD 1 +/* This option switches attribute manipulation functions, f_chmod() and f_utime(). +/ (0:Disable or 1:Enable) Also FF_FS_READONLY needs to be 0 to enable this option. */ + +#define FF_USE_LABEL 0 +/* This option switches volume label functions, f_getlabel() and f_setlabel(). +/ (0:Disable or 1:Enable) */ + +#define FF_USE_FORWARD 0 +/* This option switches f_forward() function. (0:Disable or 1:Enable) */ + +/*---------------------------------------------------------------------------/ +/ Locale and Namespace Configurations +/---------------------------------------------------------------------------*/ + +#define FF_CODE_PAGE CONFIG_FATFS_CODEPAGE +/* This option specifies the OEM code page to be used on the target system. +/ Incorrect code page setting can cause a file open failure. +/ +/ 437 - U.S. +/ 720 - Arabic +/ 737 - Greek +/ 771 - KBL +/ 775 - Baltic +/ 850 - Latin 1 +/ 852 - Latin 2 +/ 855 - Cyrillic +/ 857 - Turkish +/ 860 - Portuguese +/ 861 - Icelandic +/ 862 - Hebrew +/ 863 - Canadian French +/ 864 - Arabic +/ 865 - Nordic +/ 866 - Russian +/ 869 - Greek 2 +/ 932 - Japanese (DBCS) +/ 936 - Simplified Chinese (DBCS) +/ 949 - Korean (DBCS) +/ 950 - Traditional Chinese (DBCS) +/ 0 - Include all code pages above and configured by f_setcp() +*/ + +#if defined(CONFIG_FATFS_LFN_STACK) +#define FF_USE_LFN 2 +#elif defined(CONFIG_FATFS_LFN_HEAP) +#define FF_USE_LFN 3 +#else /* CONFIG_FATFS_LFN_NONE */ +#define FF_USE_LFN 0 +#endif + +#ifdef CONFIG_FATFS_MAX_LFN +#define FF_MAX_LFN CONFIG_FATFS_MAX_LFN +#endif + +/* The FF_USE_LFN switches the support for LFN (long file name). +/ +/ 0: Disable LFN. FF_MAX_LFN has no effect. +/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. +/ 2: Enable LFN with dynamic working buffer on the STACK. +/ 3: Enable LFN with dynamic working buffer on the HEAP. +/ +/ To enable the LFN, ffunicode.c needs to be added to the project. The LFN function +/ requiers certain internal working buffer occupies (FF_MAX_LFN + 1) * 2 bytes and +/ additional (FF_MAX_LFN + 44) / 15 * 32 bytes when exFAT is enabled. +/ The FF_MAX_LFN defines size of the working buffer in UTF-16 code unit and it can +/ be in range of 12 to 255. It is recommended to be set 255 to fully support LFN +/ specification. +/ When use stack for the working buffer, take care on stack overflow. When use heap +/ memory for the working buffer, memory management functions, ff_memalloc() and +/ ff_memfree() in ffsystem.c, need to be added to the project. */ + +#ifdef CONFIG_FATFS_API_ENCODING_UTF_8 +#define FF_LFN_UNICODE 2 +#elif defined(CONFIG_FATFS_API_ENCODING_UTF_16) +#define FF_LFN_UNICODE 1 +#else /* CONFIG_FATFS_API_ENCODING_ANSI_OEM */ +#define FF_LFN_UNICODE 0 +#endif +/* This option switches the character encoding on the API when LFN is enabled. +/ +/ 0: ANSI/OEM in current CP (TCHAR = char) +/ 1: Unicode in UTF-16 (TCHAR = WCHAR) +/ 2: Unicode in UTF-8 (TCHAR = char) +/ +/ Also behavior of string I/O functions will be affected by this option. +/ When LFN is not enabled, this option has no effect. */ + +#define FF_LFN_BUF 255 +#define FF_SFN_BUF 12 +/* This set of options defines size of file name members in the FILINFO structure +/ which is used to read out directory items. These values should be suffcient for +/ the file names to read. The maximum possible length of the read file name depends +/ on character encoding. When LFN is not enabled, these options have no effect. */ + +#define FF_STRF_ENCODE 3 +/* When FF_LFN_UNICODE >= 1 with LFN enabled, string I/O functions, f_gets(), +/ f_putc(), f_puts and f_printf() convert the character encoding in it. +/ This option selects assumption of character encoding ON THE FILE to be +/ read/written via those functions. +/ +/ 0: ANSI/OEM in current CP +/ 1: Unicode in UTF-16LE +/ 2: Unicode in UTF-16BE +/ 3: Unicode in UTF-8 +*/ + +#define FF_FS_RPATH 2 +/* This option configures support for relative path. +/ +/ 0: Disable relative path and remove related functions. +/ 1: Enable relative path. f_chdir() and f_chdrive() are available. +/ 2: f_getcwd() function is available in addition to 1. +*/ + +/*---------------------------------------------------------------------------/ +/ Drive/Volume Configurations +/---------------------------------------------------------------------------*/ + +#define FF_VOLUMES 2 +/* Number of volumes (logical drives) to be used. (1-10) */ + +#define FF_STR_VOLUME_ID 0 +#define FF_VOLUME_STRS "RAM", "NAND", "CF", "SD", "SD2", "USB", "USB2", "USB3" +/* FF_STR_VOLUME_ID switches string support for volume ID. +/ When FF_STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive +/ number in the path name. FF_VOLUME_STRS defines the drive ID strings for each +/ logical drives. Number of items must be equal to FF_VOLUMES. Valid characters for +/ the drive ID strings are: A-Z and 0-9. */ + +#define FF_MULTI_PARTITION 1 +/* This option switches support for multiple volumes on the physical drive. +/ By default (0), each logical drive number is bound to the same physical drive +/ number and only an FAT volume found on the physical drive will be mounted. +/ When this function is enabled (1), each logical drive number can be bound to +/ arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk() +/ funciton will be available. */ + +/* SD card sector size */ +#define FF_SS_SDCARD 512 +/* wear_levelling library sector size */ +#define FF_SS_WL CONFIG_WL_SECTOR_SIZE + +#define FF_MIN_SS MIN(FF_SS_SDCARD, FF_SS_WL) +#define FF_MAX_SS MAX(FF_SS_SDCARD, FF_SS_WL) +/* This set of options configures the range of sector size to be supported. (512, +/ 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and +/ harddisk. But a larger value may be required for on-board flash memory and some +/ type of optical media. When FF_MAX_SS is larger than FF_MIN_SS, FatFs is configured +/ for variable sector size mode and disk_ioctl() function needs to implement +/ GET_SECTOR_SIZE command. */ + +#define FF_USE_TRIM 0 +/* This option switches support for ATA-TRIM. (0:Disable or 1:Enable) +/ To enable Trim function, also CTRL_TRIM command should be implemented to the +/ disk_ioctl() function. */ + +#define FF_FS_NOFSINFO 0 +/* If you need to know correct free space on the FAT32 volume, set bit 0 of this +/ option, and f_getfree() function at first time after volume mount will force +/ a full FAT scan. Bit 1 controls the use of last allocated cluster number. +/ +/ bit0=0: Use free cluster count in the FSINFO if available. +/ bit0=1: Do not trust free cluster count in the FSINFO. +/ bit1=0: Use last allocated cluster number in the FSINFO if available. +/ bit1=1: Do not trust last allocated cluster number in the FSINFO. +*/ + +/*---------------------------------------------------------------------------/ +/ System Configurations +/---------------------------------------------------------------------------*/ + +#define FF_FS_TINY (!CONFIG_FATFS_PER_FILE_CACHE) +/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) +/ At the tiny configuration, size of file object (FIL) is shrinked FF_MAX_SS bytes. +/ Instead of private sector buffer eliminated from the file object, common sector +/ buffer in the filesystem object (FATFS) is used for the file data transfer. */ + +#define FF_FS_EXFAT 0 +/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable) +/ When enable exFAT, also LFN needs to be enabled. +/ Note that enabling exFAT discards ANSI C (C89) compatibility. */ + +#define FF_FS_NORTC 0 +#define FF_NORTC_MON 1 +#define FF_NORTC_MDAY 1 +#define FF_NORTC_YEAR 2017 +/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have +/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable +/ the timestamp function. All objects modified by FatFs will have a fixed timestamp +/ defined by FF_NORTC_MON, FF_NORTC_MDAY and FF_NORTC_YEAR in local time. +/ To enable timestamp function (FF_FS_NORTC = 0), get_fattime() function need to be +/ added to the project to read current time form real-time clock. FF_NORTC_MON, +/ FF_NORTC_MDAY and FF_NORTC_YEAR have no effect. +/ These options have no effect at read-only configuration (FF_FS_READONLY = 1). */ + +#define FF_FS_LOCK CONFIG_FATFS_FS_LOCK +/* The option FF_FS_LOCK switches file lock function to control duplicated file open +/ and illegal operation to open objects. This option must be 0 when FF_FS_READONLY +/ is 1. +/ +/ 0: Disable file lock function. To avoid volume corruption, application program +/ should avoid illegal open, remove and rename to the open objects. +/ >0: Enable file lock function. The value defines how many files/sub-directories +/ can be opened simultaneously under file lock control. Note that the file +/ lock control is independent of re-entrancy. */ + +#define FF_FS_REENTRANT 1 +#define FF_FS_TIMEOUT (CONFIG_FATFS_TIMEOUT_MS / portTICK_PERIOD_MS) +#define FF_SYNC_t SemaphoreHandle_t +/* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs +/ module itself. Note that regardless of this option, file access to different +/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs() +/ and f_fdisk() function, are always not re-entrant. Only file/directory access +/ to the same volume is under control of this function. +/ +/ 0: Disable re-entrancy. FF_FS_TIMEOUT and FF_SYNC_t have no effect. +/ 1: Enable re-entrancy. Also user provided synchronization handlers, +/ ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() +/ function, must be added to the project. Samples are available in +/ option/syscall.c. +/ +/ The FF_FS_TIMEOUT defines timeout period in unit of time tick. +/ The FF_SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*, +/ SemaphoreHandle_t and etc. A header file for O/S definitions needs to be +/ included somewhere in the scope of ff.h. */ + +#include "freertos/FreeRTOS.h" +#include "freertos/semphr.h" + +/* Some memory allocation functions are declared here in addition to ff.h, so that + they can be used also by external code when LFN feature is disabled. + */ +void *ff_memalloc(UINT msize); +void *ff_memcalloc(UINT num, UINT size); + +/*--- End of configuration options ---*/ diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/cpu.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/cpu.h index b7a155809d..15565c2e89 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/cpu.h +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/IDF/cpu.h @@ -15,7 +15,9 @@ #ifndef _SOC_CPU_H #define _SOC_CPU_H -#include +#include +#include +#include #include "xtensa/corebits.h" #include "xtensa/config/core.h" diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/CMakeLists.txt b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/CMakeLists.txt index 94ad5bfa41..c576b42f26 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/CMakeLists.txt +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/CMakeLists.txt @@ -14,7 +14,6 @@ list(APPEND TARGET_ESP32_IDF_INCLUDES "${COMPONENT_PATH}/lwip/lwip/src/include/l list(APPEND TARGET_ESP32_IDF_INCLUDES "${COMPONENT_PATH}/lwip/port/esp32/include") - # Lwip Library list( APPEND TARGET_LWIP_API_SOURCES "${COMPONENT_PATH}/lwip/lwip/src/api/api_lib.c" ) list( APPEND TARGET_LWIP_API_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/nf_api_msg.c" ) @@ -40,6 +39,7 @@ list(APPEND TARGET_LWIP_PORT_SOURCES "${COMPONENT_PATH}/lwip/port/esp32/netif/et list(APPEND TARGET_LWIP_PORT_SOURCES "${COMPONENT_PATH}/lwip/port/esp32/netif/wlanif.c" ) list(APPEND TARGET_LWIP_PORT_SOURCES "${COMPONENT_PATH}/lwip/port/esp32/debug/lwip_debug.c" ) list(APPEND TARGET_LWIP_PORT_SOURCES "${COMPONENT_PATH}/lwip/port/esp32/vfs_lwip.c" ) +list(APPEND TARGET_LWIP_PORT_SOURCES "${COMPONENT_PATH}/lwip/port/esp32/tcp_isn/tcp_isn.c" ) list(APPEND TARGET_LWIP_SOURCES ${TARGET_LWIP_API_SOURCES} ${TARGET_LWIP_APPS1_SOURCES} ${TARGET_LWIP_APPS2_SOURCES} ${TARGET_LWIP_APPS3_SOURCES} ${TARGET_LWIP_APPS4_SOURCES} ${TARGET_LWIP_CORE_SOURCES} ${TARGET_LWIP_CORE_IP4_SOURCES} ${TARGET_LWIP_CORE_IP6_SOURCES} ${TARGET_LWIP_NETIF_SOURCES} ${TARGET_LWIP_PORT_SOURCES} ) #list( APPEND CMAKE_C_FLAGS " -Wno-address -Wno-unused-variable -Wno-unused-but-set-variable " ) diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/lwipopts.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/lwipopts.h index 509e512c99..dd9a06c358 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/lwipopts.h +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/lwipopts.h @@ -379,6 +379,23 @@ #define TCP_RCV_SCALE CONFIG_TCP_RCV_SCALE #endif +/** + * LWIP_TCP_RTO_TIME: TCP rto time. + * Default is 3 second. + */ +#define LWIP_TCP_RTO_TIME CONFIG_LWIP_TCP_RTO_TIME + +/** + * Set TCP hook for Initial Sequence Number (ISN) + */ +#ifdef CONFIG_LWIP_TCP_ISN_HOOK +//#include +//struct ip_addr; +//u32_t lwip_hook_tcp_isn(const struct ip_addr *local_ip, u16_t local_port, +// const struct ip_addr *remote_ip, u16_t remote_port); +#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn +#endif + /* ---------------------------------- ---------- Pbuf options ---------- @@ -756,6 +773,8 @@ */ #define LWIP_SOCKET_OFFSET (FD_SETSIZE - CONFIG_LWIP_MAX_SOCKETS) +#define TCP_OOSEQ_DEBUG LWIP_DBG_ON + /* Enable all Espressif-only options */ #define ESP_LWIP 1 diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/nf_sys_arch.c b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/nf_sys_arch.c index 5f539fcf26..4509a88a2e 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/nf_sys_arch.c +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Lwip/nf_sys_arch.c @@ -426,9 +426,11 @@ sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize void sys_init(void) { + if (!g_lwip_protect_mutex) { if (ERR_OK != sys_mutex_new(&g_lwip_protect_mutex)) { ESP_LOGE(TAG, "sys_init: failed to init lwip protect mutex\n"); } + } // Create the pthreads key for the per-thread semaphore storage pthread_key_create(&sys_thread_sem_key, sys_thread_sem_free); @@ -482,6 +484,9 @@ sys_now(void) sys_prot_t sys_arch_protect(void) { + if (!g_lwip_protect_mutex) { + sys_mutex_new(&g_lwip_protect_mutex); + } sys_mutex_lock(&g_lwip_protect_mutex); return (sys_prot_t) 1; } diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_SmartConfig.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_SmartConfig.cpp index feeede15d6..10c5ac8fbd 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_SmartConfig.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_SmartConfig.cpp @@ -6,15 +6,16 @@ #include #include "esp32_os.h" #include "esp_smartconfig.h" - + static const int ESPTOUCH_DONE_BIT = BIT1; static const char *TAG = "sc"; static EventGroupHandle_t sc_wifi_event_group; -static void sc_callback(smartconfig_status_t status, void *pdata) +static void sc_callback(smartconfig_status_t status, void *pdata) { - switch (status) { + switch (status) + { case SC_STATUS_WAIT: ESP_LOGI(TAG, "SC_STATUS_WAIT"); break; @@ -35,21 +36,20 @@ static void sc_callback(smartconfig_status_t status, void *pdata) ESP_LOGI(TAG, "PASSWORD:%s", wifi_config->sta.password); // Try to connect and Save config - Network_Interface_Connect( 0, - (const char *)wifi_config->sta.ssid, - (const char *)wifi_config->sta.password, - NETWORK_CONNECT_SAVE_CONFIG + NETWORK_CONNECT_RECONNECT - ); - + Network_Interface_Start_Connect( + 0, + (const char *)wifi_config->sta.ssid, + (const char *)wifi_config->sta.password, + NETWORK_CONNECT_SAVE_CONFIG + NETWORK_CONNECT_RECONNECT); } break; - + case SC_STATUS_LINK_OVER: ESP_LOGI(TAG, "SC_STATUS_LINK_OVER"); - if (pdata != NULL) + if (pdata != NULL) { - uint8_t phone_ip[4] = { 0 }; - memcpy(phone_ip, (uint8_t* )pdata, 4); + uint8_t phone_ip[4] = {0}; + memcpy(phone_ip, (uint8_t *)pdata, 4); ESP_LOGI(TAG, "Phone ip: %d.%d.%d.%d\n", phone_ip[0], phone_ip[1], phone_ip[2], phone_ip[3]); } xEventGroupSetBits(sc_wifi_event_group, ESPTOUCH_DONE_BIT); @@ -60,16 +60,18 @@ static void sc_callback(smartconfig_status_t status, void *pdata) } } -void smartconfig_task(void * parm) +void smartconfig_task(void *parm) { EventBits_t uxBits; sc_wifi_event_group = xEventGroupCreate(); - ESP_ERROR_CHECK( esp_smartconfig_set_type(SC_TYPE_ESPTOUCH) ); - ESP_ERROR_CHECK( esp_smartconfig_start(sc_callback) ); - while (1) { - uxBits = xEventGroupWaitBits(sc_wifi_event_group, ESPTOUCH_DONE_BIT, true, false, portMAX_DELAY); - if(uxBits & ESPTOUCH_DONE_BIT) { + ESP_ERROR_CHECK(esp_smartconfig_set_type(SC_TYPE_ESPTOUCH)); + ESP_ERROR_CHECK(esp_smartconfig_start(sc_callback)); + while (1) + { + uxBits = xEventGroupWaitBits(sc_wifi_event_group, ESPTOUCH_DONE_BIT, true, false, portMAX_DELAY); + if (uxBits & ESPTOUCH_DONE_BIT) + { ESP_LOGI(TAG, "smartconfig over"); esp_smartconfig_stop(); vEventGroupDelete(sc_wifi_event_group); @@ -78,10 +80,7 @@ void smartconfig_task(void * parm) } } - void Start_wifi_smart_config(void) { xTaskCreate(smartconfig_task, "smartconfig_task", 4096, NULL, 3, NULL); } - - diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_Wireless.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_Wireless.cpp index e84b73209a..c9ba8e400c 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_Wireless.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Esp32_Wireless.cpp @@ -139,7 +139,7 @@ esp_err_t Esp32_InitaliseWifi() return ec; } -esp_err_t Esp32_Wireless_Connect(HAL_Configuration_Wireless80211 *pWireless) +esp_err_t Esp32_Wireless_Start_Connect(HAL_Configuration_Wireless80211 *pWireless) { esp_err_t ec; @@ -162,7 +162,7 @@ esp_err_t Esp32_Wireless_Connect(HAL_Configuration_Wireless80211 *pWireless) return ec; ec = esp_wifi_connect(); - ESP_LOGI(TAG, "WiFi Connect to %s result %d", sta_config.sta.ssid, ec); + ESP_LOGI(TAG, "WiFi Start Connect to %s result %d", sta_config.sta.ssid, ec); if (ec != ESP_OK) return ec; @@ -210,19 +210,15 @@ int Esp32_Wireless_Open(int index, HAL_Configuration_NetworkInterface *pConfig) if ((pWireless->Options & Wireless80211Configuration_ConfigurationOptions_AutoConnect) && (hal_strlen_s((const char *)pWireless->Ssid) > 0)) { - Esp32_Wireless_Connect(pWireless); + Esp32_Wireless_Start_Connect(pWireless); // Maybe remove SmartConfig flag if conected ok } if (pWireless->Options & Wireless80211Configuration_ConfigurationOptions_SmartConfig) { - // FIXME - // Disable for now, When the smart_config starts it scans for wireless AP - // If it doesn't find any AP it ends up with a exception which causes the device to restart - // Start Smart config (if enabled) - // Start_wifi_smart_config(); + Start_wifi_smart_config(); } return Esp32_Wait_NetNumber(ESP_IF_WIFI_STA); diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Target_Network.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Target_Network.cpp index 690a4bae27..9ce6795ccf 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Target_Network.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/Target_Network.cpp @@ -19,7 +19,10 @@ int Esp32_Ethernet_Open(int index, HAL_Configuration_NetworkInterface *config); bool Esp32_Ethernet_Close(int index); int Esp32_Wireless_Scan(); int Esp32_Wireless_Disconnect(); -int Esp32_Wireless_Connect(HAL_Configuration_Wireless80211 *pWireless); +int Esp32_Wireless_Start_Connect(HAL_Configuration_Wireless80211 *pWireless); + +bool Esp32_ConnectInProgress = false; +int Esp32_ConnectResult = 0; bool StoreConfigBlock( DeviceConfigurationOption configType, @@ -122,7 +125,7 @@ bool GetWirelessConfig(int configIndex, HAL_Configuration_Wireless80211 **pWirel // // Connect to wireless network SSID using passphase // -int Network_Interface_Connect(int configIndex, const char *ssid, const char *passphase, int options) +int Network_Interface_Start_Connect(int configIndex, const char *ssid, const char *passphase, int options) { HAL_Configuration_Wireless80211 *pWireless; @@ -133,15 +136,19 @@ int Network_Interface_Connect(int configIndex, const char *ssid, const char *pas if (options & NETWORK_CONNECT_RECONNECT) { - // need this stupid cast because the current gcc version with ESP32 IDF is not happy with the simple sintax '|=' + // need this stupid cast because the current gcc version with ESP32 IDF is not happy with the simple syntax '|=' pWireless->Options = (Wireless80211Configuration_ConfigurationOptions)( pWireless->Options | Wireless80211Configuration_ConfigurationOptions_AutoConnect); } else { - // need this stupid cast because the current gcc version with ESP32 IDF is not happy with the simple sintax '^=' + // need this stupid cast because the current gcc version with ESP32 IDF is not happy with the simple syntax '^=' pWireless->Options = (Wireless80211Configuration_ConfigurationOptions)( pWireless->Options ^ Wireless80211Configuration_ConfigurationOptions_AutoConnect); + + // Make sure we are still enabled because AutoConnect includes Enable + pWireless->Options = (Wireless80211Configuration_ConfigurationOptions)( + pWireless->Options | Wireless80211Configuration_ConfigurationOptions_Enable); } // Update Wireless structure with new SSID and passphase @@ -162,7 +169,8 @@ int Network_Interface_Connect(int configIndex, const char *ssid, const char *pas { // Wireless case TCPIP_ADAPTER_IF_STA: - esp_err_t err = Esp32_Wireless_Connect(pWireless); + Esp32_ConnectInProgress = true; + esp_err_t err = Esp32_Wireless_Start_Connect(pWireless); return (int)err; } @@ -170,6 +178,18 @@ int Network_Interface_Connect(int configIndex, const char *ssid, const char *pas return SOCK_SOCKET_ERROR; } +int Network_Interface_Connect_Result(int configIndex) +{ + switch ((tcpip_adapter_if_t)configIndex) + { + // Wireless + case TCPIP_ADAPTER_IF_STA: + return Esp32_ConnectInProgress ? -1 : Esp32_ConnectResult; + } + + return SOCK_SOCKET_ERROR; +} + int Network_Interface_Disconnect(int configIndex) { switch ((tcpip_adapter_if_t)configIndex) diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/targetHAL_Network.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/targetHAL_Network.cpp index b52bcf1c7a..8ed1f47db5 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/targetHAL_Network.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/Network/targetHAL_Network.cpp @@ -13,6 +13,8 @@ #include extern "C" void set_signal_sock_function(void (*funcPtr)()); +extern bool Esp32_ConnectInProgress; +extern int Esp32_ConnectResult; #define WIFI_EVENT_TYPE_SCAN_COMPLETE 1 @@ -57,6 +59,19 @@ static void PostAPStationChanged(uint connect, uint netInfo) Network_PostEvent(NetworkChange_NetworkEventType_APStationChanged, connect, netInfo); } +static void PostConnectResult(int result) +{ + Esp32_ConnectResult = result; + Esp32_ConnectInProgress = false; + +#ifdef NetEventPrint + ets_printf("PostConnectResult reason : %d\n", result); +#endif + + // fire event for Wifi station job complete + Events_Set(SYSTEM_EVENT_FLAG_WIFI_STATION); +} + static void initialize_sntp() { sntp_stop(); @@ -82,8 +97,6 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) { // Wifi station events case SYSTEM_EVENT_STA_START: - // Smart config commented out as giving exception when running - // xTaskCreate(smartconfig_task, "smartconfig_example_task", 4096, NULL, 3, NULL); #ifdef NetEventPrint ets_printf("SYSTEM_EVENT_STA_START\n"); #endif @@ -95,7 +108,6 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) #endif PostAddressChanged(TCPIP_ADAPTER_IF_STA); initialize_sntp(); - // xEventGroupSetBits(wifi_event_group, CONNECTED_BIT); break; case SYSTEM_EVENT_STA_LOST_IP: @@ -109,16 +121,28 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) #ifdef NetEventPrint ets_printf("SYSTEM_EVENT_STA_CONNECTED\n"); #endif + if (Esp32_ConnectInProgress) + { + PostConnectResult(0); + } + PostAvailabilityOn(TCPIP_ADAPTER_IF_STA); break; case SYSTEM_EVENT_STA_DISCONNECTED: #ifdef NetEventPrint - ets_printf("SYSTEM_EVENT_STA_DISCONNECTED\n"); + ets_printf("SYSTEM_EVENT_STA_DISCONNECTED reason : %d\n", event->event_info.disconnected.reason); #endif - PostAvailabilityOff(TCPIP_ADAPTER_IF_STA); - esp_wifi_connect(); - // xEventGroupClearBits(wifi_event_group, CONNECTED_BIT); + + if (Esp32_ConnectInProgress) + { + PostConnectResult(event->event_info.disconnected.reason); + } + else + { + PostAvailabilityOff(TCPIP_ADAPTER_IF_STA); + esp_wifi_connect(); + } break; // Scan of available Wifi networks complete @@ -192,7 +216,6 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) PostAPStationChanged(0, TCPIP_ADAPTER_IF_AP + (stationIndex << 8)); #ifdef NetEventPrint ets_printf("SYSTEM_EVENT_AP_STADISCONNECTED %d\n", event->event_info.sta_disconnected.aid); - PrintStations(); #endif break; diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/cmake-variants.json b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/cmake-variants.json index fc48ef706a..82cab9bd54 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/cmake-variants.json +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/cmake-variants.json @@ -54,14 +54,16 @@ "API_Windows.Devices.Wifi": "ON", "API_Windows.Devices.Adc": "ON", "API_System.Device.Dac": "ON", - "API_System.IO.FileSystem": "OFF", + "API_System.IO.FileSystem": "ON", "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Storage": "ON", "API_Hardware.Esp32": "ON", "API_nanoFramework.Hardware.Esp32.Rmt": "ON" @@ -94,12 +96,14 @@ "API_Windows.Devices.Wifi": "ON", "API_Windows.Devices.Adc": "ON", "API_System.Device.Dac": "ON", - "API_System.IO.FileSystem": "OFF", + "API_System.IO.FileSystem": "ON", "API_Windows.Devices.Gpio": "ON", "API_Windows.Devices.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "ON", + "API_System.IO.Ports": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Storage": "ON", "API_Hardware.Esp32": "ON", "API_nanoFramework.Hardware.Esp32.Rmt": "ON", diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_HAL_Interface.c b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_HAL_Interface.c index ad492b7811..4faa9737f1 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_HAL_Interface.c +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_HAL_Interface.c @@ -17,8 +17,6 @@ #define TARGET_SERIAL_BAUDRATE 921600 #endif -WP_Message inboundMessage; - bool WP_Initialise(COM_HANDLE port); static bool WP_Port_Intitialised = false; @@ -84,72 +82,65 @@ bool WP_Initialise(COM_HANDLE port) return true; } -int WP_ReceiveBytes(uint8_t *ptr, uint16_t *size) +uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size) { // TODO: Initialise Port if not already done, Wire Protocol should be calling this directly at startup if (!WP_Port_Intitialised) + { WP_Initialise(WP_Port); + } - // save for latter comparison - uint16_t requestedSize = *size; + // save for later comparison + uint32_t requestedSize = *size; - // int readData = 0; - // sanity check for request of 0 size + // check for request with 0 size if (*size) { - ////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - ////////////////////////////////////////////////////////// - // change here to read (size) bytes from the input stream - // preferably with read timeout and being able to check - // if the requested number of bytes was actually read - ////////////////////////////////////////////////////////// - // non blocking read from serial port with 100ms timeout - volatile size_t read = - uart_read_bytes(WP_Port, ptr, (uint32_t)requestedSize, (TickType_t)100 / portTICK_PERIOD_MS); + size_t read = uart_read_bytes(WP_Port, ptr, (uint32_t)requestedSize, (TickType_t)100 / portTICK_PERIOD_MS); + + // check if any bytes where read + if (read == 0) + { + return false; + } + + // check if any bytes where read + if (read == 0) + { + return false; + } ptr += read; *size -= read; - - // check if the requested read matches the actual read count - return (requestedSize == read); } return true; } -int WP_TransmitMessage(WP_Message *message) +uint8_t WP_TransmitMessage(WP_Message *message) { - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // change here to write (size) bytes to the output stream - // preferably with timeout and being able to check - // if the write was sucessfull or at least buffered - ////////////////////////////////////////////////////////// - if (!WP_Port_Intitialised) + { WP_Initialise(WP_Port); + } // TODO Check if timeout required // write header to output stream - if (uart_write_bytes(WP_Port, (const char *)&message->m_header, sizeof(message->m_header)) != sizeof(message->m_header)) + { return false; + } // if there is anything on the payload send it to the output stream if (message->m_header.m_size && message->m_payload) { - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // see description above - ////////////////////////////////////////////////////////// if (uart_write_bytes(WP_Port, (const char *)message->m_payload, message->m_header.m_size) != (int)message->m_header.m_size) + { return false; + } } return true; diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_ReceiverThread.c b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_ReceiverThread.c index 31b3395e24..b5d8cf1082 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_ReceiverThread.c +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/common/WireProtocol_ReceiverThread.c @@ -6,24 +6,19 @@ #include #include "WireProtocol_HAL_Interface.h" -extern WP_Message inboundMessage; - -void WP_Message_Initialize(WP_Message *a); -void WP_Message_PrepareReception(WP_Message *a); -void WP_Message_Process(WP_Message *a); +void WP_Message_Process(); +void WP_Message_PrepareReception(); void ReceiverThread(void const *argument) { (void)argument; + WP_Message_PrepareReception(); + // loop forever while (1) { - - WP_Message_Initialize(&inboundMessage); - WP_Message_PrepareReception(&inboundMessage); - - WP_Message_Process(&inboundMessage); + WP_Message_Process(); // Allow other tasks a chance to run vTaskDelay(0); @@ -31,3 +26,8 @@ void ReceiverThread(void const *argument) // nothing to deinitialize or cleanup, so it's safe to return } + +void WP_Message_PrepareReception_Platform() +{ + // empty on purpose, nothing to configure +} diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/esp32.project.ld b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/esp32.project.ld index c1b973ddfc..4829125081 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/esp32.project.ld +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/esp32.project.ld @@ -1,6 +1,6 @@ /* Automatically generated file; DO NOT EDIT */ /* Espressif IoT Development Framework Linker Script */ -/* Generated from: C:/esp32_tools/esp-idf-v3.3/components/esp32/ld/esp32.project.ld.in */ +/* Generated from: C:/ESP32_TOOLS/esp-idf-v3.3.5/components/esp32/ld/esp32.project.ld.in */ /* Default entry point: */ ENTRY(call_start_cpu0); @@ -163,158 +163,158 @@ SECTIONS _iram_text_start = ABSOLUTE(.); *( .iram1 .iram1.*) - *libspi_flash.a:spi_flash_rom_patch.*( .literal .literal.* .text .text.*) - *libesp_ringbuf.a:( .literal .literal.* .text .text.*) - *libhal.a:( .literal .literal.* .text .text.*) *libapp_trace.a:( .literal .literal.* .text .text.*) - *libesp32.a:panic.*( .literal .literal.* .text .text.*) - *libespcoredump.a:core_dump_port.*( .literal .literal.* .text .text.*) - *libespcoredump.a:core_dump_common.*( .literal .literal.* .text .text.*) - *libespcoredump.a:core_dump_flash.*( .literal .literal.* .text .text.*) - *libespcoredump.a:core_dump_uart.*( .literal .literal.* .text .text.*) - *librtc.a:( .literal .literal.* .text .text.*) - *libgcc.a:lib2funcs.*( .literal .literal.* .text .text.*) - *libsoc.a:cpu_util.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_clk.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_init.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_periph.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_clk_init.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_wdt.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_sleep.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_pm.*( .literal .literal.* .text .text.*) - *libsoc.a:rtc_time.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strftime.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-timelocal.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strtoul.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strtol.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strlwr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-gettzinfo.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strndup.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-tzset_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:creat.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:isatty.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-abs.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-asctime.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-asctime_r.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-atoi.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isblank.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strlcpy.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-ispunct.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-impure.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-fflush.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-systimes.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-open.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-atol.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-bzero.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-close.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-creat.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-ctime.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-ctime_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-rand.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-lcltime_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strdup.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strsep.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-asctime_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isdigit.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-utoa.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memmove.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-toupper.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memcmp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strlen.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcmp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strnlen.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-toascii.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lock.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-wsetup.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-month_lengths.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-ctype_.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-div.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-environ.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memset.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strspn.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memcpy.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-sf_nan.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memchr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strncat.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-longjmp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strncasecmp.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-envlock.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-wctomb_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcasecmp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memccpy.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isprint.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-ungetc.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-rshift.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-syswrite.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-stdio.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-sbrk.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-tzcalc_limits.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-syssbrk.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcat.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-fclose.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-sccl.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strdup_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strrchr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isascii.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-rand_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strupr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-read.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-itoa.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-asctime.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-sysread.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-ctype_.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strtok_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-ldiv.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-atol.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-fflush.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-findfp.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-fputwc.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-system.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-setjmp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isgraph.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-wcrtomb.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-wbuf.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-fvwrite.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-fwalk.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-gmtime.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strptime.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strncpy.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strndup_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strlcat.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-getenv_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strstr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-gettzinfo.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-gmtime.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-gmtime_r.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-quorem.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-s_fpclassify.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcasestr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcpy.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-impure.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isalnum.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-isalpha.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isascii.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isblank.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-iscntrl.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isdigit.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isgraph.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-islower.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isprint.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-ispunct.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isspace.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-isupper.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-itoa.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-labs.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-lcltime.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-lcltime_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-ldiv.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-longjmp.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-makebuf.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-time.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-refill.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-labs.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isupper.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-bzero.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:isatty.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-findfp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-fvwrite.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memccpy.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memchr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memcmp.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memcpy.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memmove.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memrchr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-memset.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-mktime.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-sysclose.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-abs.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-month_lengths.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-open.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-quorem.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-raise.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-tzset.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-iscntrl.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-rand.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-rand_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-read.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-refill.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-rshift.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-s_fpclassify.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-sbrk.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-sccl.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-setjmp.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-sf_nan.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-srand.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcspn.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-ctime.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-stdio.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcasecmp.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcasestr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcat.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-strchr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-tolower.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcmp.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcoll.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcpy.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strcspn.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strdup.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strdup_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strftime.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strlcat.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strlcpy.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strlen.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strlwr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strncasecmp.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strncat.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-strncmp.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isalnum.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strncpy.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strndup.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strndup_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strnlen.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strptime.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strrchr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strsep.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strspn.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strstr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strtok_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strtol.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strtoul.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-strupr.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-sysclose.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-sysopen.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-sysread.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-syssbrk.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-system.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-systimes.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-syswrite.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-time.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-timelocal.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-toascii.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-tolower.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-toupper.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-tzcalc_limits.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-tzlock.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-islower.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-isspace.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-tzset.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-tzset_r.*( .literal .literal.* .text .text.*) *libc-psram-workaround.a:lib_a-tzvars.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-memrchr.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-close.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-div.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-strcoll.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:creat.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-sysopen.*( .literal .literal.* .text .text.*) - *libc-psram-workaround.a:lib_a-creat.*( .literal .literal.* .text .text.*) - *libpp.a:( .wifi0iram .wifi0iram.*) + *libc-psram-workaround.a:lib_a-ungetc.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-utoa.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-wbuf.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-wcrtomb.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-wctomb_r.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lib_a-wsetup.*( .literal .literal.* .text .text.*) + *libc-psram-workaround.a:lock.*( .literal .literal.* .text .text.*) + *libesp32.a:panic.*( .literal .literal.* .text .text.*) + *libesp_ringbuf.a:( .literal .literal.* .text .text.*) + *libespcoredump.a:core_dump_common.*( .literal .literal.* .text .text.*) + *libespcoredump.a:core_dump_flash.*( .literal .literal.* .text .text.*) + *libespcoredump.a:core_dump_port.*( .literal .literal.* .text .text.*) + *libespcoredump.a:core_dump_uart.*( .literal .literal.* .text .text.*) *libfreertos.a:( .literal .literal.* .text .text.*) + *libgcc.a:lib2funcs.*( .literal .literal.* .text .text.*) *libgcov.a:( .literal .literal.* .text .text.*) - *libxtensa-debug-module.a:eri.*( .literal .literal.* .text .text.*) - *libheap.a:multi_heap_poisoning.*( .literal .literal.* .text .text.*) + *libhal.a:( .literal .literal.* .text .text.*) *libheap.a:multi_heap.*( .literal .literal.* .text .text.*) - *libnet80211.a:( .wifi0iram .wifi0iram.*) + *libheap.a:multi_heap_poisoning.*( .literal .literal.* .text .text.*) + *libnet80211.a:( .wifirxiram .wifirxiram.*) + *libpp.a:( .wifirxiram .wifirxiram.*) + *librtc.a:( .literal .literal.* .text .text.*) + *libsoc.a:cpu_util.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_clk.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_clk_init.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_init.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_periph.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_pm.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_sleep.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_time.*( .literal .literal.* .text .text.*) + *libsoc.a:rtc_wdt.*( .literal .literal.* .text .text.*) + *libspi_flash.a:spi_flash_rom_patch.*( .literal .literal.* .text .text.*) + *libxtensa-debug-module.a:eri.*( .literal .literal.* .text .text.*) _iram_text_end = ABSOLUTE(.); _iram_end = ABSOLUTE(.); @@ -346,137 +346,137 @@ SECTIONS *( .data .data.* .dram1 .dram1.*) *libapp_trace.a:( .rodata .rodata.*) - *libesp32.a:panic.*( .rodata .rodata.*) - *libphy.a:( .rodata .rodata.*) - *libsoc.a:rtc_clk.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strftime.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-timelocal.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strtoul.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strtol.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strlwr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-gettzinfo.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strndup.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-tzset_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:creat.*( .rodata .rodata.*) + *libc-psram-workaround.a:isatty.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-abs.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-asctime.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-asctime_r.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-atoi.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isblank.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strlcpy.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-ispunct.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-impure.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-fflush.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-systimes.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-open.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-atol.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-bzero.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-close.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-creat.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-ctime.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-ctime_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-rand.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-lcltime_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strdup.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strsep.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-asctime_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isdigit.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-utoa.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memmove.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-toupper.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memcmp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strlen.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcmp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strnlen.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-toascii.*( .rodata .rodata.*) - *libc-psram-workaround.a:lock.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-wsetup.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-month_lengths.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-ctype_.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-div.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-environ.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memset.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strspn.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memcpy.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-sf_nan.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memchr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strncat.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-longjmp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strncasecmp.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-envlock.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-wctomb_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcasecmp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memccpy.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isprint.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-ungetc.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-rshift.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-syswrite.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-stdio.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-sbrk.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-tzcalc_limits.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-syssbrk.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcat.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-fclose.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-sccl.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strdup_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strrchr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isascii.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-rand_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strupr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-read.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-itoa.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-asctime.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-sysread.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-ctype_.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strtok_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-ldiv.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-atol.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-fflush.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-findfp.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-fputwc.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-system.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-setjmp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isgraph.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-wcrtomb.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-wbuf.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-fvwrite.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-fwalk.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-gmtime.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strptime.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strncpy.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strndup_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strlcat.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-getenv_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strstr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-gettzinfo.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-gmtime.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-gmtime_r.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-quorem.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-s_fpclassify.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcasestr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcpy.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-impure.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isalnum.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-isalpha.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isascii.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isblank.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-iscntrl.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isdigit.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isgraph.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-islower.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isprint.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-ispunct.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isspace.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-isupper.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-itoa.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-labs.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-lcltime.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-lcltime_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-ldiv.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-longjmp.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-makebuf.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-time.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-refill.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-labs.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isupper.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-bzero.*( .rodata .rodata.*) - *libc-psram-workaround.a:isatty.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-findfp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-fvwrite.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memccpy.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memchr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memcmp.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memcpy.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memmove.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memrchr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-memset.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-mktime.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-sysclose.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-abs.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-month_lengths.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-open.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-quorem.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-raise.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-tzset.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-iscntrl.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-rand.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-rand_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-read.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-refill.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-rshift.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-s_fpclassify.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-sbrk.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-sccl.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-setjmp.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-sf_nan.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-srand.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcspn.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-ctime.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-stdio.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcasecmp.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcasestr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcat.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-strchr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-tolower.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcmp.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcoll.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcpy.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strcspn.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strdup.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strdup_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strftime.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strlcat.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strlcpy.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strlen.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strlwr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strncasecmp.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strncat.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-strncmp.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isalnum.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strncpy.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strndup.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strndup_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strnlen.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strptime.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strrchr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strsep.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strspn.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strstr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strtok_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strtol.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strtoul.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-strupr.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-sysclose.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-sysopen.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-sysread.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-syssbrk.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-system.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-systimes.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-syswrite.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-time.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-timelocal.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-toascii.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-tolower.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-toupper.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-tzcalc_limits.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-tzlock.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-islower.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-isspace.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-tzset.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-tzset_r.*( .rodata .rodata.*) *libc-psram-workaround.a:lib_a-tzvars.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-memrchr.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-close.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-div.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-strcoll.*( .rodata .rodata.*) - *libc-psram-workaround.a:creat.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-sysopen.*( .rodata .rodata.*) - *libc-psram-workaround.a:lib_a-creat.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-ungetc.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-utoa.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-wbuf.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-wcrtomb.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-wctomb_r.*( .rodata .rodata.*) + *libc-psram-workaround.a:lib_a-wsetup.*( .rodata .rodata.*) + *libc-psram-workaround.a:lock.*( .rodata .rodata.*) + *libesp32.a:panic.*( .rodata .rodata.*) *libgcov.a:( .rodata .rodata.*) - *libheap.a:multi_heap_poisoning.*( .rodata .rodata.*) *libheap.a:multi_heap.*( .rodata .rodata.*) + *libheap.a:multi_heap_poisoning.*( .rodata .rodata.*) + *libphy.a:( .rodata .rodata.*) + *libsoc.a:rtc_clk.*( .rodata .rodata.*) _data_end = ABSOLUTE(.); . = ALIGN(4); @@ -541,7 +541,7 @@ SECTIONS *(.rodata_desc .rodata_desc.*) /* Should be the first. App version info. DO NOT PUT ANYTHING BEFORE IT! */ *(.rodata_custom_desc .rodata_custom_desc.*) /* Should be the second. Custom app version info. DO NOT PUT ANYTHING BEFORE IT! */ - *(EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libphy.a *libsoc.a:rtc_clk.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-close.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-strftime.* *libgcov.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .rodata EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libphy.a *libsoc.a:rtc_clk.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-close.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-strftime.* *libgcov.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .rodata.*) + *(EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libphy.a *libgcov.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strftime.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-close.* *libsoc.a:rtc_clk.*) .rodata EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libphy.a *libgcov.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strftime.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-close.* *libsoc.a:rtc_clk.*) .rodata.*) *(.irom1.text) /* catch stray ICACHE_RODATA_ATTR */ *(.gnu.linkonce.r.*) @@ -601,7 +601,7 @@ SECTIONS _stext = .; _text_start = ABSOLUTE(.); - *(EXCLUDE_FILE(*libspi_flash.a:spi_flash_rom_patch.* *libesp_ringbuf.a *libhal.a *libapp_trace.a *libesp32.a:panic.* *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *librtc.a *libgcc.a:lib2funcs.* *libsoc.a:rtc_time.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk.* *libsoc.a:cpu_util.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-close.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-strftime.* *libfreertos.a *libgcov.a *libxtensa-debug-module.a:eri.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .literal EXCLUDE_FILE(*libspi_flash.a:spi_flash_rom_patch.* *libesp_ringbuf.a *libhal.a *libapp_trace.a *libesp32.a:panic.* *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *librtc.a *libgcc.a:lib2funcs.* *libsoc.a:rtc_time.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk.* *libsoc.a:cpu_util.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-close.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-strftime.* *libfreertos.a *libgcov.a *libxtensa-debug-module.a:eri.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .literal.* EXCLUDE_FILE(*libspi_flash.a:spi_flash_rom_patch.* *libesp_ringbuf.a *libhal.a *libapp_trace.a *libesp32.a:panic.* *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *librtc.a *libgcc.a:lib2funcs.* *libsoc.a:rtc_time.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk.* *libsoc.a:cpu_util.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-close.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-strftime.* *libfreertos.a *libgcov.a *libxtensa-debug-module.a:eri.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .text EXCLUDE_FILE(*libspi_flash.a:spi_flash_rom_patch.* *libesp_ringbuf.a *libhal.a *libapp_trace.a *libesp32.a:panic.* *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *librtc.a *libgcc.a:lib2funcs.* *libsoc.a:rtc_time.* *libsoc.a:rtc_pm.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk.* *libsoc.a:cpu_util.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-close.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-strftime.* *libfreertos.a *libgcov.a *libxtensa-debug-module.a:eri.* *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.*) .text.* EXCLUDE_FILE(*libpp.a *libnet80211.a) .wifi0iram EXCLUDE_FILE(*libpp.a *libnet80211.a) .wifi0iram.*) + *(EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libhal.a *librtc.a *libgcc.a:lib2funcs.* *libgcov.a *libesp_ringbuf.a *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *libfreertos.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strftime.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-close.* *libsoc.a:cpu_util.* *libsoc.a:rtc_clk.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_time.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libspi_flash.a:spi_flash_rom_patch.* *libxtensa-debug-module.a:eri.*) .literal EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libhal.a *librtc.a *libgcc.a:lib2funcs.* *libgcov.a *libesp_ringbuf.a *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *libfreertos.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strftime.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-close.* *libsoc.a:cpu_util.* *libsoc.a:rtc_clk.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_time.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libspi_flash.a:spi_flash_rom_patch.* *libxtensa-debug-module.a:eri.*) .literal.* .phyiram .phyiram.* EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libhal.a *librtc.a *libgcc.a:lib2funcs.* *libgcov.a *libesp_ringbuf.a *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *libfreertos.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strftime.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-close.* *libsoc.a:cpu_util.* *libsoc.a:rtc_clk.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_time.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libspi_flash.a:spi_flash_rom_patch.* *libxtensa-debug-module.a:eri.*) .text EXCLUDE_FILE(*libapp_trace.a *libesp32.a:panic.* *libhal.a *librtc.a *libgcc.a:lib2funcs.* *libgcov.a *libesp_ringbuf.a *libespcoredump.a:core_dump_uart.* *libespcoredump.a:core_dump_flash.* *libespcoredump.a:core_dump_common.* *libespcoredump.a:core_dump_port.* *libfreertos.a *libheap.a:multi_heap.* *libheap.a:multi_heap_poisoning.* *libc-psram-workaround.a:lib_a-longjmp.* *libc-psram-workaround.a:lib_a-isupper.* *libc-psram-workaround.a:lib_a-isascii.* *libc-psram-workaround.a:lib_a-rand.* *libc-psram-workaround.a:lib_a-wctomb_r.* *libc-psram-workaround.a:lib_a-strdup_r.* *libc-psram-workaround.a:lib_a-islower.* *libc-psram-workaround.a:lib_a-gettzinfo.* *libc-psram-workaround.a:lib_a-memset.* *libc-psram-workaround.a:lib_a-strspn.* *libc-psram-workaround.a:lib_a-getenv_r.* *libc-psram-workaround.a:lib_a-isdigit.* *libc-psram-workaround.a:lib_a-strlcpy.* *libc-psram-workaround.a:lib_a-memcmp.* *libc-psram-workaround.a:lib_a-utoa.* *libc-psram-workaround.a:lib_a-timelocal.* *libc-psram-workaround.a:lib_a-tzcalc_limits.* *libc-psram-workaround.a:lib_a-strlwr.* *libc-psram-workaround.a:isatty.* *libc-psram-workaround.a:lock.* *libc-psram-workaround.a:lib_a-strnlen.* *libc-psram-workaround.a:lib_a-gmtime_r.* *libc-psram-workaround.a:lib_a-quorem.* *libc-psram-workaround.a:lib_a-strndup_r.* *libc-psram-workaround.a:lib_a-setjmp.* *libc-psram-workaround.a:lib_a-rshift.* *libc-psram-workaround.a:lib_a-strptime.* *libc-psram-workaround.a:lib_a-srand.* *libc-psram-workaround.a:lib_a-syssbrk.* *libc-psram-workaround.a:lib_a-gmtime.* *libc-psram-workaround.a:lib_a-fwalk.* *libc-psram-workaround.a:lib_a-fclose.* *libc-psram-workaround.a:lib_a-asctime_r.* *libc-psram-workaround.a:lib_a-strcmp.* *libc-psram-workaround.a:lib_a-strncmp.* *libc-psram-workaround.a:lib_a-tolower.* *libc-psram-workaround.a:lib_a-strftime.* *libc-psram-workaround.a:lib_a-memccpy.* *libc-psram-workaround.a:lib_a-strlen.* *libc-psram-workaround.a:lib_a-fvwrite.* *libc-psram-workaround.a:lib_a-abs.* *libc-psram-workaround.a:lib_a-strcasestr.* *libc-psram-workaround.a:lib_a-ispunct.* *libc-psram-workaround.a:lib_a-fputwc.* *libc-psram-workaround.a:lib_a-isgraph.* *libc-psram-workaround.a:lib_a-time.* *libc-psram-workaround.a:lib_a-impure.* *libc-psram-workaround.a:lib_a-strsep.* *libc-psram-workaround.a:lib_a-strupr.* *libc-psram-workaround.a:lib_a-iscntrl.* *libc-psram-workaround.a:lib_a-tzset_r.* *libc-psram-workaround.a:lib_a-creat.* *libc-psram-workaround.a:lib_a-stdio.* *libc-psram-workaround.a:lib_a-strrchr.* *libc-psram-workaround.a:lib_a-isalnum.* *libc-psram-workaround.a:creat.* *libc-psram-workaround.a:lib_a-wcrtomb.* *libc-psram-workaround.a:lib_a-raise.* *libc-psram-workaround.a:lib_a-month_lengths.* *libc-psram-workaround.a:lib_a-strndup.* *libc-psram-workaround.a:lib_a-atoi.* *libc-psram-workaround.a:lib_a-strncpy.* *libc-psram-workaround.a:lib_a-systimes.* *libc-psram-workaround.a:lib_a-isblank.* *libc-psram-workaround.a:lib_a-tzvars.* *libc-psram-workaround.a:lib_a-strcpy.* *libc-psram-workaround.a:lib_a-findfp.* *libc-psram-workaround.a:lib_a-envlock.* *libc-psram-workaround.a:lib_a-strcasecmp.* *libc-psram-workaround.a:lib_a-ctype_.* *libc-psram-workaround.a:lib_a-toascii.* *libc-psram-workaround.a:lib_a-strtoul.* *libc-psram-workaround.a:lib_a-makebuf.* *libc-psram-workaround.a:lib_a-sf_nan.* *libc-psram-workaround.a:lib_a-isspace.* *libc-psram-workaround.a:lib_a-strncat.* *libc-psram-workaround.a:lib_a-memcpy.* *libc-psram-workaround.a:lib_a-ungetc.* *libc-psram-workaround.a:lib_a-read.* *libc-psram-workaround.a:lib_a-atol.* *libc-psram-workaround.a:lib_a-lcltime_r.* *libc-psram-workaround.a:lib_a-sysread.* *libc-psram-workaround.a:lib_a-mktime.* *libc-psram-workaround.a:lib_a-environ.* *libc-psram-workaround.a:lib_a-s_fpclassify.* *libc-psram-workaround.a:lib_a-div.* *libc-psram-workaround.a:lib_a-strtol.* *libc-psram-workaround.a:lib_a-strstr.* *libc-psram-workaround.a:lib_a-open.* *libc-psram-workaround.a:lib_a-memrchr.* *libc-psram-workaround.a:lib_a-bzero.* *libc-psram-workaround.a:lib_a-toupper.* *libc-psram-workaround.a:lib_a-fflush.* *libc-psram-workaround.a:lib_a-asctime.* *libc-psram-workaround.a:lib_a-memmove.* *libc-psram-workaround.a:lib_a-lcltime.* *libc-psram-workaround.a:lib_a-sccl.* *libc-psram-workaround.a:lib_a-ldiv.* *libc-psram-workaround.a:lib_a-strchr.* *libc-psram-workaround.a:lib_a-sbrk.* *libc-psram-workaround.a:lib_a-itoa.* *libc-psram-workaround.a:lib_a-sysopen.* *libc-psram-workaround.a:lib_a-isalpha.* *libc-psram-workaround.a:lib_a-tzset.* *libc-psram-workaround.a:lib_a-sysclose.* *libc-psram-workaround.a:lib_a-syswrite.* *libc-psram-workaround.a:lib_a-rand_r.* *libc-psram-workaround.a:lib_a-refill.* *libc-psram-workaround.a:lib_a-wsetup.* *libc-psram-workaround.a:lib_a-strtok_r.* *libc-psram-workaround.a:lib_a-strdup.* *libc-psram-workaround.a:lib_a-isprint.* *libc-psram-workaround.a:lib_a-strncasecmp.* *libc-psram-workaround.a:lib_a-strcspn.* *libc-psram-workaround.a:lib_a-tzlock.* *libc-psram-workaround.a:lib_a-wbuf.* *libc-psram-workaround.a:lib_a-ctime.* *libc-psram-workaround.a:lib_a-labs.* *libc-psram-workaround.a:lib_a-system.* *libc-psram-workaround.a:lib_a-ctime_r.* *libc-psram-workaround.a:lib_a-strcoll.* *libc-psram-workaround.a:lib_a-strcat.* *libc-psram-workaround.a:lib_a-memchr.* *libc-psram-workaround.a:lib_a-strlcat.* *libc-psram-workaround.a:lib_a-close.* *libsoc.a:cpu_util.* *libsoc.a:rtc_clk.* *libsoc.a:rtc_wdt.* *libsoc.a:rtc_periph.* *libsoc.a:rtc_init.* *libsoc.a:rtc_clk_init.* *libsoc.a:rtc_time.* *libsoc.a:rtc_sleep.* *libsoc.a:rtc_pm.* *libspi_flash.a:spi_flash_rom_patch.* *libxtensa-debug-module.a:eri.*) .text.* .wifi0iram .wifi0iram.* EXCLUDE_FILE(*libpp.a *libnet80211.a) .wifirxiram EXCLUDE_FILE(*libpp.a *libnet80211.a) .wifirxiram.*) *(.stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*) *(.irom0.text) /* catch stray ICACHE_RODATA_ATTR */ diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/ffconf.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/ffconf.h new file mode 100644 index 0000000000..b2a6659319 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/ffconf.h @@ -0,0 +1,311 @@ +#include +#include "sdkconfig.h" +/*---------------------------------------------------------------------------/ +/ FatFs - Configuration file +/---------------------------------------------------------------------------*/ + +#define FFCONF_DEF 89352 /* Revision ID */ + +/*---------------------------------------------------------------------------/ +/ Function Configurations +/---------------------------------------------------------------------------*/ + +#define FF_FS_READONLY 0 +/* This option switches read-only configuration. (0:Read/Write or 1:Read-only) +/ Read-only configuration removes writing API functions, f_write(), f_sync(), +/ f_unlink(), f_mkdir(), f_chmod(), f_rename(), f_truncate(), f_getfree() +/ and optional writing functions as well. */ + + +#define FF_FS_MINIMIZE 0 +/* This option defines minimization level to remove some basic API functions. +/ +/ 0: Basic functions are fully enabled. +/ 1: f_stat(), f_getfree(), f_unlink(), f_mkdir(), f_truncate() and f_rename() +/ are removed. +/ 2: f_opendir(), f_readdir() and f_closedir() are removed in addition to 1. +/ 3: f_lseek() function is removed in addition to 2. */ + + +#define FF_USE_STRFUNC 1 +/* This option switches string functions, f_gets(), f_putc(), f_puts() and f_printf(). +/ +/ 0: Disable string functions. +/ 1: Enable without LF-CRLF conversion. +/ 2: Enable with LF-CRLF conversion. */ + + +#define FF_USE_FIND 1 +/* This option switches filtered directory read functions, f_findfirst() and +/ f_findnext(). (0:Disable, 1:Enable 2:Enable with matching altname[] too) */ + + +#define FF_USE_MKFS 1 +/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */ + + +#define FF_USE_FASTSEEK 0 +/* This option switches fast seek function. (0:Disable or 1:Enable) */ + + +#define FF_USE_EXPAND 0 +/* This option switches f_expand function. (0:Disable or 1:Enable) */ + + +#define FF_USE_CHMOD 1 +/* This option switches attribute manipulation functions, f_chmod() and f_utime(). +/ (0:Disable or 1:Enable) Also FF_FS_READONLY needs to be 0 to enable this option. */ + + +#define FF_USE_LABEL 0 +/* This option switches volume label functions, f_getlabel() and f_setlabel(). +/ (0:Disable or 1:Enable) */ + + +#define FF_USE_FORWARD 0 +/* This option switches f_forward() function. (0:Disable or 1:Enable) */ + + +/*---------------------------------------------------------------------------/ +/ Locale and Namespace Configurations +/---------------------------------------------------------------------------*/ + +#define FF_CODE_PAGE CONFIG_FATFS_CODEPAGE +/* This option specifies the OEM code page to be used on the target system. +/ Incorrect code page setting can cause a file open failure. +/ +/ 437 - U.S. +/ 720 - Arabic +/ 737 - Greek +/ 771 - KBL +/ 775 - Baltic +/ 850 - Latin 1 +/ 852 - Latin 2 +/ 855 - Cyrillic +/ 857 - Turkish +/ 860 - Portuguese +/ 861 - Icelandic +/ 862 - Hebrew +/ 863 - Canadian French +/ 864 - Arabic +/ 865 - Nordic +/ 866 - Russian +/ 869 - Greek 2 +/ 932 - Japanese (DBCS) +/ 936 - Simplified Chinese (DBCS) +/ 949 - Korean (DBCS) +/ 950 - Traditional Chinese (DBCS) +/ 0 - Include all code pages above and configured by f_setcp() +*/ + + +#if defined(CONFIG_FATFS_LFN_STACK) +#define FF_USE_LFN 2 +#elif defined(CONFIG_FATFS_LFN_HEAP) +#define FF_USE_LFN 3 +#else /* CONFIG_FATFS_LFN_NONE */ +#define FF_USE_LFN 0 +#endif + +#ifdef CONFIG_FATFS_MAX_LFN +#define FF_MAX_LFN CONFIG_FATFS_MAX_LFN +#endif + +/* The FF_USE_LFN switches the support for LFN (long file name). +/ +/ 0: Disable LFN. FF_MAX_LFN has no effect. +/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe. +/ 2: Enable LFN with dynamic working buffer on the STACK. +/ 3: Enable LFN with dynamic working buffer on the HEAP. +/ +/ To enable the LFN, ffunicode.c needs to be added to the project. The LFN function +/ requiers certain internal working buffer occupies (FF_MAX_LFN + 1) * 2 bytes and +/ additional (FF_MAX_LFN + 44) / 15 * 32 bytes when exFAT is enabled. +/ The FF_MAX_LFN defines size of the working buffer in UTF-16 code unit and it can +/ be in range of 12 to 255. It is recommended to be set 255 to fully support LFN +/ specification. +/ When use stack for the working buffer, take care on stack overflow. When use heap +/ memory for the working buffer, memory management functions, ff_memalloc() and +/ ff_memfree() in ffsystem.c, need to be added to the project. */ + + +#ifdef CONFIG_FATFS_API_ENCODING_UTF_8 +#define FF_LFN_UNICODE 2 +#elif defined(CONFIG_FATFS_API_ENCODING_UTF_16) +#define FF_LFN_UNICODE 1 +#else /* CONFIG_FATFS_API_ENCODING_ANSI_OEM */ +#define FF_LFN_UNICODE 0 +#endif +/* This option switches the character encoding on the API when LFN is enabled. +/ +/ 0: ANSI/OEM in current CP (TCHAR = char) +/ 1: Unicode in UTF-16 (TCHAR = WCHAR) +/ 2: Unicode in UTF-8 (TCHAR = char) +/ +/ Also behavior of string I/O functions will be affected by this option. +/ When LFN is not enabled, this option has no effect. */ + + +#define FF_LFN_BUF 255 +#define FF_SFN_BUF 12 +/* This set of options defines size of file name members in the FILINFO structure +/ which is used to read out directory items. These values should be suffcient for +/ the file names to read. The maximum possible length of the read file name depends +/ on character encoding. When LFN is not enabled, these options have no effect. */ + + +#define FF_STRF_ENCODE 3 +/* When FF_LFN_UNICODE >= 1 with LFN enabled, string I/O functions, f_gets(), +/ f_putc(), f_puts and f_printf() convert the character encoding in it. +/ This option selects assumption of character encoding ON THE FILE to be +/ read/written via those functions. +/ +/ 0: ANSI/OEM in current CP +/ 1: Unicode in UTF-16LE +/ 2: Unicode in UTF-16BE +/ 3: Unicode in UTF-8 +*/ + + +#define FF_FS_RPATH 2 +/* This option configures support for relative path. +/ +/ 0: Disable relative path and remove related functions. +/ 1: Enable relative path. f_chdir() and f_chdrive() are available. +/ 2: f_getcwd() function is available in addition to 1. +*/ + + +/*---------------------------------------------------------------------------/ +/ Drive/Volume Configurations +/---------------------------------------------------------------------------*/ + +#define FF_VOLUMES 2 +/* Number of volumes (logical drives) to be used. (1-10) */ + + +#define FF_STR_VOLUME_ID 0 +#define FF_VOLUME_STRS "RAM","NAND","CF","SD","SD2","USB","USB2","USB3" +/* FF_STR_VOLUME_ID switches string support for volume ID. +/ When FF_STR_VOLUME_ID is set to 1, also pre-defined strings can be used as drive +/ number in the path name. FF_VOLUME_STRS defines the drive ID strings for each +/ logical drives. Number of items must be equal to FF_VOLUMES. Valid characters for +/ the drive ID strings are: A-Z and 0-9. */ + + +#define FF_MULTI_PARTITION 1 +/* This option switches support for multiple volumes on the physical drive. +/ By default (0), each logical drive number is bound to the same physical drive +/ number and only an FAT volume found on the physical drive will be mounted. +/ When this function is enabled (1), each logical drive number can be bound to +/ arbitrary physical drive and partition listed in the VolToPart[]. Also f_fdisk() +/ funciton will be available. */ + +/* SD card sector size */ +#define FF_SS_SDCARD 512 +/* wear_levelling library sector size */ +#define FF_SS_WL CONFIG_WL_SECTOR_SIZE + +#define FF_MIN_SS MIN(FF_SS_SDCARD, FF_SS_WL) +#define FF_MAX_SS MAX(FF_SS_SDCARD, FF_SS_WL) +/* This set of options configures the range of sector size to be supported. (512, +/ 1024, 2048 or 4096) Always set both 512 for most systems, generic memory card and +/ harddisk. But a larger value may be required for on-board flash memory and some +/ type of optical media. When FF_MAX_SS is larger than FF_MIN_SS, FatFs is configured +/ for variable sector size mode and disk_ioctl() function needs to implement +/ GET_SECTOR_SIZE command. */ + + +#define FF_USE_TRIM 0 +/* This option switches support for ATA-TRIM. (0:Disable or 1:Enable) +/ To enable Trim function, also CTRL_TRIM command should be implemented to the +/ disk_ioctl() function. */ + + +#define FF_FS_NOFSINFO 0 +/* If you need to know correct free space on the FAT32 volume, set bit 0 of this +/ option, and f_getfree() function at first time after volume mount will force +/ a full FAT scan. Bit 1 controls the use of last allocated cluster number. +/ +/ bit0=0: Use free cluster count in the FSINFO if available. +/ bit0=1: Do not trust free cluster count in the FSINFO. +/ bit1=0: Use last allocated cluster number in the FSINFO if available. +/ bit1=1: Do not trust last allocated cluster number in the FSINFO. +*/ + + + +/*---------------------------------------------------------------------------/ +/ System Configurations +/---------------------------------------------------------------------------*/ + +#define FF_FS_TINY (!CONFIG_FATFS_PER_FILE_CACHE) +/* This option switches tiny buffer configuration. (0:Normal or 1:Tiny) +/ At the tiny configuration, size of file object (FIL) is shrinked FF_MAX_SS bytes. +/ Instead of private sector buffer eliminated from the file object, common sector +/ buffer in the filesystem object (FATFS) is used for the file data transfer. */ + + +#define FF_FS_EXFAT 0 +/* This option switches support for exFAT filesystem. (0:Disable or 1:Enable) +/ When enable exFAT, also LFN needs to be enabled. +/ Note that enabling exFAT discards ANSI C (C89) compatibility. */ + + +#define FF_FS_NORTC 0 +#define FF_NORTC_MON 1 +#define FF_NORTC_MDAY 1 +#define FF_NORTC_YEAR 2017 +/* The option FF_FS_NORTC switches timestamp functiton. If the system does not have +/ any RTC function or valid timestamp is not needed, set FF_FS_NORTC = 1 to disable +/ the timestamp function. All objects modified by FatFs will have a fixed timestamp +/ defined by FF_NORTC_MON, FF_NORTC_MDAY and FF_NORTC_YEAR in local time. +/ To enable timestamp function (FF_FS_NORTC = 0), get_fattime() function need to be +/ added to the project to read current time form real-time clock. FF_NORTC_MON, +/ FF_NORTC_MDAY and FF_NORTC_YEAR have no effect. +/ These options have no effect at read-only configuration (FF_FS_READONLY = 1). */ + + +#define FF_FS_LOCK CONFIG_FATFS_FS_LOCK +/* The option FF_FS_LOCK switches file lock function to control duplicated file open +/ and illegal operation to open objects. This option must be 0 when FF_FS_READONLY +/ is 1. +/ +/ 0: Disable file lock function. To avoid volume corruption, application program +/ should avoid illegal open, remove and rename to the open objects. +/ >0: Enable file lock function. The value defines how many files/sub-directories +/ can be opened simultaneously under file lock control. Note that the file +/ lock control is independent of re-entrancy. */ + + +#define FF_FS_REENTRANT 1 +#define FF_FS_TIMEOUT (CONFIG_FATFS_TIMEOUT_MS / portTICK_PERIOD_MS) +#define FF_SYNC_t SemaphoreHandle_t +/* The option FF_FS_REENTRANT switches the re-entrancy (thread safe) of the FatFs +/ module itself. Note that regardless of this option, file access to different +/ volume is always re-entrant and volume control functions, f_mount(), f_mkfs() +/ and f_fdisk() function, are always not re-entrant. Only file/directory access +/ to the same volume is under control of this function. +/ +/ 0: Disable re-entrancy. FF_FS_TIMEOUT and FF_SYNC_t have no effect. +/ 1: Enable re-entrancy. Also user provided synchronization handlers, +/ ff_req_grant(), ff_rel_grant(), ff_del_syncobj() and ff_cre_syncobj() +/ function, must be added to the project. Samples are available in +/ option/syscall.c. +/ +/ The FF_FS_TIMEOUT defines timeout period in unit of time tick. +/ The FF_SYNC_t defines O/S dependent sync object type. e.g. HANDLE, ID, OS_EVENT*, +/ SemaphoreHandle_t and etc. A header file for O/S definitions needs to be +/ included somewhere in the scope of ff.h. */ + +#include "freertos/FreeRTOS.h" +#include "freertos/semphr.h" + +/* Some memory allocation functions are declared here in addition to ff.h, so that + they can be used also by external code when LFN feature is disabled. + */ +void* ff_memalloc (UINT msize); +void* ff_memcalloc (UINT num, UINT size); + + +/*--- End of configuration options ---*/ diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Memory.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Memory.cpp index 0427b18ab0..8696a4ef73 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Memory.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Memory.cpp @@ -30,7 +30,7 @@ static const char *TAG = "Memory"; // You can't go much bigger than this when allocating in normal memory to // get memory in one continuous lump. -#define NORMAL_MEMORY_SIZE (115 * 1024) +#define NORMAL_MEMORY_SIZE (90 * 1024) // Saved memory allocation for when heap is reset so we can return same value. unsigned char *pManagedHeap = NULL; diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp new file mode 100644 index 0000000000..d5652879f0 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialPort.cpp @@ -0,0 +1,969 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#include +#include +#include "sys_io_ser_native_target.h" +#include + +// UART buffer size: 256 bytes +#define UART_BUFER_SIZE 256 + +// in UWP the COM ports are named COM1, COM2, COM3. But ESP32 uses internally UART0, UART1, UART2. This maps the port +// index 1, 2 or 3 to the uart number 0, 1 or 2 +#define PORT_INDEX_TO_UART_NUM(portIndex) ((portIndex)-1) +// in UWP the COM ports are named COM1, COM2, COM3. But ESP32 uses internally UART0, UART1, UART2. This maps the uart +// number 0, 1 or 2 to the port index 1, 2 or 3 +#define UART_NUM_TO_PORT_INDEX(uart_num) ((uart_num) + 1) + +static const char *TAG = "SerialDevice"; + +static NF_PAL_UART Uart0_PAL; +static NF_PAL_UART Uart1_PAL; +static NF_PAL_UART Uart2_PAL; + +NF_PAL_UART *GetPalUartFromUartNum_sys(int uart_num) +{ + NF_PAL_UART *palUart = NULL; + + switch (uart_num) + { + case UART_NUM_0: + // set UART PAL + palUart = &Uart0_PAL; + break; + + case UART_NUM_1: + // set UART PAL + palUart = &Uart1_PAL; + break; + + case UART_NUM_2: + // set UART PAL + palUart = &Uart2_PAL; + break; + + default: + break; + } + return palUart; +} + +void UnitializePalUart_sys(NF_PAL_UART *palUart) +{ + if (palUart && palUart->SerialDevice) + { + // send the exit signal to the UART event handling queue + uart_event_t event; + event.type = UART_EVENT_MAX; + xQueueSend(palUart->UartEventQueue, &event, (portTickType)0); + + // free buffers meory + platform_free(palUart->RxBuffer); + platform_free(palUart->TxBuffer); + + // null all pointers + palUart->RxBuffer = NULL; + palUart->TxBuffer = NULL; + palUart->SerialDevice = NULL; + + // delete driver + uart_driver_delete((uart_port_t)palUart->UartNum); + + // delete task, if any + if (palUart->UartEventTask) + { + vTaskDelete(palUart->UartEventTask); + } + + palUart->UartEventTask = NULL; + } +} + +void Esp32_Serial_UnitializeAll_sys() +{ + for (int uart_num = 0; uart_num < UART_NUM_MAX; uart_num++) + { + // free buffers memory + UnitializePalUart_sys(GetPalUartFromUartNum_sys(uart_num)); + } +} + +void uart_event_task_sys(void *pvParameters) +{ + // get PAL UART from task parameters + NF_PAL_UART *palUart = (NF_PAL_UART *)pvParameters; + + uart_event_t event; + bool run = true; + bool readData; + int32_t watchCharPos; + int32_t readCount; + size_t bufferedSize; + uint8_t *buffer; + + while (run) + { + // Waiting for UART event. + if (xQueueReceive(palUart->UartEventQueue, &event, (portTickType)portMAX_DELAY)) + { + // reset vars + readData = false; + watchCharPos = -1; + + // deal with event type + switch (event.type) + { + case UART_DATA: + // set flag + readData = true; + break; + + case UART_PATTERN_DET: + // Pattern detection used for the WatchChar + watchCharPos = uart_pattern_get_pos(palUart->UartNum); + + // set flag + readData = true; + break; + + case UART_FIFO_OVF: + case UART_BUFFER_FULL: + uart_flush_input(palUart->UartNum); + xQueueReset(palUart->UartEventQueue); + break; + + case UART_EVENT_MAX: + // signal to end the task (UART_EVENT_MAX used) + run = false; + break; + + default: + break; + } + + if (readData) + { + // get how many chars are buffered on RX FIFO + uart_get_buffered_data_len(palUart->UartNum, &bufferedSize); + + if (bufferedSize > 0) + { + // alloc buffer to read RX FIFO + buffer = (uint8_t *)platform_malloc(bufferedSize); + + // sanity check + if (buffer) + { + // try to read RX FIFO + readCount = uart_read_bytes(palUart->UartNum, buffer, bufferedSize, 1); + + // push to UART RX buffer + palUart->RxRingBuffer.Push(buffer, readCount); + + // free buffer + platform_free(buffer); + + // is there a read operation going on? + if (palUart->RxBytesToRead > 0) + { + // yes + // check if the requested bytes are available in the buffer... + //... or if the watch char was received + if ((palUart->RxRingBuffer.Length() >= palUart->RxBytesToRead) || (watchCharPos > -1)) + { + // reset Rx bytes to read count + palUart->RxBytesToRead = 0; + + // fire event for Rx buffer complete + Events_Set(SYSTEM_EVENT_FLAG_COM_IN); + } + } + else + { + // no read operation ongoing, so fire an event + + // post a managed event with the port index and event code (check if there is a watch char + // in the buffer or just any char) + // check if callbacks are registered so this is called only if there is anyone listening + // otherwise don't bother + if (palUart + ->SerialDevice[Library_sys_io_ser_native_System_IO_Ports_SerialPort:: + FIELD___callbacksDataReceivedEvent] + .Dereference() != NULL) + { + PostManagedEvent( + EVENT_SERIAL, + 0, + UART_NUM_TO_PORT_INDEX(palUart->UartNum), + (watchCharPos > -1) ? SerialData_WatchChar : SerialData_Chars); + } + } + } + } + } + } + } + + vTaskDelete(NULL); +} + +void UartTxWorkerTask_sys(void *pvParameters) +{ + // get PAL UART from task parameters + NF_PAL_UART *palUart = (NF_PAL_UART *)pvParameters; + + // Write data directly to UART FIFO + // by design: don't bother checking the return value + uart_write_bytes(palUart->UartNum, (const char *)palUart->TxRingBuffer.Reader(), palUart->TxOngoingCount); + + // pop elements from ring buffer, just pop + palUart->TxRingBuffer.Pop(palUart->TxOngoingCount); + + // set event flag for COM OUT + Events_Set(SYSTEM_EVENT_FLAG_COM_OUT); + + // delete task + vTaskDelete(NULL); +} + +// estimate the time required to perform the TX transaction +bool IsLongRunningOperation_sys(uint32_t bufferSize, uint32_t baudRate, uint32_t &estimatedDurationMiliseconds) +{ + // simplifying calculation assuming worst case values for stop bits + estimatedDurationMiliseconds = ((8 + 2) * bufferSize * 1000) / baudRate; + + if (estimatedDurationMiliseconds > CLR_RT_Thread::c_TimeQuantum_Milliseconds) + { + // total operation time will exceed thread quantum, so this is a long running operation + return true; + } + else + { + return false; + } +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::get_BytesToRead___I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart = NULL; + uart_port_t uart_num; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // Get Uart number for serial device + uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // get pointer to PAL UART + palUart = GetPalUartFromUartNum_sys(uart_num); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // return how many bytes can be read from the Rx buffer + stack.SetResult_U4(palUart->RxRingBuffer.Length()); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeDispose___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + uart_port_t uart_num; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Get Uart number for serial device + uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + UnitializePalUart_sys(GetPalUartFromUartNum_sys(uart_num)); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeInit___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + char task_name[16]; + uart_port_t uart_num; + esp_err_t esp_err; + + NF_PAL_UART *palUart; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Get Uart number for serial device + uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + if (uart_num > UART_NUM_2 || uart_num < 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // call the configure and abort if not OK + NANOCLR_CHECK_HRESULT(NativeConfig___VOID(stack)); + + palUart = GetPalUartFromUartNum_sys(uart_num); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // alloc buffers memory + palUart->TxBuffer = (uint8_t *)platform_malloc(UART_BUFER_SIZE); + palUart->RxBuffer = (uint8_t *)platform_malloc(UART_BUFER_SIZE); + + // sanity check + if (palUart->TxBuffer == NULL || palUart->RxBuffer == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OUT_OF_MEMORY); + } + + // init buffers + palUart->TxRingBuffer.Initialize(palUart->TxBuffer, UART_BUFER_SIZE); + palUart->RxRingBuffer.Initialize(palUart->RxBuffer, UART_BUFER_SIZE); + + // set/reset all the rest + palUart->SerialDevice = stack.This(); + palUart->UartNum = uart_num; + palUart->TxOngoingCount = 0; + palUart->RxBytesToRead = 0; + + // Install driver + esp_err = uart_driver_install( + uart_num, + UART_BUFER_SIZE, // rx_buffer_size, + 0, // tx_buffer_size, not buffered + 20, // queue_size + &(palUart->UartEventQueue), // QueueHandle_t *uart_queue ( none for now ) + 0 // intr_alloc_flags + ); + if (esp_err != ESP_OK) + { + ESP_LOGE(TAG, "Failed to install uart driver"); + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + NANOCLR_CHECK_HRESULT(NativeConfig___VOID(stack)); + + // Create a task to handle UART event from ISR + snprintf(task_name, ARRAYSIZE(task_name), "uart%d_events", uart_num); + if (xTaskCreatePinnedToCore(uart_event_task_sys, task_name, 2048, palUart, 12, &(palUart->UartEventTask), 1) != + pdPASS) + { + ESP_LOGE(TAG, "Failed to start UART events task"); + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + + // Ensure driver gets unitialized during soft reboot + HAL_AddSoftRebootHandler(Esp32_Serial_UnitializeAll_sys); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeConfig___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + uart_config_t uart_config; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Get Uart number for serial device + uart_port_t uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + if (uart_num > UART_NUM_2 || uart_num < 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // setup configuration + // baud rate + uart_config.baud_rate = (uint32_t)pThis[FIELD___baudRate].NumericByRef().s4; + + // data bits + switch ((uint16_t)pThis[FIELD___dataBits].NumericByRef().s4) + { + case 5: + uart_config.data_bits = UART_DATA_5_BITS; + break; + + case 6: + uart_config.data_bits = UART_DATA_6_BITS; + break; + + case 7: + uart_config.data_bits = UART_DATA_7_BITS; + break; + + case 8: + uart_config.data_bits = UART_DATA_8_BITS; + break; + + default: + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // parity + switch ((Parity)pThis[FIELD___parity].NumericByRef().s4) + { + default: + case Parity_None: + uart_config.parity = UART_PARITY_DISABLE; + break; + + case Parity_Even: + uart_config.parity = UART_PARITY_EVEN; + break; + + case Parity_Odd: + uart_config.parity = UART_PARITY_ODD; + break; + } + + // stop bits + switch ((StopBits)pThis[FIELD___stopBits].NumericByRef().s4) + { + default: + case StopBits_One: + uart_config.stop_bits = UART_STOP_BITS_1; + break; + + case StopBits_OnePointFive: + uart_config.stop_bits = UART_STOP_BITS_1_5; + break; + + case StopBits_Two: + uart_config.stop_bits = UART_STOP_BITS_2; + break; + } + + uart_config.rx_flow_ctrl_thresh = 120; + + bool EnableXonXoff = false; + switch ((Handshake)pThis[FIELD___handshake].NumericByRef().s4) + { + default: + case Handshake_None: + uart_config.flow_ctrl = UART_HW_FLOWCTRL_DISABLE; + break; + + case Handshake_RequestToSend: + uart_config.flow_ctrl = UART_HW_FLOWCTRL_RTS; + uart_config.rx_flow_ctrl_thresh = 122; + break; + + case Handshake_RequestToSendXOnXOff: + uart_config.flow_ctrl = UART_HW_FLOWCTRL_RTS; + uart_config.rx_flow_ctrl_thresh = 122; + EnableXonXoff = true; + break; + + case Handshake_XOnXOff: + EnableXonXoff = true; + uart_config.flow_ctrl = UART_HW_FLOWCTRL_DISABLE; + break; + } + + bool rs485Mode = ((SerialMode)pThis[FIELD___mode].NumericByRef().s4 == SerialMode_RS485); + if (rs485Mode) + { + // Disable any flow control & Set RS485 half duplex mode + uart_config.flow_ctrl = UART_HW_FLOWCTRL_DISABLE; + uart_set_mode(uart_num, UART_MODE_RS485_HALF_DUPLEX); + } + else + { + // Reset to normal mode + uart_set_mode(uart_num, UART_MODE_UART); + } + + // Already Initialised ? + if (GetPalUartFromUartNum_sys(uart_num)->SerialDevice) + { + int errors = 0; + + errors += uart_set_word_length(uart_num, uart_config.data_bits); + errors += uart_set_baudrate(uart_num, uart_config.baud_rate); + errors += uart_set_parity(uart_num, uart_config.parity); + errors += uart_set_stop_bits(uart_num, uart_config.stop_bits); + errors += uart_set_hw_flow_ctrl(uart_num, uart_config.flow_ctrl, uart_config.rx_flow_ctrl_thresh); + if (errors) + { + ESP_LOGE(TAG, "Failed to set UART parameters configuration"); + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + } + else + { + // First time make sure UART is reset so use uart_param_config. + // If you call this once driver installed it resets UART and stop events ISR being called. + if (uart_param_config(uart_num, &uart_config) != ESP_OK) + { + ESP_LOGE(TAG, "Failed to set UART parameters configuration"); + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + } + + if (EnableXonXoff) + { + uart_set_sw_flow_ctrl(uart_num, true, 20, 40); + } + + // Map to currently assigned pins + int txPin = Esp32_GetMappedDevicePins(DEV_TYPE_SERIAL, uart_num, Esp32SerialPin_Tx); + int rxPin = Esp32_GetMappedDevicePins(DEV_TYPE_SERIAL, uart_num, Esp32SerialPin_Rx); + int rtsPin = Esp32_GetMappedDevicePins(DEV_TYPE_SERIAL, uart_num, Esp32SerialPin_Rts); + int ctsPin = Esp32_GetMappedDevicePins(DEV_TYPE_SERIAL, uart_num, Esp32SerialPin_Cts); + + // check if TX, RX pins have been previously set + if (txPin == UART_PIN_NO_CHANGE || rxPin == UART_PIN_NO_CHANGE) + { + NANOCLR_SET_AND_LEAVE(CLR_E_PIN_UNAVAILABLE); + } + + // Don't use RTS/CTS pins if no hardware handshake enabled unless in RS485 mode + if (rs485Mode) + { + ctsPin = UART_PIN_NO_CHANGE; // no need for a CTS pin enabled, just RTS + } + else + { + if (uart_config.flow_ctrl == UART_HW_FLOWCTRL_DISABLE) + { + rtsPin = UART_PIN_NO_CHANGE; + ctsPin = UART_PIN_NO_CHANGE; + } + } + + if (uart_set_pin(uart_num, txPin, rxPin, rtsPin, ctsPin) != ESP_OK) + { + ESP_LOGE(TAG, "Failed to set UART pins"); + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + + // null pointers and vars + pThis = NULL; + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeWrite___VOID__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + NF_PAL_UART *palUart = NULL; + + uint8_t *data; + size_t length = 0; + size_t count = 0; + int16_t writeOffset = 0; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // dereference the data buffer from the argument + CLR_RT_HeapBlock_Array *dataBuffer = stack.Arg1().DereferenceArray(); + writeOffset = stack.Arg2().NumericByRef().s4; + count = stack.Arg3().NumericByRef().s4; + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(writeOffset); + + // get the size of the buffer + length = (size_t)dataBuffer->m_numOfElements; + + if (count > length) + { + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // Get Uart number for serial device + uart_port_t uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // get pointer to PAL UART + palUart = GetPalUartFromUartNum_sys(uart_num); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // check if there is enough room in the buffer + if (palUart->TxRingBuffer.Capacity() - palUart->TxRingBuffer.Length() < count) + { + // not enough room in the buffer + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // push data to buffer + size_t bytesWritten = palUart->TxRingBuffer.Push(data, count); + + // check if all requested bytes were written + if (bytesWritten != count) + { + // not sure if this is the best exception to throw here... + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + + // null pointers and vars + pThis = NULL; + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeStore___U4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart = NULL; + + uint32_t estimatedDurationMiliseconds; + size_t length = 0; + uart_port_t uart_num; + + int64_t *timeoutTicks; + bool eventResult = true; + bool txOk = false; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // Get Uart number for serial device + uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // get pointer to PAL UART + palUart = GetPalUartFromUartNum_sys(uart_num); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + if (stack.m_customState == 0) + { + // check if this is a long running operation + palUart->IsLongRunning = IsLongRunningOperation_sys( + palUart->TxRingBuffer.Length(), + (uint32_t)pThis[FIELD___baudRate].NumericByRef().s4, + (uint32_t &)estimatedDurationMiliseconds); + } + + // check if there is anything the buffer + if (palUart->TxRingBuffer.Length() > 0) + { + // check if there is a TX operation ongoing + if (palUart->TxOngoingCount == 0) + { + // OK to Tx + txOk = true; + } + else + { + // need to wait for the ongoing operation to complete before starting a new one + } + } + + if (txOk) + { + // optimize buffer for sequential reading + palUart->TxRingBuffer.OptimizeSequence(); + + // get data length available in the buffer + length = palUart->TxRingBuffer.Length(); + + if (palUart->IsLongRunning) + { + CLR_RT_HeapBlock hbTimeout; + hbTimeout.SetInteger( + (CLR_INT64)pThis[FIELD___writeTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + // setup timeout + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // this is a long running operation and hasn't started yet + // perform operation by launching a thread to + if (stack.m_customState == 1) + { + // push to the stack how many bytes bytes where buffered for Tx + stack.PushValueI4(length); + + // set TX count + palUart->TxOngoingCount = length; + + // Create a task to handle UART event from ISR + char task_name[16]; + snprintf(task_name, ARRAYSIZE(task_name), "uart%d_tx", uart_num); + + if (xTaskCreate(UartTxWorkerTask_sys, task_name, 2048, palUart, 12, NULL) != pdPASS) + { + ESP_LOGE(TAG, "Failed to start UART TX task"); + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + + // bump custom state so the read value above is pushed only once + stack.m_customState = 2; + } + } + else + { + // this is NOT a long running operation + // perform TX operation right away + + // Write data to ring buffer to start sending + // by design: don't bother checking the return value + uart_write_bytes(uart_num, (const char *)palUart->TxRingBuffer.Reader(), length); + + // pop data that was written to FIFO + // pop elements from ring buffer, just pop + palUart->TxRingBuffer.Pop(length); + } + } + + while (eventResult) + { + if (!palUart->IsLongRunning) + { + // this is not a long running operation so nothing to do here + break; + } + + // non-blocking wait allowing other threads to run while we wait for the Tx operation to complete + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortOut, eventResult)); + + if (eventResult) + { + // event occurred + // get from the eval stack how many bytes were buffered to Tx + length = stack.m_evalStack[1].NumericByRef().s4; + + // reset Tx ongoing count + palUart->TxOngoingCount = 0; + + // done here + break; + } + else + { + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + } + + if (palUart->IsLongRunning) + { + // pop length heap block from stack + stack.PopValue(); + + // pop timeout heap block from stack + stack.PopValue(); + } + + stack.SetResult_U4(length); + + // null pointers and vars + pThis = NULL; + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeRead___U4__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + CLR_RT_HeapBlock_Array *dataBuffer; + NF_PAL_UART *palUart = NULL; + + uint8_t *data; + + size_t count = 0; + size_t bytesRead = 0; + size_t bytesToRead = 0; + size_t readOffset = 0; + uart_port_t uart_num; + + int64_t *timeoutTicks; + bool eventResult = true; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // dereference the data buffer from the argument + dataBuffer = stack.Arg1().DereferenceArray(); + // The offset to start filling the buffer + readOffset = stack.Arg2().NumericByRef().s4; + + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(readOffset); + + // get how many bytes are requested to read + count = stack.Arg3().NumericByRef().s4; + + // Get Uart number for serial device + uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // get pointer to PAL UART + palUart = GetPalUartFromUartNum_sys(uart_num); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + CLR_RT_HeapBlock hbTimeout; + hbTimeout.SetInteger((CLR_INT64)pThis[FIELD___readTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + // setup timeout + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // figure out what's available in the Rx ring buffer + if (palUart->RxRingBuffer.Length() >= count) + { + // read from Rx ring buffer + bytesToRead = count; + + // we have enough bytes, skip wait for event + eventResult = false; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + } + else + { + if (stack.m_customState == 1) + { + // not enough bytes available, have to read from UART + palUart->RxBytesToRead = count; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + + // don't read anything from the buffer yet + bytesToRead = 0; + } + } + + while (eventResult) + { + if (stack.m_customState == 1) + { + if (bytesToRead > 0) + { + // enough bytes available + eventResult = false; + } + else + { + // need to read from the UART + // update custom state + stack.m_customState = 2; + } + } + else + { + // wait for event + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine + .WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortIn, eventResult)); + + if (!eventResult) + { + // event timeout + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + } + } + + if (bytesToRead > 0) + { + // pop the requested bytes from the ring buffer + bytesRead = palUart->RxRingBuffer.Pop(data, bytesToRead); + } + + // pop timeout heap block from stack + stack.PopValue(); + + // return how many bytes were read + stack.SetResult_U4(bytesRead); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeSetWatchChar___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + uart_port_t uart_num; + uint8_t watchChar; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // Get Uart number for serial device + uart_num = (uart_port_t)PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // Get the watch char + watchChar = (uint8_t)pThis[FIELD___watchChar].NumericByRef().u1; + + // Enable pattern detection for the serial device + uart_enable_pattern_det_intr(uart_num, watchChar, 1, 10000, 10, 10); + // Reset the pattern queue length to record at most 10 pattern positions. + uart_pattern_queue_reset(uart_num, 10); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector___STATIC__STRING( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + // declare the device selector string whose max size is "COM1,COM2,COM3" + terminator + // COM1 is being used for VS debug, so it's not available + char deviceSelectorString[15] = "COM2,COM3"; + + // because the caller is expecting a result to be returned + // we need set a return result in the stack argument using the appropriate SetResult according to the variable + // type (a string here) + stack.SetResult_String(deviceSelectorString); + + NANOCLR_NOCLEANUP_NOLABEL(); +} diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/System.IO.Ports/sys_io_ser_native_target.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/System.IO.Ports/sys_io_ser_native_target.h new file mode 100644 index 0000000000..345b63e4e3 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/System.IO.Ports/sys_io_ser_native_target.h @@ -0,0 +1,31 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#ifndef _SYS_IO_SER_NATIVE_ +#define _SYS_IO_SER_NATIVE_ + +#include + +// struct representing the UART +typedef struct +{ + uart_port_t UartNum; + TaskHandle_t UartEventTask; + QueueHandle_t UartEventQueue; + + CLR_RT_HeapBlock *SerialDevice; + + HAL_RingBuffer TxRingBuffer; + uint8_t *TxBuffer; + uint16_t TxOngoingCount; + + HAL_RingBuffer RxRingBuffer; + uint8_t *RxBuffer; + uint16_t RxBytesToRead; + + bool IsLongRunning; +} NF_PAL_UART; + +#endif //_SYS_IO_SER_NATIVE_ diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Adc/win_dev_adc_native_Windows_Devices_Adc_AdcController.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Adc/win_dev_adc_native_Windows_Devices_Adc_AdcController.cpp index 1bd956fa68..e1f136a3e8 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Adc/win_dev_adc_native_Windows_Devices_Adc_AdcController.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Adc/win_dev_adc_native_Windows_Devices_Adc_AdcController.cpp @@ -48,7 +48,7 @@ HRESULT Library_win_dev_adc_native_Windows_Devices_Adc_AdcController::NativeOpen // Get ADC device number from channel int adcUnit = channel <= 9 ? 1 : 2; - adc_power_on(); // Make sure powered on + adc_power_acquire(); // Make sure powered on switch(adcUnit) { diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Wifi/win_dev_wifi_native_Windows_Devices_WIFI_WifiAdapter.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Wifi/win_dev_wifi_native_Windows_Devices_WIFI_WifiAdapter.cpp index 9a3b49642f..c7e536d0a7 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Wifi/win_dev_wifi_native_Windows_Devices_WIFI_WifiAdapter.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Devices.Wifi/win_dev_wifi_native_Windows_Devices_WIFI_WifiAdapter.cpp @@ -6,6 +6,7 @@ #include "win_dev_wifi_native.h" #include "nf_rt_events_native.h" +#include "esp_wifi_types.h" /////////////////////////////////////////////////////////////////////////////////////// // !!! KEEP IN SYNC WITH Windows.Devices.WiFi (in managed code) !!! // @@ -106,44 +107,85 @@ HRESULT Library_win_dev_wifi_native_Windows_Devices_WiFi_WiFiAdapter:: int reconnectionKind; esp_err_t res; int netIndex; + CLR_RT_HeapBlock hbTimeout; + CLR_INT64 *timeout; + bool eventResult = true; + WiFiConnectionStatus Status = UnspecifiedFailure; NANOCLR_CHECK_HRESULT(GetNetInterfaceIndex(stack, &netIndex)); - WiFiConnectionStatus Status = Success; + if (stack.m_customState == 0) + { + NANOCLR_CHECK_HRESULT(GetNetInterfaceIndex(stack, &netIndex)); + + // Get SSID + szSsid = stack.Arg1().RecoverString(); + FAULT_ON_NULL(szSsid); + + // Get Password + szPassPhase = stack.Arg2().RecoverString(); + FAULT_ON_NULL(szPassPhase); - // Get SSID - szSsid = stack.Arg1().RecoverString(); - FAULT_ON_NULL(szSsid); + // Reconnect kind + reconnectionKind = stack.Arg3().NumericByRef().s4; - // Get Password - szPassPhase = stack.Arg2().RecoverString(); - FAULT_ON_NULL(szPassPhase); + // Set timeout for connect + hbTimeout.SetInteger((CLR_INT64)20000 * TIME_CONVERSION__TO_MILLISECONDS); - // Reconnect kind - reconnectionKind = stack.Arg3().NumericByRef().s4; + res = (esp_err_t)Network_Interface_Start_Connect(netIndex, szSsid, szPassPhase, reconnectionKind); + if (res != ESP_OK) + { + Status = UnspecifiedFailure; + eventResult = false; + } + } - res = (esp_err_t)Network_Interface_Connect(netIndex, szSsid, szPassPhase, reconnectionKind); - switch (res) + // Wait for connect to finish + while (eventResult) { - case ESP_OK: - Status = Success; - break; - case ESP_ERR_WIFI_SSID: - Status = NetworkNotAvailable; - break; - case ESP_ERR_WIFI_PASSWORD: - Status = InvalidCredential; - break; - case ESP_ERR_WIFI_TIMEOUT: - Status = Timeout; + int connectResult = Network_Interface_Connect_Result(netIndex); + if (connectResult >= 0) + { + // Map ESP32 wifi reason code to WiFiConnectionStatus + switch (connectResult) + { + case 0: + Status = Success; + break; + + case WIFI_REASON_NO_AP_FOUND: + Status = NetworkNotAvailable; + break; + + case WIFI_REASON_AUTH_EXPIRE: + case WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT: + case WIFI_REASON_BEACON_TIMEOUT: + case WIFI_REASON_AUTH_FAIL: + case WIFI_REASON_ASSOC_FAIL: + case WIFI_REASON_HANDSHAKE_TIMEOUT: + Status = InvalidCredential; + break; + + default: + Status = UnspecifiedFailure; + break; + } break; + } - default: - case ESP_ERR_WIFI_NOT_INIT: - case ESP_ERR_WIFI_NOT_STARTED: - case ESP_ERR_WIFI_CONN: - Status = UnspecifiedFailure; + // Get timeout + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeout)); + + // non-blocking wait allowing other threads to run while we wait for the Spi transaction to complete + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeout, Event_Wifi_Station, eventResult)); + + if (!eventResult) + { + // Timeout + Status = Timeout; break; + } } // Return value to the managed application diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp index d87c0839ea..8e2c305425 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/Windows.Storage/win_storage_native_Windows_Storage_StorageFolder.cpp @@ -57,7 +57,7 @@ void CombinePath(char *outpath, const char *path1, const char *path2) strcat(outpath, path2); } -SYSTEMTIME GetDateTime(time_t *time) +SYSTEMTIME GetDateTimeStat(time_t *time) { SYSTEMTIME fileTime; @@ -83,6 +83,30 @@ SYSTEMTIME GetDateTime(time_t *time) return fileTime; } +// Added here for IO.Filesystem +SYSTEMTIME GetDateTime(uint16_t date, uint16_t time) +{ + SYSTEMTIME fileTime; + + memset(&fileTime, 0, sizeof(SYSTEMTIME)); + + // date (bit15:9) Year origin from 1980 (0..127) + fileTime.wYear = (date >> 9) + 1980; + // date (bit8:5) Month (1..12) + fileTime.wMonth = (date >> 5) & 0x000F; + // date (bit4:0) Day (1..31) + fileTime.wDay = date & 0x001F; + + // time (bit15:11) Hour (0..23) + fileTime.wHour = (time >> 11) & 0x001F; + // time (bit10:5) Minute (0..59) + fileTime.wMinute = (time >> 5) & 0x003F; + // time (bit4:0) Second / 2 (0..29) + fileTime.wSecond = time & 0x001F; + + return fileTime; +} + uint64_t GetFileTimeFromPath(char *path) { char *workingPath = NULL; @@ -98,7 +122,7 @@ uint64_t GetFileTimeFromPath(char *path) // compute folder/file date/time if (stat(workingPath, &fileInfo) == 0) { - fileInfoTime = GetDateTime(&fileInfo.st_ctime); + fileInfoTime = GetDateTimeStat(&fileInfo.st_ctime); } else { diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/app_main.c b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/app_main.c index 3d1ba45c5b..904ceb0ed2 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/app_main.c +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/app_main.c @@ -44,6 +44,14 @@ void main_task(void *pvParameter) vTaskDelete(NULL); } +// Dummy defauly log method to stop output from ESP32 IDF +int dummyLog ( const char * format, va_list arg ) +{ + (void)format; + (void)arg; + return 1; +} + // App_main // Called from Esp32 IDF start up code before scheduler starts // @@ -52,6 +60,10 @@ void app_main() // Switch off logging so as not to interfere with WireProtocol over Uart0 esp_log_level_set("*", ESP_LOG_NONE); + // Stop any logging being directed to VS connection, was an issue with Nimble, outputting on Uart0 + // TODO : redirect these to debugger controlled from nanoframework.Hardware.Esp32 + esp_log_set_vprintf(dummyLog); + ESP_ERROR_CHECK(nvs_flash_init()); xTaskCreatePinnedToCore(&receiver_task, "ReceiverThread", 2048, NULL, 5, NULL, 1); diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/blehr_sens.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/blehr_sens.h new file mode 100644 index 0000000000..60e72a4917 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/blehr_sens.h @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#ifndef H_BLEHR_SENSOR_ +#define H_BLEHR_SENSOR_ + +#include "nimble/ble.h" +#include "modlog/modlog.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Heart-rate configuration */ +#define GATT_HRS_UUID 0x180D +#define GATT_HRS_MEASUREMENT_UUID 0x2A37 +#define GATT_HRS_BODY_SENSOR_LOC_UUID 0x2A38 +#define GATT_DEVICE_INFO_UUID 0x180A +#define GATT_MANUFACTURER_NAME_UUID 0x2A29 +#define GATT_MODEL_NUMBER_UUID 0x2A24 + +extern uint16_t hrs_hrm_handle; + +struct ble_hs_cfg; +struct ble_gatt_register_ctxt; + +void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg); +int gatt_svr_init(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/gatt_svr.c b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/gatt_svr.c new file mode 100644 index 0000000000..a9301587c6 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/gatt_svr.c @@ -0,0 +1,199 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" + +#include +#include +#include +#include "host/ble_hs.h" +#include "host/ble_uuid.h" +#include "services/gap/ble_svc_gap.h" +#include "services/gatt/ble_svc_gatt.h" +#include "blehr_sens.h" + +static const char *manuf_name = "Apache Mynewt ESP32 devkitC"; +static const char *model_num = "Mynewt HR Sensor demo"; +uint16_t hrs_hrm_handle; + +static int +gatt_svr_chr_access_heart_rate(uint16_t conn_handle, uint16_t attr_handle, + struct ble_gatt_access_ctxt *ctxt, void *arg); + +static int +gatt_svr_chr_access_device_info(uint16_t conn_handle, uint16_t attr_handle, + struct ble_gatt_access_ctxt *ctxt, void *arg); + +static const struct ble_gatt_svc_def gatt_svr_svcs[] = { + { + /* Service: Heart-rate */ + .type = BLE_GATT_SVC_TYPE_PRIMARY, + .uuid = BLE_UUID16_DECLARE(GATT_HRS_UUID), + .characteristics = (struct ble_gatt_chr_def[]) + { { + /* Characteristic: Heart-rate measurement */ + .uuid = BLE_UUID16_DECLARE(GATT_HRS_MEASUREMENT_UUID), + .access_cb = gatt_svr_chr_access_heart_rate, + .val_handle = &hrs_hrm_handle, + .flags = BLE_GATT_CHR_F_NOTIFY, + }, { + /* Characteristic: Body sensor location */ + .uuid = BLE_UUID16_DECLARE(GATT_HRS_BODY_SENSOR_LOC_UUID), + .access_cb = gatt_svr_chr_access_heart_rate, + .flags = BLE_GATT_CHR_F_READ, + }, { + 0, /* No more characteristics in this service */ + }, + } + }, + + { + /* Service: Device Information */ + .type = BLE_GATT_SVC_TYPE_PRIMARY, + .uuid = BLE_UUID16_DECLARE(GATT_DEVICE_INFO_UUID), + .characteristics = (struct ble_gatt_chr_def[]) + { { + /* Characteristic: * Manufacturer name */ + .uuid = BLE_UUID16_DECLARE(GATT_MANUFACTURER_NAME_UUID), + .access_cb = gatt_svr_chr_access_device_info, + .flags = BLE_GATT_CHR_F_READ, + }, { + /* Characteristic: Model number string */ + .uuid = BLE_UUID16_DECLARE(GATT_MODEL_NUMBER_UUID), + .access_cb = gatt_svr_chr_access_device_info, + .flags = BLE_GATT_CHR_F_READ, + }, { + 0, /* No more characteristics in this service */ + }, + } + }, + + { + 0, /* No more services */ + }, +}; + +static int +gatt_svr_chr_access_heart_rate(uint16_t conn_handle, uint16_t attr_handle, + struct ble_gatt_access_ctxt *ctxt, void *arg) +{ + (void)conn_handle; + (void)attr_handle; + (void)arg; + + /* Sensor location, set to "Chest" */ + static uint8_t body_sens_loc = 0x01; + uint16_t uuid; + int rc; + + uuid = ble_uuid_u16(ctxt->chr->uuid); + + if (uuid == GATT_HRS_BODY_SENSOR_LOC_UUID) { + rc = os_mbuf_append(ctxt->om, &body_sens_loc, sizeof(body_sens_loc)); + + return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; + } + + assert(0); + return BLE_ATT_ERR_UNLIKELY; +} + +static int +gatt_svr_chr_access_device_info(uint16_t conn_handle, uint16_t attr_handle, + struct ble_gatt_access_ctxt *ctxt, void *arg) +{ + (void)conn_handle; + (void)attr_handle; + (void)arg; + + uint16_t uuid; + int rc; + + uuid = ble_uuid_u16(ctxt->chr->uuid); + + if (uuid == GATT_MODEL_NUMBER_UUID) { + rc = os_mbuf_append(ctxt->om, model_num, strlen(model_num)); + return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; + } + + if (uuid == GATT_MANUFACTURER_NAME_UUID) { + rc = os_mbuf_append(ctxt->om, manuf_name, strlen(manuf_name)); + return rc == 0 ? 0 : BLE_ATT_ERR_INSUFFICIENT_RES; + } + + assert(0); + return BLE_ATT_ERR_UNLIKELY; +} + +void +gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg) +{ + (void)arg; + + //char buf[BLE_UUID_STR_LEN]; + + switch (ctxt->op) { + case BLE_GATT_REGISTER_OP_SVC: + // MODLOG_DFLT(DEBUG, "registered service %s with handle=%d\n", + // ble_uuid_to_str(ctxt->svc.svc_def->uuid, buf), + // ctxt->svc.handle); + break; + + case BLE_GATT_REGISTER_OP_CHR: + // MODLOG_DFLT(DEBUG, "registering characteristic %s with " + // "def_handle=%d val_handle=%d\n", + // ble_uuid_to_str(ctxt->chr.chr_def->uuid, buf), + // ctxt->chr.def_handle, + // ctxt->chr.val_handle); + break; + + case BLE_GATT_REGISTER_OP_DSC: + // MODLOG_DFLT(DEBUG, "registering descriptor %s with handle=%d\n", + // ble_uuid_to_str(ctxt->dsc.dsc_def->uuid, buf), + // ctxt->dsc.handle); + break; + + default: + assert(0); + break; + } +} + +int +gatt_svr_init(void) +{ + int rc; + + ble_svc_gap_init(); + ble_svc_gatt_init(); + + rc = ble_gatts_count_cfg(gatt_svr_svcs); + if (rc != 0) { + return rc; + } + + rc = ble_gatts_add_svcs(gatt_svr_svcs); + if (rc != 0) { + return rc; + } + + return 0; +} + diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble.cpp new file mode 100644 index 0000000000..ee33061ce6 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble.cpp @@ -0,0 +1,410 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#include "nanoFramework_hardware_esp32_ble_native.h" + +#include +#include "Esp32_DeviceMapping.h" + + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include "esp_log.h" +//#include "nvs_flash.h" +#include "freertos/FreeRTOSConfig.h" +/* BLE */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#include "esp_nimble_hci.h" +#include "nimble/nimble_port.h" +#include "nimble/nimble_port_freertos.h" +#include "host/ble_hs.h" +#include "host/util/util.h" +#include "console/console.h" +#include "services/gap/ble_svc_gap.h" +#include "blehr_sens.h" +#pragma GCC diagnostic pop + + +static const char *tag = "NimBLE_BLE_HeartRate"; + +static xTimerHandle blehr_tx_timer; + +static bool notify_state; + +static uint16_t conn_handle; + +static const char *device_name = "blehr_sensor_1.0"; + +static int blehr_gap_event(struct ble_gap_event *event, void *arg); + +static uint8_t blehr_addr_type; + +/* Variable to simulate heart beats */ +static uint8_t heartrate = 90; + +/** + * Utility function to log an array of bytes. + */ +void +print_bytes(const uint8_t *bytes, int len) +{ + (void)bytes; + (void)len; + + // int i; + // for (i = 0; i < len; i++) { + // MODLOG_DFLT(INFO, "%s0x%02x", i != 0 ? ":" : "", bytes[i]); + // } +} + +void +print_addr(const void *addr) +{ + (void)addr; + + // const uint8_t *u8p; + + // u8p = addr; + // MODLOG_DFLT(INFO, "%02x:%02x:%02x:%02x:%02x:%02x", + // u8p[5], u8p[4], u8p[3], u8p[2], u8p[1], u8p[0]); +} + +/* + * Enables advertising with parameters: + * o General discoverable mode + * o Undirected connectable mode + */ +static void +blehr_advertise(void) +{ + struct ble_gap_adv_params adv_params; + struct ble_hs_adv_fields fields; + int rc; + + /* + * Set the advertisement data included in our advertisements: + * o Flags (indicates advertisement type and other general info) + * o Advertising tx power + * o Device name + */ + memset(&fields, 0, sizeof(fields)); + + /* + * Advertise two flags: + * o Discoverability in forthcoming advertisement (general) + * o BLE-only (BR/EDR unsupported) + */ + fields.flags = BLE_HS_ADV_F_DISC_GEN | + BLE_HS_ADV_F_BREDR_UNSUP; + + /* + * Indicate that the TX power level field should be included; have the + * stack fill this value automatically. This is done by assigning the + * special value BLE_HS_ADV_TX_PWR_LVL_AUTO. + */ + fields.tx_pwr_lvl_is_present = 1; + fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO; + + fields.name = (uint8_t *)device_name; + fields.name_len = hal_strlen_s(device_name); + fields.name_is_complete = 1; + + rc = ble_gap_adv_set_fields(&fields); + if (rc != 0) { +// MODLOG_DFLT(ERROR, "error setting advertisement data; rc=%d\n", rc); + return; + } + + /* Begin advertising */ + memset(&adv_params, 0, sizeof(adv_params)); + adv_params.conn_mode = BLE_GAP_CONN_MODE_UND; + adv_params.disc_mode = BLE_GAP_DISC_MODE_GEN; + rc = ble_gap_adv_start(blehr_addr_type, NULL, BLE_HS_FOREVER, + &adv_params, blehr_gap_event, NULL); + if (rc != 0) { +// MODLOG_DFLT(ERROR, "error enabling advertisement; rc=%d\n", rc); + return; + } +} + +static void +blehr_tx_hrate_stop(void) +{ + xTimerStop( blehr_tx_timer, 1000 / portTICK_PERIOD_MS ); +} + +/* Reset heart rate measurement */ +static void +blehr_tx_hrate_reset(void) +{ + int rc; + + if (xTimerReset(blehr_tx_timer, 1000 / portTICK_PERIOD_MS ) == pdPASS) { + rc = 0; + } else { + rc = 1; + } + + assert(rc == 0); + +} + +/* This function simulates heart beat and notifies it to the client */ +static void +blehr_tx_hrate(xTimerHandle ev) +{ + (void)ev; + + static uint8_t hrm[2]; + int rc; + struct os_mbuf *om; + + if (!notify_state) { + blehr_tx_hrate_stop(); + heartrate = 90; + return; + } + + hrm[0] = 0x06; /* contact of a sensor */ + hrm[1] = heartrate; /* storing dummy data */ + + /* Simulation of heart beats */ + heartrate++; + if (heartrate == 160) { + heartrate = 90; + } + + om = ble_hs_mbuf_from_flat(hrm, sizeof(hrm)); + rc = ble_gattc_notify_custom(conn_handle, hrs_hrm_handle, om); + + assert(rc == 0); + + blehr_tx_hrate_reset(); +} + +static int +blehr_gap_event(struct ble_gap_event *event, void *arg) +{ + (void)arg; + + switch (event->type) { + + case BLE_GAP_EVENT_CONNECT: + /* A new connection was established or a connection attempt failed */ + MODLOG_DFLT(INFO, "connection %s; status=%d\n", + event->connect.status == 0 ? "established" : "failed", + event->connect.status); + + if (event->connect.status != 0) { + /* Connection failed; resume advertising */ + blehr_advertise(); + } + conn_handle = event->connect.conn_handle; + break; + + case BLE_GAP_EVENT_DISCONNECT: + MODLOG_DFLT(INFO, "disconnect; reason=%d\n", event->disconnect.reason); + + /* Connection terminated; resume advertising */ + blehr_advertise(); + break; + + case BLE_GAP_EVENT_ADV_COMPLETE: + MODLOG_DFLT(INFO, "adv complete\n"); + blehr_advertise(); + break; + + case BLE_GAP_EVENT_SUBSCRIBE: + MODLOG_DFLT(INFO, "subscribe event; cur_notify=%d\n value handle; " + "val_handle=%d\n", + event->subscribe.cur_notify, hrs_hrm_handle); + if (event->subscribe.attr_handle == hrs_hrm_handle) { + notify_state = event->subscribe.cur_notify; + blehr_tx_hrate_reset(); + } else if (event->subscribe.attr_handle != hrs_hrm_handle) { + notify_state = event->subscribe.cur_notify; + blehr_tx_hrate_stop(); + } + ESP_LOGI("BLE_GAP_SUBSCRIBE_EVENT", "conn_handle from subscribe=%d", conn_handle); + break; + + case BLE_GAP_EVENT_MTU: + MODLOG_DFLT(INFO, "mtu update event; conn_handle=%d mtu=%d\n", + event->mtu.conn_handle, + event->mtu.value); + break; + + } + + return 0; +} + +static void +blehr_on_sync(void) +{ + int rc; + + rc = ble_hs_id_infer_auto(0, &blehr_addr_type); + assert(rc == 0); + + uint8_t addr_val[6] = {0}; + rc = ble_hs_id_copy_addr(blehr_addr_type, addr_val, NULL); + + MODLOG_DFLT(INFO, "Device Address: "); + print_addr(addr_val); + MODLOG_DFLT(INFO, "\n"); + + /* Begin advertising */ + blehr_advertise(); +} + +static void +blehr_on_reset(int reason) +{ + MODLOG_DFLT(ERROR, "Resetting state; reason=%d\n", reason); +} + +void blehr_host_task(void *param) +{ + (void)param; + + ESP_LOGI(tag, "BLE Host Task Started"); + /* This function will return only when nimble_port_stop() is executed */ + nimble_port_run(); + + nimble_port_freertos_deinit(); +} + +void blehr_main_task(void *param) +{ + (void)param; + int rc; + + // Delay start for test otherwise debug from VS has problems + OS_DELAY(1000); + + ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); + + nimble_port_init(); + /* Initialize the NimBLE host configuration */ + ble_hs_cfg.sync_cb = blehr_on_sync; + ble_hs_cfg.reset_cb = blehr_on_reset; + + /* name, period/time, auto reload, timer ID, callback */ + blehr_tx_timer = xTimerCreate("blehr_tx_timer", pdMS_TO_TICKS(1000), pdTRUE, (void *)0, blehr_tx_hrate); + + rc = gatt_svr_init(); + assert(rc == 0); + + /* Set the default device name */ + rc = ble_svc_gap_device_name_set(device_name); + assert(rc == 0); + + /* Start the task */ + nimble_port_freertos_init(blehr_host_task); +} + +// Start BLE heart rate monitor device +void blehr_start() +{ + nimble_port_freertos_init(blehr_main_task); +} + +// ======================================================= +// Ibeacon test code +// ================= +static void +ble_app_set_addr(void) +{ + ble_addr_t addr; + int rc; + + rc = ble_hs_id_gen_rnd(1, &addr); + assert(rc == 0); + + rc = ble_hs_id_set_rnd(addr.val); + assert(rc == 0); +} + +static void +ble_app_advertise(void) +{ + struct ble_gap_adv_params adv_params; + uint8_t uuid128[16]; + int rc; + + /* Arbitrarily set the UUID to a string of 0x11 bytes. */ + memset(uuid128, 0x11, sizeof uuid128); + + /* Major version=2; minor version=10. */ + rc = ble_ibeacon_set_adv_data(uuid128, 2, 10, 0); + assert(rc == 0); + + /* Begin advertising. */ + adv_params = (struct ble_gap_adv_params){ 0,0,0,0,0,0,0 }; + rc = ble_gap_adv_start(BLE_OWN_ADDR_RANDOM, NULL, BLE_HS_FOREVER, + &adv_params, NULL, NULL); + assert(rc == 0); +} + +static void +ble_app_on_sync(void) +{ + /* Generate a non-resolvable private address. */ + ble_app_set_addr(); + + /* Advertise indefinitely. */ + ble_app_advertise(); +} + + +void ibeacon_host_task(void *param) +{ + (void)param; + + // Delay start for test otehrwise debug from VS has problems + OS_DELAY(1000); + + ESP_LOGI(tag, "BLE Host Task Started"); + + ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init()); + + nimble_port_init(); + + ble_hs_cfg.sync_cb = ble_app_on_sync; + + /* This function will return only when nimble_port_stop() is executed */ + nimble_port_run(); + + nimble_port_freertos_deinit(); +} + +void ibeacon_start() +{ + /* Start the task */ + nimble_port_freertos_init(ibeacon_host_task); +} + + + diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble_native.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble_native.cpp new file mode 100644 index 0000000000..2206716a75 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble_native.cpp @@ -0,0 +1,22 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#include "nanoFramework_hardware_esp32_ble_native.h" + +static const CLR_RT_MethodHandler method_lookup[] = +{ + NULL, + NULL, + NULL +}; + +const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Hardware_Esp32_Ble = +{ + "nanoFramework.Hardware.Esp32.Ble", + 0x1B75B894, + method_lookup, + { 100, 0, 0, 0 } +}; diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble_native.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble_native.h new file mode 100644 index 0000000000..2e94d46b12 --- /dev/null +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/nanoFramework.Hardware.Esp32.Ble/nanoFramework_hardware_esp32_ble_native.h @@ -0,0 +1,19 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) Microsoft Corporation. All rights reserved. +// See LICENSE file in the project root for full license information. +// + +#ifndef _NANOFRAMEWORK_HARDWARE_ESP32_NATIVE_H_ +#define _NANOFRAMEWORK_HARDWARE_ESP32_NATIVE_H_ + +#include +#include +#include +#include + + + +extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Hardware_Esp32_Ble; + +#endif //_NANOFRAMEWORK_HARDWARE_ESP32_BLE_NATIVE_H_ diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL.cpp index 3e420e50a8..bc8b62dff1 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL.cpp @@ -19,6 +19,10 @@ void Storage_Uninitialize(); extern "C" void FixUpHalSystemConfig(); extern "C" void FixUpBlockRegionInfo(); +// Test code for BLE, will be removed once we have managed code interface +extern void blehr_start(); +extern void ibeacon_start(); + // // Reboot handlers clean up on reboot // @@ -118,7 +122,6 @@ void nanoHAL_Initialize() // Ink_Initialize(); g_DisplayDriver.Clear(); - #endif // no PAL events required until now @@ -129,6 +132,12 @@ void nanoHAL_Initialize() // Start Network Debugger // SOCKETS_DbgInitialize( 0 ); + +#if (NANOCLR_ESP32_BLE == TRUE) + // Bluetooth test code + // blehr_start(); // Heart rate monitor device test + // ibeacon_start(); // Ibeacon test code +#endif } void nanoHAL_Uninitialize() @@ -173,4 +182,4 @@ void nanoHAL_Uninitialize() // Just in case storage is not configured __nfweak void Storage_Initialize(){}; -__nfweak void Storage_Uninitialize(){}; \ No newline at end of file +__nfweak void Storage_Uninitialize(){}; diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL_ConfigurationManager.cpp b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL_ConfigurationManager.cpp index 93810dbd5e..1a780b6a7e 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL_ConfigurationManager.cpp +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/targetHAL_ConfigurationManager.cpp @@ -413,10 +413,8 @@ void InitialiseWirelessDefaultConfig(HAL_Configuration_Wireless80211 *pconfig, u // Set default to Auto Connect + Enable + WirelessFlags_SmartConfig so station can be started by default // Once smart config has run will start up automatically and reconnect of disconnected // Application will have to disable wifi to save power etc - pconfig->Options = (Wireless80211Configuration_ConfigurationOptions)( - Wireless80211Configuration_ConfigurationOptions_AutoConnect | - Wireless80211Configuration_ConfigurationOptions_Enable | - Wireless80211Configuration_ConfigurationOptions_SmartConfig); + pconfig->Options = + (Wireless80211Configuration_ConfigurationOptions)(Wireless80211Configuration_ConfigurationOptions_AutoConnect | Wireless80211Configuration_ConfigurationOptions_Enable | Wireless80211Configuration_ConfigurationOptions_SmartConfig); } // Default initialisation of wireless config blocks for ESP32 targets @@ -775,7 +773,6 @@ bool ConfigurationManager_StoreConfigurationBlock( { bool result = false; bool requiresEnumeration = false; - size_t blobSize = 0; #ifdef DEBUG_CONFIG ets_printf( @@ -797,30 +794,30 @@ bool ConfigurationManager_StoreConfigurationBlock( { if (configuration == DeviceConfigurationOption_Network) { - // set blob size - blobSize = sizeof(HAL_Configuration_NetworkInterface); + // set blockSize size + blockSize = sizeof(HAL_Configuration_NetworkInterface); } else if (configuration == DeviceConfigurationOption_Wireless80211Network) { - // set blob size - blobSize = sizeof(HAL_Configuration_Wireless80211); + // set blockSize size + blockSize = sizeof(HAL_Configuration_Wireless80211); } else if (configuration == DeviceConfigurationOption_WirelessNetworkAP) { - // set blob size - blobSize = sizeof(HAL_Configuration_WirelessAP); + // set blockSize size + blockSize = sizeof(HAL_Configuration_WirelessAP); } else if (configuration == DeviceConfigurationOption_X509CaRootBundle) { - // set blob size ( Total size of X509 certificate ) + // set blockSize size ( Total size of X509 certificate ) // because X509 certificate has a variable length need to compute the block size in two steps - blobSize = offsetof(HAL_Configuration_X509CaRootBundle, Certificate); - blobSize += ((HAL_Configuration_X509CaRootBundle *)configurationBlock)->CertificateSize; + blockSize = offsetof(HAL_Configuration_X509CaRootBundle, Certificate); + blockSize += ((HAL_Configuration_X509CaRootBundle *)configurationBlock)->CertificateSize; #ifdef DEBUG_CONFIG ets_printf( - "StoreConfig x509 blobSize:%d, certsize:%d", - blobSize, + "StoreConfig x509 blockSize:%d, certsize:%d", + blockSize, ((HAL_Configuration_X509CaRootBundle *)configurationBlock)->CertificateSize); #endif } @@ -832,9 +829,9 @@ bool ConfigurationManager_StoreConfigurationBlock( } // Anything to save - if (blobSize != 0) + if (blockSize != 0) { - result = StoreConfigBlock(configuration, configurationIndex, configurationBlock, blobSize); + result = StoreConfigBlock(configuration, configurationIndex, configurationBlock, blockSize); } if (requiresEnumeration) diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/target_platform.h.in b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/target_platform.h.in index 341569a378..ef6ab01ba8 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/target_platform.h.in +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/nanoCLR/target_platform.h.in @@ -3,20 +3,16 @@ // See LICENSE file in the project root for full license information. // -////////////////////////////////////////////////////////////////////////////// -// This file was automatically generated by a tool. // -// Any changes you make here will be overwritten when it's generated again. // -////////////////////////////////////////////////////////////////////////////// - #ifndef _TARGET_PLATFORM_H_ #define _TARGET_PLATFORM_H_ 1 -#define NANOCLR_GRAPHICS @NANOCLR_GRAPHICS@ -#define HAL_USE_SPI @HAL_USE_SPI_OPTION@ -#define HAL_USE_SDC @HAL_USE_SDC_OPTION@ +#define NANOCLR_GRAPHICS @NANOCLR_GRAPHICS@ +#define HAL_USE_SPI @HAL_USE_SPI_OPTION@ +#define HAL_USE_SDC @HAL_USE_SDC_OPTION@ +#define NANOCLR_ESP32_BLE @USE_ESP32_BLE@ #if defined(HAL_USE_SDC) -#define SDC_MAX_OPEN_FILES 5 +#define SDC_MAX_OPEN_FILES 5 #endif #endif /* _TARGET_PLATFORM_H_ */ diff --git a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig.h b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig.h index 2650e564b5..88f8f7d522 100644 --- a/targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig.h +++ b/targets/FreeRTOS_ESP32/ESP32_WROOM_32/sdkconfig.h @@ -4,34 +4,33 @@ * Espressif IoT Development Framework Configuration * */ -#define CONFIG_GATTC_ENABLE 1 #define CONFIG_ESP32_PHY_MAX_TX_POWER 20 #define CONFIG_TRACEMEM_RESERVE_DRAM 0x0 #define CONFIG_FREERTOS_MAX_TASK_NAME_LEN 16 #define CONFIG_MQTT_TRANSPORT_SSL 1 -#define CONFIG_BLE_SMP_ENABLE 1 -#define CONFIG_SPIRAM_TYPE_AUTO 1 -#define CONFIG_SDP_INITIAL_TRACE_LEVEL 2 #define CONFIG_MB_SERIAL_TASK_PRIO 10 #define CONFIG_MQTT_PROTOCOL_311 1 #define CONFIG_TCP_RECVMBOX_SIZE 6 #define CONFIG_FATFS_CODEPAGE_437 1 #define CONFIG_BLE_SCAN_DUPLICATE 1 -#define CONFIG_AVDT_TRACE_LEVEL_WARNING 1 #define CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_ACKS 10 #define CONFIG_TCP_WND_DEFAULT 5744 #define CONFIG_PARTITION_TABLE_OFFSET 0x8000 #define CONFIG_SW_COEXIST_ENABLE 1 +#define CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE 3 #define CONFIG_SPIFFS_USE_MAGIC_LENGTH 1 #define CONFIG_ESPTOOLPY_FLASHSIZE_4MB 1 -#define CONFIG_AVCT_INITIAL_TRACE_LEVEL 2 #define CONFIG_IPC_TASK_STACK_SIZE 1024 #define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16 #define CONFIG_FATFS_PER_FILE_CACHE 1 #define CONFIG_ESPTOOLPY_FLASHFREQ "40m" #define CONFIG_AWS_IOT_SHADOW_MAX_SIZE_OF_THING_NAME 20 +#define CONFIG_BLINK_GPIO 5 +#define CONFIG_LWIP_TCP_RTO_TIME 1500 #define CONFIG_MBEDTLS_KEY_EXCHANGE_RSA 1 #define CONFIG_UDP_RECVMBOX_SIZE 6 +#define CONFIG_NIMBLE_PINNED_TO_CORE 0 +#define CONFIG_APP_RETRIEVE_LEN_ELF_SHA 16 #define CONFIG_SPI_FLASH_YIELD_DURING_ERASE 1 #define CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE 0 #define CONFIG_MBEDTLS_AES_C 1 @@ -41,10 +40,10 @@ #define CONFIG_ESPTOOLPY_FLASHSIZE "4MB" #define CONFIG_HEAP_POISONING_DISABLED 1 #define CONFIG_SPIFFS_CACHE_WR 1 -#define CONFIG_SPIRAM_CACHE_WORKAROUND 1 #define CONFIG_BROWNOUT_DET_LVL_SEL_0 1 -#define CONFIG_D0WD_PSRAM_CS_IO 16 #define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1 +#define CONFIG_NIMBLE_ROLE_CENTRAL 1 +#define CONFIG_NIMBLE_L2CAP_COC_MAX_NUM 0 #define CONFIG_SPIFFS_CACHE 1 #define CONFIG_INT_WDT 1 #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN 3 @@ -59,18 +58,16 @@ #define CONFIG_AWS_IOT_MQTT_PORT 8883 #define CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS 1 #define CONFIG_MBEDTLS_ECDH_C 1 -#define CONFIG_SPIRAM_USE_CAPS_ALLOC 1 #define CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE 1 +#define CONFIG_MBEDTLS_ECP_RESTARTABLE 1 #define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 10 #define CONFIG_AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL 128000 #define CONFIG_MBEDTLS_SSL_ALPN 1 -#define CONFIG_BTM_TRACE_LEVEL_WARNING 1 #define CONFIG_MBEDTLS_PEM_WRITE_C 1 -#define CONFIG_RFCOMM_TRACE_LEVEL_WARNING 1 #define CONFIG_LOG_DEFAULT_LEVEL_INFO 1 #define CONFIG_BT_RESERVE_DRAM 0xdb5c #define CONFIG_APP_COMPILE_TIME_DATE 1 -#define CONFIG_D2WD_PSRAM_CLK_IO 9 +#define CONFIG_NIMBLE_MAX_CONNECTIONS 3 #define CONFIG_FATFS_FS_LOCK 0 #define CONFIG_IP_LOST_TIMER_INTERVAL 120 #define CONFIG_SPIFFS_META_LENGTH 4 @@ -81,31 +78,34 @@ #define CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL 5 #define CONFIG_AWS_IOT_MQTT_RX_BUF_LEN 512 #define CONFIG_MB_SERIAL_BUF_SIZE 256 +#define CONFIG_NIMBLE_HS_FLOW_CTRL 1 #define CONFIG_CONSOLE_UART_BAUDRATE 115200 -#define CONFIG_SPIRAM_SUPPORT 1 +#define CONFIG_NIMBLE_SM_SC 1 #define CONFIG_LWIP_MAX_SOCKETS 10 +#define CONFIG_NIMBLE_HS_FLOW_CTRL_ITVL 1000 #define CONFIG_LWIP_NETIF_LOOPBACK 1 -#define CONFIG_MCA_TRACE_LEVEL_WARNING 1 +#define CONFIG_LWIP_TCP_ISN_HOOK 1 #define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT "pthread" #define CONFIG_EMAC_TASK_PRIORITY 20 #define CONFIG_TIMER_TASK_STACK_DEPTH 2048 #define CONFIG_TCP_MSS 1436 #define CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED 1 -#define CONFIG_BTIF_INITIAL_TRACE_LEVEL 2 +#define CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL 1 #define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF 3 #define CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4 1 #define CONFIG_FATFS_CODEPAGE 437 -#define CONFIG_APPL_TRACE_LEVEL_WARNING 1 -#define CONFIG_BTC_INITIAL_TRACE_LEVEL 2 -#define CONFIG_SPIRAM_SPIWP_SD3_PIN 7 +#define CONFIG_NIMBLE_ROLE_BROADCASTER 1 #define CONFIG_ULP_COPROC_RESERVE_MEM 512 #define CONFIG_LWIP_MAX_UDP_PCBS 16 #define CONFIG_ESPTOOLPY_BAUD 115200 #define CONFIG_INT_WDT_CHECK_CPU1 1 -#define CONFIG_AVRC_INITIAL_TRACE_LEVEL 2 #define CONFIG_ADC_CAL_LUT_ENABLE 1 #define CONFIG_AWS_IOT_MQTT_TX_BUF_LEN 512 +#define CONFIG_NIMBLE_MSYS1_BLOCK_COUNT 12 #define CONFIG_FLASHMODE_DIO 1 +#define CONFIG_LWIP_ESP_LWIP_ASSERT 1 +#define CONFIG_NIMBLE_MAX_BONDS 3 +#define CONFIG_NIMBLE_TASK_STACK_SIZE 4096 #define CONFIG_ESPTOOLPY_AFTER_RESET 1 #define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED 1 #define CONFIG_LWIP_DHCPS_MAX_STATION_NUM 8 @@ -113,7 +113,6 @@ #define CONFIG_MBEDTLS_ECP_C 1 #define CONFIG_FREERTOS_IDLE_TASK_STACKSIZE 1536 #define CONFIG_MBEDTLS_RC4_DISABLED 1 -#define CONFIG_GAP_TRACE_LEVEL_WARNING 1 #define CONFIG_SPI_SLAVE_IN_IRAM 1 #define CONFIG_CONSOLE_UART_NUM 0 #define CONFIG_AWS_IOT_SHADOW_MAX_JSON_TOKEN_EXPECTED 120 @@ -124,42 +123,40 @@ #define CONFIG_TCP_OVERSIZE_MSS 1 #define CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS 1 #define CONFIG_CONSOLE_UART_DEFAULT 1 +#define CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT 8 #define CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN 16384 #define CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS 4 -#define CONFIG_GATT_TRACE_LEVEL_WARNING 1 +#define CONFIG_NIMBLE_SVC_GAP_APPEARANCE 0x0 #define CONFIG_ESPTOOLPY_FLASHSIZE_DETECT 1 +#define CONFIG_NIMBLE_MAX_CCCDS 8 #define CONFIG_TIMER_TASK_STACK_SIZE 3584 -#define CONFIG_BTIF_TRACE_LEVEL_WARNING 1 #define CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE 1 -#define CONFIG_HCI_INITIAL_TRACE_LEVEL 2 -#define CONFIG_AVDT_INITIAL_TRACE_LEVEL 2 #define CONFIG_MBEDTLS_X509_CRL_PARSE_C 1 +#define CONFIG_MBEDTLS_CMAC_C 1 #define CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER 1 #define CONFIG_HTTPD_PURGE_BUF_LEN 32 #define CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR 1 #define CONFIG_AWS_IOT_SHADOW_MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60 #define CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER 1 #define CONFIG_MB_SERIAL_TASK_STACK_SIZE 2048 -#define CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO 1 #define CONFIG_LWIP_DHCPS_LEASE_UNIT 60 +#define CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION 1 #define CONFIG_EFUSE_MAX_BLK_LEN 192 #define CONFIG_SPIFFS_USE_MAGIC 1 +#define CONFIG_NIMBLE_SM_LEGACY 1 #define CONFIG_TCPIP_TASK_STACK_SIZE 2048 -#define CONFIG_BLUFI_TRACE_LEVEL_WARNING 1 -#define CONFIG_BLUEDROID_PINNED_TO_CORE_0 1 -#define CONFIG_RFCOMM_INITIAL_TRACE_LEVEL 2 #define CONFIG_MAIN_TASK_STACK_SIZE 3584 #define CONFIG_SPIFFS_PAGE_CHECK 1 #define CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 1 #define CONFIG_LWIP_MAX_ACTIVE_TCP 16 #define CONFIG_INT_WDT_TIMEOUT_MS 300 +#define CONFIG_NIMBLE_ATT_PREFERRED_MTU 256 #define CONFIG_ESPTOOLPY_FLASHMODE "dio" -#define CONFIG_BTC_TASK_STACK_SIZE 3072 -#define CONFIG_BLUEDROID_ENABLED 1 +#define CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME "nimble" #define CONFIG_NEWLIB_STDIN_LINE_ENDING_CR 1 #define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA 1 +#define CONFIG_NIMBLE_ROLE_OBSERVER 1 #define CONFIG_ESPTOOLPY_BEFORE "default_reset" -#define CONFIG_ADC2_DISABLE_DAC 1 #define CONFIG_FATFS_LFN_HEAP 1 #define CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM 100 #define CONFIG_ESP32_REV_MIN_0 1 @@ -168,18 +165,15 @@ #define CONFIG_TIMER_QUEUE_LENGTH 10 #define CONFIG_ESP32_REV_MIN 0 #define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT 1 -#define CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE 0 #define CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY 1 #define CONFIG_MAKE_WARN_UNDEFINED_VARIABLES 1 #define CONFIG_FATFS_TIMEOUT_MS 10000 #define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 32 #define CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS 1 -#define CONFIG_PAN_INITIAL_TRACE_LEVEL 2 #define CONFIG_MBEDTLS_CCM_C 1 +#define CONFIG_NIMBLE_HCI_EVT_BUF_SIZE 70 #define CONFIG_SPI_MASTER_ISR_IN_IRAM 1 -#define CONFIG_MCA_INITIAL_TRACE_LEVEL 2 #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER 20 -#define CONFIG_A2D_INITIAL_TRACE_LEVEL 2 #define CONFIG_ESP32_RTC_CLK_CAL_CYCLES 1024 #define CONFIG_ESP32_WIFI_TX_BA_WIN 6 #define CONFIG_ESP32_WIFI_NVS_ENABLED 1 @@ -206,8 +200,6 @@ #define CONFIG_TCP_SND_BUF_DEFAULT 5744 #define CONFIG_GARP_TMR_INTERVAL 60 #define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 -#define CONFIG_BNEP_INITIAL_TRACE_LEVEL 2 -#define CONFIG_HCI_TRACE_LEVEL_WARNING 1 #define CONFIG_TCP_MSL 60000 #define CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 1 #define CONFIG_LWIP_SO_REUSE_RXTOALL 1 @@ -218,19 +210,14 @@ #define CONFIG_ESP32_WIFI_RX_BA_WIN 6 #define CONFIG_MBEDTLS_X509_CSR_PARSE_C 1 #define CONFIG_SPIFFS_USE_MTIME 1 -#define CONFIG_BTC_TRACE_LEVEL_WARNING 1 -#define CONFIG_PICO_PSRAM_CS_IO 10 #define CONFIG_EMAC_TASK_STACK_SIZE 3072 -#define CONFIG_SMP_TRACE_LEVEL_WARNING 1 +#define CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT 30 #define CONFIG_MB_QUEUE_LENGTH 20 -#define CONFIG_SW_COEXIST_PREFERENCE_VALUE 2 #define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA 1 #define CONFIG_LWIP_DHCP_DOES_ARP_CHECK 1 #define CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER 1 -#define CONFIG_SPIRAM_SPEED_40M 1 #define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2304 #define CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V 1 -#define CONFIG_A2D_TRACE_LEVEL_WARNING 1 #define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000 #define CONFIG_AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5 #define CONFIG_BROWNOUT_DET_LVL 0 @@ -243,42 +230,33 @@ #define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM 32 #define CONFIG_HTTPD_MAX_URI_LEN 512 #define CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED 1 -#define CONFIG_AVCT_TRACE_LEVEL_WARNING 1 #define CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED 1 #define CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ 240 #define CONFIG_MBEDTLS_HARDWARE_AES 1 #define CONFIG_FREERTOS_HZ 100 #define CONFIG_LOG_COLORS 1 -#define CONFIG_OSI_TRACE_LEVEL_WARNING 1 #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE 1 #define CONFIG_STACK_CHECK_NONE 1 #define CONFIG_ADC_CAL_EFUSE_TP_ENABLE 1 -#define CONFIG_BNEP_TRACE_LEVEL_WARNING 1 #define CONFIG_FREERTOS_ASSERT_FAIL_ABORT 1 #define CONFIG_BROWNOUT_DET 1 #define CONFIG_AWS_IOT_SHADOW_MAX_SIMULTANEOUS_THINGNAMES 10 #define CONFIG_ESP32_XTAL_FREQ 0 -#define CONFIG_OSI_INITIAL_TRACE_LEVEL 2 #define CONFIG_MONITOR_BAUD_115200B 1 #define CONFIG_LOG_BOOTLOADER_LEVEL 3 -#define CONFIG_D2WD_PSRAM_CS_IO 10 #define CONFIG_MBEDTLS_TLS_ENABLED 1 #define CONFIG_LWIP_MAX_RAW_PCBS 16 -#define CONFIG_SPIRAM_IGNORE_NOTFOUND 1 -#define CONFIG_BTU_TASK_STACK_SIZE 4096 -#define CONFIG_SMP_ENABLE 1 -#define CONFIG_SPIRAM_SIZE -1 +#define CONFIG_NIMBLE_ROLE_PERIPHERAL 1 #define CONFIG_PM_ENABLE 1 -#define CONFIG_HID_TRACE_LEVEL_WARNING 1 -#define CONFIG_AVRC_TRACE_LEVEL_WARNING 1 #define CONFIG_MBEDTLS_SSL_SESSION_TICKETS 1 #define CONFIG_SPIFFS_MAX_PARTITIONS 3 #define CONFIG_ESP_ERR_TO_NAME_LOOKUP 1 +#define CONFIG_NIMBLE_PINNED_TO_CORE_0 1 #define CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0 1 #define CONFIG_MBEDTLS_SSL_RENEGOTIATION 1 -#define CONFIG_HID_INITIAL_TRACE_LEVEL 2 #define CONFIG_ESPTOOLPY_BEFORE_RESET 1 #define CONFIG_MB_EVENT_QUEUE_TIMEOUT 20 +#define CONFIG_NIMBLE_ACL_BUF_COUNT 12 #define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200 #define CONFIG_SPIFFS_OBJ_NAME_LEN 32 #define CONFIG_SPI_MASTER_IN_IRAM 1 @@ -289,8 +267,8 @@ #define CONFIG_ESP32_DEFAULT_CPU_FREQ_240 1 #define CONFIG_ESP32_XTAL_FREQ_AUTO 1 #define CONFIG_TCP_MAXRTX 12 -#define CONFIG_BTM_INITIAL_TRACE_LEVEL 2 #define CONFIG_ESPTOOLPY_AFTER "hard_reset" +#define CONFIG_LWIP_IP4_FRAG 1 #define CONFIG_TCPIP_TASK_AFFINITY 0x7FFFFFFF #define CONFIG_LWIP_SO_REUSE 1 #define CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY 1 @@ -304,70 +282,64 @@ #define CONFIG_MBEDTLS_TLS_CLIENT 1 #define CONFIG_AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL 1000 #define CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI 1 +#define CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN 31 #define CONFIG_BT_ENABLED 1 #define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY 1 -#define CONFIG_SDP_TRACE_LEVEL_WARNING 1 -#define CONFIG_D0WD_PSRAM_CLK_IO 17 -#define CONFIG_SW_COEXIST_PREFERENCE_BALANCE 1 #define CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED 1 #define CONFIG_MONITOR_BAUD 115200 #define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT -1 #define CONFIG_ESP32_DEBUG_STUBS_ENABLE 1 -#define CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT 30 #define CONFIG_TCPIP_LWIP 1 #define CONFIG_REDUCE_PHY_TX_POWER 1 #define CONFIG_BOOTLOADER_WDT_TIME_MS 9000 -#define CONFIG_PAN_TRACE_LEVEL_WARNING 1 #define CONFIG_FREERTOS_CORETIMER_0 1 +#define CONFIG_LWIP_IP6_FRAG 1 #define CONFIG_IDF_FIRMWARE_CHIP_ID 0x0000 #define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions.csv" #define CONFIG_MBEDTLS_HAVE_TIME 1 #define CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY 1 #define CONFIG_TCP_QUEUE_OOSEQ 1 -#define CONFIG_FATFS_ALLOC_PREFER_EXTRAM 1 -#define CONFIG_GATTS_ENABLE 1 #define CONFIG_ADC_CAL_EFUSE_VREF_ENABLE 1 #define CONFIG_MBEDTLS_TLS_SERVER 1 #define CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT 1 -#define CONFIG_SPIRAM_BOOT_INIT 1 #define CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED 1 #define CONFIG_FREERTOS_ISR_STACKSIZE 1536 #define CONFIG_SUPPORT_TERMIOS 1 +#define CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS 1 #define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1 #define CONFIG_IDF_TARGET "esp32" -#define CONFIG_SPIRAM_MEMTEST 1 +#define CONFIG_NIMBLE_ENABLED 1 #define CONFIG_WL_SECTOR_SIZE_4096 1 #define CONFIG_OPTIMIZATION_LEVEL_DEBUG 1 -#define CONFIG_GATT_INITIAL_TRACE_LEVEL 2 #define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF #define CONFIG_AWS_IOT_MQTT_HOST "" -#define CONFIG_L2CAP_TRACE_LEVEL_WARNING 1 +#define CONFIG_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT 1 #define CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED 1 #define CONFIG_HTTPD_ERR_RESP_NO_DELAY 1 #define CONFIG_MB_TIMER_INDEX 0 #define CONFIG_SCAN_DUPLICATE_TYPE 0 +#define CONFIG_NIMBLE_HS_FLOW_CTRL_THRESH 2 #define CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED 1 -#define CONFIG_APPL_INITIAL_TRACE_LEVEL 2 #define CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED 1 #define CONFIG_SPI_FLASH_ERASE_YIELD_TICKS 1 -#define CONFIG_SMP_INITIAL_TRACE_LEVEL 2 #define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA 1 #define CONFIG_SPI_SLAVE_ISR_IN_IRAM 1 -#define CONFIG_L2CAP_INITIAL_TRACE_LEVEL 2 #define CONFIG_SYSTEM_EVENT_QUEUE_SIZE 32 -#define CONFIG_BT_ACL_CONNECTIONS 4 +#define CONFIG_NIMBLE_NVS_PERSIST 1 #define CONFIG_FATFS_MAX_LFN 255 #define CONFIG_ESP32_WIFI_TX_BUFFER_TYPE 1 #define CONFIG_BOOTLOADER_WDT_ENABLE 1 -#define CONFIG_GAP_INITIAL_TRACE_LEVEL 2 #define CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED 1 #define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8 +#define CONFIG_NIMBLE_RPA_TIMEOUT 900 #define CONFIG_MB_TIMER_GROUP 0 #define CONFIG_SPI_FLASH_ROM_DRIVER_PATCH 1 +#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 #define CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE 1 #define CONFIG_SPIFFS_PAGE_SIZE 256 #define CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED 1 #define CONFIG_ESP32_DPORT_WORKAROUND 1 +#define CONFIG_NIMBLE_ACL_BUF_SIZE 255 #define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT 3072 #define CONFIG_LWIP_SO_RCVBUF 1 #define CONFIG_MB_TIMER_PORT_ENABLED 1 @@ -377,9 +349,8 @@ #define CONFIG_ESPTOOLPY_PORT "/dev/ttyUSB0" #define CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS 1 #define CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF 0 +#define CONFIG_LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 #define CONFIG_UNITY_ENABLE_DOUBLE 1 #define CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD 20 -#define CONFIG_BLUEDROID_PINNED_TO_CORE 0 #define CONFIG_ESP32_WIFI_IRAM_OPT 1 -#define CONFIG_BLUFI_INITIAL_TRACE_LEVEL 2 #define CONFIG_FATFS_API_ENCODING_ANSI_OEM 1 diff --git a/targets/TI-SimpleLink/CMakeLists.txt b/targets/TI-SimpleLink/CMakeLists.txt index f72e9b79e9..1e11d061d4 100644 --- a/targets/TI-SimpleLink/CMakeLists.txt +++ b/targets/TI-SimpleLink/CMakeLists.txt @@ -29,6 +29,7 @@ if("${TARGET_SERIES}" STREQUAL "CC32xx") endif() endif() + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS set(TI_SL_CC32xx_SDK_TAG "4.10.00.07") if(NO_TI_SL_CC32xx_SDK_SOURCE) @@ -78,7 +79,8 @@ if("${TARGET_SERIES}" STREQUAL "CC32xx") # check if build was requested with a specifc TI XDCTools version if(TI_XDCTOOLS_VERSION_EMPTY) # no TI XDCTools version actualy specified, must be empty which is fine, we'll default to a known good version - set(TI_XDCTOOLS_VERSION_TAG "3.61.00.16") + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS + set(TI_XDCTOOLS_VERSION_TAG "3.62.00.08") else() # set SVN tag set(TI_XDCTOOLS_VERSION_TAG "${TI_XDCTOOLS_VERSION}") @@ -136,7 +138,8 @@ elseif( "${TARGET_SERIES}" STREQUAL "CC13x2_26x2" ) endif() endif() - set(TI_SL_CC13x2_26x2_SDK_TAG "4.40.04.04" CACHE INTERNAL "TI CC13x2_26x2 SDK tag") + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS + set(TI_SL_CC13x2_26x2_SDK_TAG "5.10.00.48" CACHE INTERNAL "TI CC13x2_26x2 SDK tag") if(NO_TI_SL_CC13x2_26x2_SDK_SOURCE) # no TI SimpleLink CC13x2_26x2 SDK source specified, download it from our repo @@ -186,7 +189,8 @@ elseif( "${TARGET_SERIES}" STREQUAL "CC13x2_26x2" ) # check if build was requested with a specifc TI SysConfig version if(TI_SYSCONFIG_VERSION_EMPTY) # no TI SysConfig version actualy specified, must be empty which is fine, we'll default to a known good version - set(TI_SYSCONFIG_VERSION_TAG "1.7.0") + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS + set(TI_SYSCONFIG_VERSION_TAG "1.8.1") else() # set Git tag set(TI_SYSCONFIG_VERSION_TAG "${TI_SYSCONFIG_VERSION}") @@ -239,7 +243,8 @@ elseif( "${TARGET_SERIES}" STREQUAL "CC13x2_26x2" ) # check if build was requested with a specifc TI XDCTools version if(TI_XDCTOOLS_VERSION_EMPTY) # no TI XDCTools version actualy specified, must be empty which is fine, we'll default to a known good version - set(TI_XDCTOOLS_VERSION_TAG "3.61.01.25") + # WHEN CHANGING THIS MAKE SURE TO UPDATE THE DEV CONTAINERS + set(TI_XDCTOOLS_VERSION_TAG "3.62.00.08") else() # set tag set(TI_XDCTOOLS_VERSION_TAG "${TI_XDCTOOLS_VERSION}") @@ -265,8 +270,8 @@ elseif( "${TARGET_SERIES}" STREQUAL "CC13x2_26x2" ) FetchContent_Declare( ti_xdctools - GIT_REPOSITORY ${TI_XDCTOOLS_SOURCE} - GIT_TAG ${TI_XDCTOOLS_VERSION_TAG} + SOURCE_DIR ${TI_XDCTOOLS_SOURCE} + # GIT_TAG ${TI_XDCTOOLS_VERSION_TAG} ) else() diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/CC1352R1_LAUNCHXL_fxns.c b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/CC1352R1_LAUNCHXL_fxns.c index 41b90a4244..5805042e79 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/CC1352R1_LAUNCHXL_fxns.c +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/CC1352R1_LAUNCHXL_fxns.c @@ -40,6 +40,7 @@ #include #include +#include #include #include diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_868.syscfg b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_868.syscfg index e8cded8fad..9d00f657f1 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_868.syscfg +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_868.syscfg @@ -1,8 +1,8 @@ /** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. - * @cliArgs --board "/ti/boards/CC1352R1_LAUNCHXL" --product "simplelink_cc13x2_26x2_sdk@4.20.01.04" - * @versions {"data":"2020090214","timestamp":"2020090214","tool":"1.6.0+1543","templates":"2020090214"} + * @cliArgs --board "/ti/boards/CC1352R1_LAUNCHXL" --product "simplelink_cc13x2_26x2_sdk@5.10.00.48" + * @versions {"data":"2021040816","timestamp":"2021040816","tool":"1.8.1+1900","templates":null} */ /** @@ -29,16 +29,14 @@ ADC1.adcPinInstance.$name = "CONFIG_PIN_0"; UART21.$hardware = system.deviceData.board.components.XDS110UART; UART21.$name = "UART0"; -UART21.txPinInstance.$name = "CONFIG_PIN_2"; -UART21.rxPinInstance.$name = "CONFIG_PIN_3"; -UART21.uart.$assign = "UART0"; +UART21.txPinInstance.$name = "CONFIG_PIN_1"; +UART21.rxPinInstance.$name = "CONFIG_PIN_2"; easylink.EasyLink_Phy_5kbpsSlLr = true; -easylink.defaultPhy = "EasyLink_Phy_5kbpsSlLr"; easylink.EasyLink_Phy_50kbps2gfsk = true; easylink.EasyLink_Phy_200kbps2gfsk = true; easylink.EasyLink_Phy_Custom = false; -easylink.addrFilters = ""; +easylink.defaultPhy = "EasyLink_Phy_5kbpsSlLr"; easylink.enableAddrFilter = false; easylink.radioConfigEasylinkPhy5kbpssllr.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param1"; easylink.radioConfigEasylinkPhy50kbps2gfsk.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; @@ -51,5 +49,6 @@ easylink.radioConfigEasylinkPhy200kbps2gfsk.codeExportConfig.$name = "ti_devices */ ADC1.adc.$suggestSolution = "ADC0"; ADC1.adc.adcPin.$suggestSolution = "boosterpack.2"; +UART21.uart.$suggestSolution = "UART0"; UART21.uart.txPin.$suggestSolution = "boosterpack.4"; UART21.uart.rxPin.$suggestSolution = "boosterpack.3"; diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_915.syscfg b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_915.syscfg index 311fcec25a..54176bef05 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_915.syscfg +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/TI_CC1352R1_LAUNCHXL_915.syscfg @@ -1,8 +1,8 @@ /** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. - * @cliArgs --board "/ti/boards/CC1352R1_LAUNCHXL" --product "simplelink_cc13x2_26x2_sdk@4.20.01.04" - * @versions {"data":"2020090214","timestamp":"2020090214","tool":"1.6.0+1543","templates":"2020090214"} + * @cliArgs --board "/ti/boards/CC1352R1_LAUNCHXL" --product "simplelink_cc13x2_26x2_sdk@5.10.00.48" + * @versions {"data":"2021040816","timestamp":"2021040816","tool":"1.8.1+1900","templates":null} */ /** @@ -23,29 +23,22 @@ const easylink = scripting.addModule("/ti/easylink/easylink"); CCFG.forceVddr = true; CCFG.ccfgTemplate.$name = "ti_devices_CCFGTemplate0"; -ADC1.$name = "ADC_0"; -ADC1.samplingDuration = "170 us"; -ADC1.adcPinInstance.$name = "CONFIG_PIN_0"; +ADC1.$name = "CONFIG_ADC_0"; +ADC1.adcPinInstance.$name = "CONFIG_PIN_2"; UART21.$hardware = system.deviceData.board.components.XDS110UART; UART21.$name = "UART0"; -UART21.txPinInstance.$name = "CONFIG_PIN_2"; -UART21.rxPinInstance.$name = "CONFIG_PIN_3"; -UART21.uart.$assign = "UART0"; +UART21.txPinInstance.$name = "CONFIG_PIN_0"; +UART21.rxPinInstance.$name = "CONFIG_PIN_1"; easylink.EasyLink_Phy_5kbpsSlLr = true; -easylink.defaultPhy = "EasyLink_Phy_5kbpsSlLr"; -easylink.EasyLink_Phy_50kbps2gfsk = true; easylink.EasyLink_Phy_200kbps2gfsk = true; easylink.EasyLink_Phy_Custom = false; -easylink.addrFilters = ""; easylink.enableAddrFilter = false; -easylink.radioConfigEasylinkPhy5kbpssllr.carrierFrequency = 915.0000; +easylink.EasyLink_Phy_50kbps2gfsk = true; easylink.radioConfigEasylinkPhy5kbpssllr.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param1"; -easylink.radioConfigEasylinkPhy50kbps2gfsk.carrierFrequency = 915.0000; -easylink.radioConfigEasylinkPhy50kbps2gfsk.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; -easylink.radioConfigEasylinkPhy200kbps2gfsk.carrierFrequency = 915.0000; -easylink.radioConfigEasylinkPhy200kbps2gfsk.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param3"; +easylink.radioConfigEasylinkPhy200kbps2gfsk.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2"; +easylink.radioConfigEasylinkPhy50kbps2gfsk.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0"; /** * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future @@ -54,5 +47,6 @@ easylink.radioConfigEasylinkPhy200kbps2gfsk.codeExportConfig.$name = "ti_devices */ ADC1.adc.$suggestSolution = "ADC0"; ADC1.adc.adcPin.$suggestSolution = "boosterpack.2"; +UART21.uart.$suggestSolution = "UART0"; UART21.uart.txPin.$suggestSolution = "boosterpack.4"; UART21.uart.rxPin.$suggestSolution = "boosterpack.3"; diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/cmake-variants.json b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/cmake-variants.json index 528b23b7b2..12b0d350d1 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/cmake-variants.json +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/cmake-variants.json @@ -46,11 +46,13 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "OFF", + "API_System.Device.Spi": "OFF", "API_Windows.Devices.I2c": "OFF", "API_System.Device.I2c": "OFF", "API_Windows.Devices.Pwm": "OFF", "API_Windows.Devices.Adc": "ON", "API_Windows.Devices.SerialCommunication": "OFF", + "API_System.IO.Ports": "OFF", "API_nanoFramework.ResourceManager": "OFF", "API_nanoFramework.System.Collections": "OFF", "API_nanoFramework.System.Text": "OFF", diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage-DEBUG.c b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage-DEBUG.c index 87e1de67d3..e3949c44f8 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage-DEBUG.c +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage-DEBUG.c @@ -10,8 +10,8 @@ const BlockRange BlockRange1[] = { // the last block is reserved for Customer Configuration Area and Bootloader Backdoor configuration // so we don't take it into account for the map - {BlockRange_BLOCKTYPE_CODE, 0, 30}, // 0x00000000 nanoCLR - {BlockRange_BLOCKTYPE_DEPLOYMENT, 31, 42}, // 0x0003E000 deployment + {BlockRange_BLOCKTYPE_CODE, 0, 31}, // 0x00000000 nanoCLR + {BlockRange_BLOCKTYPE_DEPLOYMENT, 32, 42}, // 0x00041000 deployment }; const BlockRegionInfo BlockRegions[] = {{ diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage.c b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage.c index c751df2be4..a5970491c9 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage.c +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/common/Device_BlockStorage.c @@ -10,8 +10,8 @@ const BlockRange BlockRange1[] = { // the last block is reserved for Customer Configuration Area and Bootloader Backdoor configuration // so we don't take it into account for the map - {BlockRange_BLOCKTYPE_CODE, 0, 21}, // 0x00000000 nanoCLR - {BlockRange_BLOCKTYPE_DEPLOYMENT, 22, 42}, // 0x0002C000 deployment + {BlockRange_BLOCKTYPE_CODE, 0, 22}, // 0x00000000 nanoCLR + {BlockRange_BLOCKTYPE_DEPLOYMENT, 23, 42}, // 0x0002E000 deployment }; const BlockRegionInfo BlockRegions[] = {{ diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR-DEBUG.ld b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR-DEBUG.ld index c85b9538c1..dca2e4ba0b 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR-DEBUG.ld +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR-DEBUG.ld @@ -40,7 +40,7 @@ HEAPSIZE = 0x3000; /* Size of heap buffer used by HeapMem */ MEMORY { /* original flash LENGTH was 0x00057fa8 */ - FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x0003E000 + FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x00041000 /* * Customer Configuration Area and Bootloader Backdoor configuration in * flash, 40 bytes @@ -48,6 +48,7 @@ MEMORY FLASH_CCFG (RX) : ORIGIN = 0x00057fa8, LENGTH = 0x00000058 SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00014000 GPRAM (RWX) : ORIGIN = 0x11000000, LENGTH = 0x00002000 + LOG_DATA (R) : ORIGIN = 0x90000000, LENGTH = 0x40000 } REGION_ALIAS("REGION_TEXT", FLASH); @@ -55,6 +56,7 @@ REGION_ALIAS("REGION_BSS", SRAM); REGION_ALIAS("REGION_DATA", SRAM); REGION_ALIAS("REGION_STACK", SRAM); REGION_ALIAS("REGION_HEAP", SRAM); +REGION_ALIAS("REGION_LOG", LOG_DATA); REGION_ALIAS("REGION_ARM_EXIDX", FLASH); REGION_ALIAS("REGION_ARM_EXTAB", FLASH); @@ -282,4 +284,8 @@ SECTIONS { KEEP(*(.stack)) . += STACKSIZE; } > REGION_STACK AT> REGION_STACK + + .log_data (COPY) : { + KEEP (*(.log_data)) + } > REGION_LOG } diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR.ld b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR.ld index aa8ee8f09c..200dc6725e 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR.ld +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/CC13x2_26x2_CLR.ld @@ -40,7 +40,7 @@ HEAPSIZE = 0x2500; /* Size of heap buffer used by HeapMem */ MEMORY { /* original flash LENGTH was 0x00057fa8 */ - FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x0002C000 + FLASH (RX) : ORIGIN = 0x00000000, LENGTH = 0x0002E000 /* * Customer Configuration Area and Bootloader Backdoor configuration in * flash, 40 bytes @@ -48,6 +48,7 @@ MEMORY FLASH_CCFG (RX) : ORIGIN = 0x00057fa8, LENGTH = 0x00000058 SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00014000 GPRAM (RWX) : ORIGIN = 0x11000000, LENGTH = 0x00002000 + LOG_DATA (R) : ORIGIN = 0x90000000, LENGTH = 0x40000 } REGION_ALIAS("REGION_TEXT", FLASH); @@ -55,6 +56,7 @@ REGION_ALIAS("REGION_BSS", SRAM); REGION_ALIAS("REGION_DATA", SRAM); REGION_ALIAS("REGION_STACK", SRAM); REGION_ALIAS("REGION_HEAP", SRAM); +REGION_ALIAS("REGION_LOG", LOG_DATA); REGION_ALIAS("REGION_ARM_EXIDX", FLASH); REGION_ALIAS("REGION_ARM_EXTAB", FLASH); @@ -282,4 +284,8 @@ SECTIONS { KEEP(*(.stack)) . += STACKSIZE; } > REGION_STACK AT> REGION_STACK + + .log_data (COPY) : { + KEEP (*(.log_data)) + } > REGION_LOG } diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/main.c b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/main.c index fc246dfa9e..fafaa8211f 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/main.c +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/nanoCLR/main.c @@ -12,9 +12,6 @@ #include #include -// board Header files -#include - #include // clang-format off #include DeviceFamily_constructPath(inc/hw_prcm.h) @@ -60,6 +57,10 @@ int main(void) // Call board init functions Board_init(); + GPIO_init(); + ADC_init(); + ConfigUART(); + // setup Task thread Task_Params_init(&taskParams); taskParams.stackSize = THREADSTACKSIZE; @@ -91,10 +92,6 @@ int main(void) ; } - GPIO_init(); - ADC_init(); - ConfigUART(); - BIOS_start(); return (0); diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_common.h.in b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_common.h.in index f65eca0cb5..ba7f925485 100644 --- a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_common.h.in +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_common.h.in @@ -50,7 +50,7 @@ ///////////////////////////////////// #if defined(DEBUG) - #define MANAGED_HEAP_SIZE (29*1024) + #define MANAGED_HEAP_SIZE (28*1024) #else #define MANAGED_HEAP_SIZE (37*1024) #endif diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_system_io_serial_config.cpp b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_system_io_serial_config.cpp new file mode 100644 index 0000000000..f0707ec696 --- /dev/null +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_system_io_serial_config.cpp @@ -0,0 +1,17 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#include "target_system_io_serial_config.h" +#include + +/////////// +// UART1 // +/////////// + +// buffers +#if defined(__GNUC__) +__attribute__((aligned(32))) +#endif +uint8_t Uart1_TxBuffer[UART1_TX_SIZE]; diff --git a/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_system_io_serial_config.h b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_system_io_serial_config.h new file mode 100644 index 0000000000..26eb12188b --- /dev/null +++ b/targets/TI-SimpleLink/TI_CC1352R1_LAUNCHXL/target_system_io_serial_config.h @@ -0,0 +1,14 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +/////////// +// UART1 // +/////////// + +// enable UART1 +#define NF_SERIAL_COMM_TI_USE_UART1 TRUE + +// buffers size +#define UART1_TX_SIZE 256 diff --git a/targets/TI-SimpleLink/TI_CC3220SF_LAUNCHXL/cmake-variants.json b/targets/TI-SimpleLink/TI_CC3220SF_LAUNCHXL/cmake-variants.json index ddb58cccd4..c8d03b185b 100644 --- a/targets/TI-SimpleLink/TI_CC3220SF_LAUNCHXL/cmake-variants.json +++ b/targets/TI-SimpleLink/TI_CC3220SF_LAUNCHXL/cmake-variants.json @@ -44,10 +44,12 @@ "API_Windows.Devices.Gpio": "ON", "API_System.Device.Gpio": "ON", "API_Windows.Devices.Spi": "ON", + "API_System.Device.Spi": "ON", "API_Windows.Devices.I2c": "ON", "API_System.Device.I2c": "ON", "API_Windows.Devices.Pwm": "ON", "API_Windows.Devices.SerialCommunication": "OFF", + "API_System.IO.Ports": "OFF", "API_System.Net": "ON", "API_nanoFramework.ResourceManager": "OFF", "API_nanoFramework.System.Collections": "ON", diff --git a/targets/TI-SimpleLink/_Include/targetHAL.h b/targets/TI-SimpleLink/_Include/targetHAL.h index 2768d614bb..e67e81a220 100644 --- a/targets/TI-SimpleLink/_Include/targetHAL.h +++ b/targets/TI-SimpleLink/_Include/targetHAL.h @@ -71,6 +71,11 @@ #define NANOCLR_STOP() HARD_BREAKPOINT() +__attribute__((always_inline)) static inline void __NOP(void) +{ + __asm(" nop"); +} + ///////////////////////////////////////////////////////////////////////////////////////////////////// // DEBUGGER HELPER // // The line below is meant to be used as helper on checking that the execution engine is running. // diff --git a/targets/TI-SimpleLink/_common/GenericPort.cpp b/targets/TI-SimpleLink/_common/GenericPort.cpp index a937d7e221..a2ec5a9810 100644 --- a/targets/TI-SimpleLink/_common/GenericPort.cpp +++ b/targets/TI-SimpleLink/_common/GenericPort.cpp @@ -39,20 +39,3 @@ extern "C" uint32_t DebuggerPort_WriteProxy(const char *format, ...) return chars; } - -uint32_t GenericPort_Write(int portNum, const char *data, size_t size) -{ - (void)portNum; - size_t bytesWritten; - - if (CLR_EE_DBG_IS_NOT(Enabled)) - { - // debugger port is NOT in use, OK to output to UART - // send characters directly to the UART port - UART2_writeTimeout(uart, data, size, &bytesWritten, UART_TIMEOUT_MILLISECONDS / Clock_tickPeriod); - - return bytesWritten; - } - - return (uint32_t)size; -} diff --git a/targets/TI-SimpleLink/_common/WireProtocol_HAL_Interface.c b/targets/TI-SimpleLink/_common/WireProtocol_HAL_Interface.c index 47eafd749a..9ee2ba9dc9 100644 --- a/targets/TI-SimpleLink/_common/WireProtocol_HAL_Interface.c +++ b/targets/TI-SimpleLink/_common/WireProtocol_HAL_Interface.c @@ -17,62 +17,36 @@ UART2_Handle uart = NULL; -WP_Message inboundMessage; - -//////////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////////////////////// -// The functions below are the ones that need to be ported to new channels/HALs when required -// These are to be considered as a reference implementations when working on new ports -// -// This reference implementation provides communication through: -// - serial port (UART/USART) -// -//////////////////////////////////////////////////////////////////////////////////////////////// - -int WP_ReceiveBytes(uint8_t *ptr, uint16_t *size) +uint8_t WP_ReceiveBytes(uint8_t *ptr, uint32_t *size) { - // save for latter comparison - uint16_t requestedSize = *size; + // save for later comparison + uint32_t requestedSize = *size; size_t read; - // int readData = 0; - // sanity check for request of 0 size + // check for request with 0 size if (*size) { - ////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - ////////////////////////////////////////////////////////// - // change here to read (size) bytes from the input stream - // preferably with read timeout and being able to check - // if the requested number of bytes was actually read - ////////////////////////////////////////////////////////// - // non blocking read from serial port with 500ms timeout UART2_readTimeout(uart, ptr, requestedSize, &read, UART_TIMEOUT_MILLISECONDS / Clock_tickPeriod); + // check if any bytes where read + if (read == 0) + { + return false; + } + ptr += read; *size -= read; - - // check if the requested read matches the actual read count - return (requestedSize == read); } return true; } -int WP_TransmitMessage(WP_Message *message) +uint8_t WP_TransmitMessage(WP_Message *message) { uint32_t writeResult; bool operationResult = false; - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // change here to write (size) bytes to the output stream - // preferably with timeout and being able to check - // if the write was successfull or at least buffered - ////////////////////////////////////////////////////////// - TRACE( TRACE_HEADERS, "TXMSG: 0x%08X, 0x%08X, 0x%08X\n", @@ -95,12 +69,6 @@ int WP_TransmitMessage(WP_Message *message) // if there is anything on the payload send it to the output stream if (message->m_header.m_size && message->m_payload) { - /////////////////////////////////////////////////////////// - // PORTING CHANGE REQUIRED HERE // - /////////////////////////////////////////////////////////// - // see description above - ////////////////////////////////////////////////////////// - // reset flag operationResult = false; diff --git a/targets/TI-SimpleLink/_common/WireProtocol_ReceiverThread.c b/targets/TI-SimpleLink/_common/WireProtocol_ReceiverThread.c index 589047c35e..1d809a634e 100644 --- a/targets/TI-SimpleLink/_common/WireProtocol_ReceiverThread.c +++ b/targets/TI-SimpleLink/_common/WireProtocol_ReceiverThread.c @@ -7,26 +7,27 @@ #include #include -extern WP_Message inboundMessage; - -void WP_Message_Initialize(WP_Message *a); -void WP_Message_PrepareReception(WP_Message *a); -void WP_Message_Process(WP_Message *a); +void WP_Message_PrepareReception(); +void WP_Message_Process(); void ReceiverThread(UArg arg0, UArg arg1) { (void)arg0; (void)arg1; + WP_Message_PrepareReception(); + // loop forever while (1) { - WP_Message_Initialize(&inboundMessage); - WP_Message_PrepareReception(&inboundMessage); - - WP_Message_Process(&inboundMessage); + WP_Message_Process(); // Allow other tasks a chance to run Task_yield(); } } + +void WP_Message_PrepareReception_Platform() +{ + // empty on purpose, nothing to configure +} diff --git a/targets/TI-SimpleLink/_common/easylink/EasyLink.c b/targets/TI-SimpleLink/_common/easylink/EasyLink.c index 9696162d09..e6d697f21e 100644 --- a/targets/TI-SimpleLink/_common/easylink/EasyLink.c +++ b/targets/TI-SimpleLink/_common/easylink/EasyLink.c @@ -37,6 +37,9 @@ #include "EasyLink.h" #include "ti_easylink_config.h" #include +#include +#include +#include #include #ifndef USE_DMM @@ -70,7 +73,8 @@ union setupCmd_t{ #if ((defined LAUNCHXL_CC1352P1) || (defined LAUNCHXL_CC1352P_2) || \ - (defined LAUNCHXL_CC1352P_4)) + (defined LAUNCHXL_CC1352P_4)|| (defined LP_CC1352P7_1) || \ + (defined LP_CC1352P7_4)) rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t divSetup; #else rfc_CMD_PROP_RADIO_DIV_SETUP_t divSetup; @@ -456,6 +460,15 @@ static void ccaDoneCallback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e) asyncCmdHndl = RF_postCmd(h, (RF_Op*)&EasyLink_cmdPropCs, RF_PriorityHigh, ccaDoneCallback, EASYLINK_RF_EVENT_MASK); } + + if(EasyLink_CmdHandle_isValid(asyncCmdHndl) == false) + { + //Release now so user callback can call EasyLink API's + Semaphore_post(busyMutex); + + // Reset the number of retries + be = EASYLINK_MIN_CCA_BACKOFF_WINDOW; + } } } else @@ -542,12 +555,20 @@ static void rxDoneCallback(RF_Handle h, RF_CmdHandle ch, RF_EventMask e) } //copy address from packet payload (as it is not in hdr) memcpy(&rxPacket.dstAddr, (&pDataEntry->data + hdrSize), addrSize); - //copy payload - memcpy(&rxPacket.payload, (&pDataEntry->data + hdrSize + addrSize), rxPacket.len); - rxPacket.rssi = rxStatistics.lastRssi; - rxPacket.absTime = rxStatistics.timeStamp; + if(EASYLINK_MAX_DATA_LENGTH >= rxPacket.len) + { + //copy payload + memcpy(&rxPacket.payload, (&pDataEntry->data + hdrSize + addrSize), rxPacket.len); + rxPacket.rssi = rxStatistics.lastRssi; + rxPacket.absTime = rxStatistics.timeStamp; - status = EasyLink_Status_Success; + status = EasyLink_Status_Success; + } + else + { + // Packet payload too long + status = EasyLink_Status_Rx_Buffer_Error; + } } else if ( rxStatistics.nRxBufFull == 1) { @@ -850,7 +871,7 @@ EasyLink_Status EasyLink_init(EasyLink_Params *params) case EasyLink_Phy_625bpsLrm: if(!(ChipInfo_ChipFamilyIs_CC26x0()) && !(ChipInfo_ChipFamilyIs_CC26x0R2()) - && !(ChipInfo_ChipFamilyIs_CC13x2_CC26x2())) + && !(ChipInfo_ChipFamilyIs_CC13x2_CC26x2()) && !(ChipInfo_ChipFamilyIs_CC13x2x7_CC26x2x7())) { useDivRadioSetup= true; rfConfigOk = true; @@ -868,6 +889,11 @@ EasyLink_Status EasyLink_init(EasyLink_Params *params) useDivRadioSetup= true; rfConfigOk = true; } + else if((ChipInfo_ChipFamilyIs_CC13x2x7_CC26x2x7()) && (ChipInfo_GetChipType() != CHIP_TYPE_CC1312R7)) + { + useDivRadioSetup= true; + rfConfigOk = true; + } break; case EasyLink_Phy_2_4_200kbps2gfsk: @@ -889,6 +915,12 @@ EasyLink_Status EasyLink_init(EasyLink_Params *params) useDivRadioSetup= true; rfConfigOk = true; } + else if((ChipInfo_ChipFamilyIs_CC13x2x7_CC26x2x7()) && (ChipInfo_GetChipType() != CHIP_TYPE_CC1312R7)) + { + useDivRadioSetup= true; + rfConfigOk = true; + } + break; case EasyLink_Phy_5kbpsSlLr: @@ -896,7 +928,7 @@ EasyLink_Status EasyLink_init(EasyLink_Params *params) { useDivRadioSetup= true; rfConfigOk = true; -#if (defined LAUNCHXL_CC1352P_4) +#if (defined LAUNCHXL_CC1352P_4) || (defined LP_CC1352P7_4) // CC1352P-4 SLR operates at 433.92 MHz EasyLink_cmdFs.frequency = 0x01B1; EasyLink_cmdFs.fractFreq = 0xEB9A; @@ -906,9 +938,9 @@ EasyLink_Status EasyLink_init(EasyLink_Params *params) case EasyLink_Phy_200kbps2gfsk: if((ChipInfo_GetChipType() == CHIP_TYPE_CC1312) || (ChipInfo_GetChipType() == CHIP_TYPE_CC1352) || - (ChipInfo_GetChipType() == CHIP_TYPE_CC1352P)) + (ChipInfo_GetChipType() == CHIP_TYPE_CC1352P) || (ChipInfo_GetChipType() == CHIP_TYPE_CC1312R7)) { -#if !defined(LAUNCHXL_CC1352P_4) +#if !defined(LAUNCHXL_CC1352P_4) && !defined(LP_CC1352P7_4) // This mode is not supported in the 433 MHz band useDivRadioSetup= true; rfConfigOk = true; @@ -969,7 +1001,8 @@ EasyLink_Status EasyLink_init(EasyLink_Params *params) if(useDivRadioSetup) { #if ((defined LAUNCHXL_CC1352P1) || (defined LAUNCHXL_CC1352P_2) || \ - (defined LAUNCHXL_CC1352P_4)) + (defined LAUNCHXL_CC1352P_4)|| (defined LP_CC1352P7_1) || \ + (defined LP_CC1352P7_4)) memcpy(&EasyLink_cmdPropRadioSetup.divSetup, (rfSetting->RF_uCmdPropRadio.RF_pCmdPropRadioDivSetup), sizeof(rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t)); #else memcpy(&EasyLink_cmdPropRadioSetup.divSetup, (rfSetting->RF_uCmdPropRadio.RF_pCmdPropRadioDivSetup), sizeof(rfc_CMD_PROP_RADIO_DIV_SETUP_t)); @@ -1240,10 +1273,16 @@ EasyLink_Status EasyLink_setRfPower(int8_t i8TxPowerDbm) } #if (defined CONFIG_CC1352R1F3RGZ) || (defined CONFIG_CC1312R1F3RGZ) || \ - (defined CONFIG_CC2652R1FRGZ) || (defined CONFIG_CC1312R1_LAUNCHXL) || \ - (defined CONFIG_CC1352R1_LAUNCHXL) || (defined CONFIG_CC26X2R1_LAUNCHXL) || \ - (defined LAUNCHXL_CC1352P1) || (defined LAUNCHXL_CC1352P_2) || \ - (defined LAUNCHXL_CC1352P_4) + (defined CONFIG_CC2652R1FRGZ) || (defined CONFIG_CC2652R1FSIP) || \ + (defined CONFIG_CC2652P1FSIP) || (defined CONFIG_CC2652R7RGZ) || \ + (defined CONFIG_CC1312R7RGZ) || (defined CONFIG_CC1352P7RGZ) || \ + (defined CONFIG_CC1312R1_LAUNCHXL) || (defined CONFIG_CC1352R1_LAUNCHXL) || \ + (defined LAUNCHXL_CC1352P1) || (defined CONFIG_CC26X2R1_LAUNCHXL) || \ + (defined LAUNCHXL_CC1352P_4) || (defined LAUNCHXL_CC1352P_2) || \ + (defined CONFIG_LP_CC2652PSIP) || (defined CONFIG_LP_CC2652RSIP) || \ + (defined CONFIG_LP_CC1312R7) || (defined LP_CC1352P7_4) || \ + (defined LP_CC1352P7_1) || (defined CONFIG_LP_CC2652R7) + RF_TxPowerTable_Entry *rfPowerTable = NULL; RF_TxPowerTable_Value newValue; @@ -1265,10 +1304,12 @@ EasyLink_Status EasyLink_setRfPower(int8_t i8TxPowerDbm) } //if max power is requested then the CCFG_FORCE_VDDR_HH must be set in - //the ccfg; this does not apply to 2.4GHz proprietary modes either + //the ccfg; this does not apply to 2.4GHz proprietary modes #if (CCFG_FORCE_VDDR_HH != 0x1) if((newValue.paType == RF_TxPowerTable_DefaultPA) && - (i8TxPowerDbm == rfPowerTable[rfPowerTableSize-2].power)) + (i8TxPowerDbm == rfPowerTable[rfPowerTableSize-2].power) && + (EasyLink_params.ui32ModType != EasyLink_Phy_2_4_100kbps2gfsk) && + (EasyLink_params.ui32ModType != EasyLink_Phy_2_4_250kbps2gfsk)) { //Release the busyMutex Semaphore_post(busyMutex); @@ -1365,10 +1406,17 @@ EasyLink_Status EasyLink_getRfPower(int8_t *pi8TxPowerDbm) } #if (defined CONFIG_CC1352R1F3RGZ) || (defined CONFIG_CC1312R1F3RGZ) || \ - (defined CONFIG_CC2652R1FRGZ) || (defined CONFIG_CC1312R1_LAUNCHXL) || \ - (defined CONFIG_CC1352R1_LAUNCHXL) || (defined CONFIG_CC26X2R1_LAUNCHXL) || \ - (defined LAUNCHXL_CC1352P1) || (defined LAUNCHXL_CC1352P_2) || \ - (defined LAUNCHXL_CC1352P_4) + (defined CONFIG_CC2652R1FRGZ) || (defined CONFIG_CC2652R1FSIP) || \ + (defined CONFIG_CC2652P1FSIP) || (defined CONFIG_CC1312R7RGZ) || \ + (defined CONFIG_CC1352P7RGZ) || (defined CONFIG_CC2652R7RGZ) || \ + (defined CONFIG_CC1312R1_LAUNCHXL) || (defined CONFIG_CC1352R1_LAUNCHXL) || \ + (defined LAUNCHXL_CC1352P1) || (defined CONFIG_CC26X2R1_LAUNCHXL) || \ + (defined LAUNCHXL_CC1352P_4) || (defined LAUNCHXL_CC1352P_2) || \ + (defined CONFIG_LP_CC2652PSIP) || (defined CONFIG_LP_CC2652RSIP) || \ + (defined CONFIG_LP_CC1312R7) || (defined LP_CC1352P7_4) || \ + (defined LP_CC1352P7_1) || (defined CONFIG_LP_CC2652R7) + + uint8_t rfPowerTableSize = 0; RF_TxPowerTable_Entry *rfPowerTable = NULL; @@ -1386,10 +1434,12 @@ EasyLink_Status EasyLink_getRfPower(int8_t *pi8TxPowerDbm) txPowerDbm = RF_TxPowerTable_findPowerLevel(rfPowerTable, currValue); //if CCFG_FORCE_VDDR_HH is not set max power cannot be achieved; this - //does not apply to 2.4GHz proprietary modes either + //does not apply to 2.4GHz proprietary modes #if (CCFG_FORCE_VDDR_HH != 0x1) if((currValue.paType == RF_TxPowerTable_DefaultPA) && - (txPowerDbm == rfPowerTable[rfPowerTableSize-2].power)) + (txPowerDbm == rfPowerTable[rfPowerTableSize-2].power) && + (EasyLink_params.ui32ModType != EasyLink_Phy_2_4_100kbps2gfsk) && + (EasyLink_params.ui32ModType != EasyLink_Phy_2_4_250kbps2gfsk)) { txPowerDbm = rfPowerTable[rfPowerTableSize-3].power; } @@ -1666,6 +1716,11 @@ EasyLink_Status EasyLink_transmitAsync(EasyLink_TxPacket *txPacket, EasyLink_TxD { status = EasyLink_Status_Success; } + else + { + // Error occurred. Callback will not be called, release busyMutex. + Semaphore_post(busyMutex); + } //busyMutex will be released by the callback @@ -1783,6 +1838,11 @@ EasyLink_Status EasyLink_transmitCcaAsync(EasyLink_TxPacket *txPacket, EasyLink_ { status = EasyLink_Status_Success; } + else + { + // Error occurred. Callback will not be called, release busyMutex. + Semaphore_post(busyMutex); + } //busyMutex will be released by the callback diff --git a/targets/TI-SimpleLink/_common/easylink/EasyLink.h b/targets/TI-SimpleLink/_common/easylink/EasyLink.h index 5bb5681ae4..c537523a2a 100644 --- a/targets/TI-SimpleLink/_common/easylink/EasyLink.h +++ b/targets/TI-SimpleLink/_common/easylink/EasyLink.h @@ -155,13 +155,16 @@ extern "C" #endif #include +#include +#include #include +#include #include "ti_easylink_config.h" #include "ti_drivers_config.h" #include "ti_radio_config.h" //! \brief EasyLink API Version -#define EASYLINK_API_VERSION "EasyLink-v3.10.01" +#define EASYLINK_API_VERSION "EasyLink-v4.10.00" //! \brief defines the Tx/Rx Max Address Size #define EASYLINK_MAX_ADDR_SIZE 8 @@ -294,7 +297,8 @@ typedef struct union{ #if ((defined LAUNCHXL_CC1352P1) || (defined LAUNCHXL_CC1352P_2) || \ - (defined LAUNCHXL_CC1352P_4)) + (defined LAUNCHXL_CC1352P_4)|| (defined LP_CC1352P7_1) || \ + (defined LP_CC1352P7_4)) rfc_CMD_PROP_RADIO_DIV_SETUP_PA_t *RF_pCmdPropRadioDivSetup; #else rfc_CMD_PROP_RADIO_DIV_SETUP_t *RF_pCmdPropRadioDivSetup; diff --git a/targets/TI-SimpleLink/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialDevice.cpp b/targets/TI-SimpleLink/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialDevice.cpp new file mode 100644 index 0000000000..6f13c69609 --- /dev/null +++ b/targets/TI-SimpleLink/_nanoCLR/System.IO.Ports/sys_io_ser_native_System_IO_Ports_SerialDevice.cpp @@ -0,0 +1,757 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#include +#include "sys_io_ser_native_target.h" + +//////////////////////////////////////////////////////////// +// UART PAL strucs delcared in sys_io_ser_native_target.h // +//////////////////////////////////////////////////////////// +#if defined(NF_SERIAL_COMM_TI_USE_UART1) && (NF_SERIAL_COMM_TI_USE_UART1 == TRUE) +NF_PAL_UART Uart1_PAL; +#endif + +// in UWP the COM ports are named COM1, COM2, COM3. But TI SimpleLink uses internally UART0, UART1, UART2. This maps the +// port index 1, 2 or 3 to the UART number 0, 1, etc +#define PORT_INDEX_TO_UART_NUM(portIndex) ((portIndex)-1) + +// in UWP the COM ports are named COM1, COM2, COM3. But TI SimpleLink uses internally UART0, UART1, etc. This maps the +// UART number 0, 1 (..) to the port index 1, 2, etc +#define UART_NUM_TO_PORT_INDEX(uartNum) ((uartNum) + 1) + +NF_PAL_UART *GetPalUartFromUartNum(int uart_num) +{ + NF_PAL_UART *palUart = NULL; + + switch (uart_num) + { +#if defined(NF_SERIAL_COMM_TI_USE_UART1) && (NF_SERIAL_COMM_TI_USE_UART1 == TRUE) + case UART1: + // set UART PAL + palUart = &Uart1_PAL; + break; +#endif + + default: + break; + } + + return palUart; +} + +void UnitializePalUart(NF_PAL_UART *palUart) +{ + if (palUart && palUart->UartDriver) + { + UART2_close(palUart->UartDriver); + + // free buffers meory + platform_free(palUart->TxBuffer); + + // null all pointers + palUart->TxBuffer = NULL; + palUart->UartDriver = NULL; + palUart->WatchChar = 0; + } +} + +// estimate the time required to perform the TX transaction +bool IsLongRunningOperation(uint32_t bufferSize, uint32_t baudRate, uint32_t &estimatedDurationMiliseconds) +{ + // simplifying calculation assuming worst case values for stop bits + estimatedDurationMiliseconds = ((8 + 2) * bufferSize * 1000) / baudRate; + + if (estimatedDurationMiliseconds > CLR_RT_Thread::c_TimeQuantum_Milliseconds) + { + // total operation time will exceed thread quantum, so this is a long running operation + return true; + } + else + { + return false; + } +} + +// This callback is invoked when a transmission buffer has been completely read by the driver. +static void TxCallback(UART2_Handle handle, void *buf, size_t count, void *userArg, int_fast16_t status) +{ + //(void)uartp; + + NATIVE_INTERRUPT_START + + NF_PAL_UART *palUart = (NF_PAL_UART *)userArg; + + if (status == UART2_STATUS_SUCCESS) + { + // reset Tx ongoing count, if we are done here + if (count > 0) + { + if (palUart->TxOngoingCount > 0) + { + // pop elements from ring buffer, just pop + palUart->TxRingBuffer.Pop(count); + + palUart->TxOngoingCount -= count; + + // it TX complete? + if (palUart->TxOngoingCount == 0) + { + Events_Set(SYSTEM_EVENT_FLAG_COM_OUT); + } + } + } + } + + NATIVE_INTERRUPT_END +} + +// This callback is invoked when a character is received but the application was not ready to receive it, the character +// is passed as parameter. +static void RxCallback(UART2_Handle handle, void *buf, size_t count, void *userArg, int_fast16_t status) +{ + NATIVE_INTERRUPT_START + + size_t bufferIndex = 0; + uint8_t *bufferCursor = (uint8_t *)buf; + bool watchCharFound = false; + + NF_PAL_UART *palUart = (NF_PAL_UART *)userArg; + + if (status == UART2_STATUS_SUCCESS) + { + // store this into the UART Rx buffer + + // // push char to ring buffer + // // don't care about the success of the operation, if it's full we are droping the char anyway + // palUart->RxRingBuffer.Push((uint8_t *)buf, count); + + if (palUart->WatchChar != 0) + { + while (bufferIndex < count) + { + if (*bufferCursor == palUart->WatchChar) + { + watchCharFound = true; + + break; + } + } + } + + // is there a read operation going on? + if (palUart->RxBytesToRead > 0) + { + // yes + // check if the requested bytes are available in the buffer... + //... or if the watch char was received + // if (palUart->RxRingBuffer.Length() >= palUart->RxBytesToRead || watchCharFound) + { + // reset Rx bytes to read count + palUart->RxBytesToRead = 0; + + // fire event for Rx buffer complete + Events_Set(SYSTEM_EVENT_FLAG_COM_IN); + } + } + else + { + // no read operation ongoing, so fire an event + + // post a managed event with the port index and event code (check if this is the watch char or just another + // another) + PostManagedEvent( + EVENT_SERIAL, + 0, + UART_NUM_TO_PORT_INDEX(palUart->UartNum), + watchCharFound ? SerialData_WatchChar : SerialData_Chars); + } + } + + NATIVE_INTERRUPT_END +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::get_BytesToRead___I4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + uint8_t uartNum; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // Choose the driver for this SerialDevice + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // get length of Rx ring buffer + stack.SetResult_U4(UART2_getRxCount(palUart->UartDriver)); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeDispose___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + uint8_t uartNum; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Get Uart number for serial device + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + UnitializePalUart(GetPalUartFromUartNum(uartNum)); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeInit___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + NF_PAL_UART *palUart; + uint8_t uartNum; + uint16_t txBufferSize; + uint16_t rxBufferSize; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + // Get UART number from PortIndex + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + if (uartNum > CONFIG_TI_DRIVERS_UART2_COUNT || uartNum < 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // call the configure and abort if not OK + NANOCLR_CHECK_HRESULT(NativeConfig___VOID(stack)); + + // Choose the driver for this SerialDevice + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + +#if defined(NF_SERIAL_COMM_TI_USE_UART1) && (NF_SERIAL_COMM_TI_USE_UART1 == TRUE) + // alloc buffer memory + palUart->TxBuffer = (uint8_t *)Uart1_TxBuffer; + + // init buffer + palUart->TxRingBuffer.Initialize(palUart->TxBuffer, UART1_TX_SIZE); +#else +#error "UART1 NOT CONFIGURED. Check TI SYSCONFIG." +#endif + + // all the rest + palUart->UartNum = uartNum; + palUart->WatchChar = 0; + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeConfig___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart = NULL; + uint8_t uartNum; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // Choose the driver for this SerialDevice + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // setup configuration + + // Check RS485 mode is not selected as currently not supported + if ((SerialMode)pThis[FIELD___mode].NumericByRef().s4 != SerialMode_Normal) + { + NANOCLR_SET_AND_LEAVE(CLR_E_NOTIMPL); + } + + // Create a UART with data processing off + UART2_Params_init(&palUart->UartParams); + + // set R/W mode with callbacks + palUart->UartParams.writeMode = UART2_Mode_CALLBACK; + palUart->UartParams.readMode = UART2_Mode_CALLBACK; + + // store pointer to PAL UART + palUart->UartParams.userArg = palUart; + + palUart->UartParams.readCallback = RxCallback; + palUart->UartParams.writeCallback = TxCallback; + + palUart->UartParams.readReturnMode = UART2_ReadReturnMode_PARTIAL; + palUart->UartParams.baudRate = (int)pThis[FIELD___baudRate].NumericByRef().s4; + + // UART2_DataLen goes from 5->0 to 8->3 bits. + // Because the parameter carries the bits count, subtracting 5 gives the correct setting. + palUart->UartParams.dataLength = (UART2_DataLen)(pThis[FIELD___dataBits].NumericByRef().s4 - 5); + + // parity (SerialParity enum matches UART2_Parity) + palUart->UartParams.parityType = (UART2_Parity)pThis[FIELD___parity].NumericByRef().s4; + + // stop bits + switch ((StopBits)pThis[FIELD___stopBits].NumericByRef().s4) + { + case StopBits_One: + palUart->UartParams.stopBits = UART2_StopBits_1; + break; + + case StopBits_Two: + palUart->UartParams.stopBits = UART2_StopBits_2; + break; + + default: + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // abort any ongoing operations, just in case + UART2_readCancel(palUart->UartDriver); + UART2_writeCancel(palUart->UartDriver); + + if (palUart->UartDriver != NULL) + { + // stop UART before changing configuration, just in case + UART2_close(palUart->UartDriver); + } + + palUart->UartDriver = UART2_open(uartNum, &palUart->UartParams); + + UART2_rxEnable(palUart->UartDriver); + + // check if UART was opened + if (palUart->UartDriver == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_OPERATION); + } + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeWrite___VOID__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + { + NF_PAL_UART *palUart = NULL; + + uint8_t uartNum; + uint8_t *data; + unsigned int length = 0; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // dereference the data buffer from the argument + CLR_RT_HeapBlock_Array *dataBuffer = stack.Arg1().DereferenceArray(); + + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetFirstElement(); + + // get the size of the buffer + length = dataBuffer->m_numOfElements; + + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // get pointer to PAL UART + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // check if there is enough room in the buffer + if (palUart->TxRingBuffer.Capacity() - palUart->TxRingBuffer.Length() < length) + { + // not enough room in the buffer + NANOCLR_SET_AND_LEAVE(CLR_E_BUFFER_TOO_SMALL); + } + + // push data to buffer + size_t bytesWritten = palUart->TxRingBuffer.Push(data, length); + + // check if all requested bytes were written + if (bytesWritten != length) + { + // not sure if this is the best exception to throw here... + NANOCLR_SET_AND_LEAVE(CLR_E_FAIL); + } + + // // need to update the _unstoredBufferLength field in the SerialDeviceOutputStream + // // get pointer to outputStream field + // CLR_RT_HeapBlock *outputStream = + // pThis[Library_win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDevice::FIELD___outputStream] + // .Dereference(); + // // get pointer to _unstoredBufferLength field and udpate field value + // outputStream[Library_win_dev_serial_native_Windows_Devices_SerialCommunication_SerialDeviceOutputStream:: + // FIELD___unstoredBufferLength] + // .NumericByRef() + // .s4 = palUart->TxRingBuffer.Length(); + } + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeStore___U4(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + CLR_RT_HeapBlock hbTimeout; + + NF_PAL_UART *palUart = NULL; + + uint32_t estimatedDurationMiliseconds; + size_t length = 0; + uint8_t uartNum; + + int64_t *timeoutTicks; + bool eventResult = true; + bool txOk = false; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // Choose the driver for this SerialDevice + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + if (stack.m_customState == 0) + { + // check if this is a long running operation + palUart->IsLongRunning = IsLongRunningOperation( + palUart->TxRingBuffer.Length(), + (uint32_t)pThis[FIELD___baudRate].NumericByRef().s4, + (uint32_t &)estimatedDurationMiliseconds); + } + + // check if there is anything the buffer + if (palUart->TxRingBuffer.Length() > 0) + { + // check if there is a TX operation ongoing + if (palUart->TxOngoingCount == 0) + { + // OK to Tx + txOk = true; + } + else + { + // need to wait for the ongoing operation to complete before starting a new one + } + } + + if (txOk) + { + // optimize buffer for sequential reading + palUart->TxRingBuffer.OptimizeSequence(); + + // get data length available in the buffer + length = palUart->TxRingBuffer.Length(); + + if (palUart->IsLongRunning) + { + + // setup timeout + hbTimeout.SetInteger( + (CLR_INT64)pThis[FIELD___writeTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // this is a long running operation and hasn't started yet + // perform operation by launching a thread to + if (stack.m_customState == 1) + { + // push to the stack how many bytes bytes where buffered for Tx + stack.PushValueI4(length); + + // set TX count + palUart->TxOngoingCount = length; + + // Write data to start sending + // by design: don't bother checking the return value + UART2_write(palUart->UartDriver, (const void *)palUart->TxRingBuffer.Reader(), length, NULL); + + // bump custom state so the read value above is pushed only once + stack.m_customState = 2; + } + } + else + { + // this is NOT a long running operation + // perform TX operation right away + + // Write data to ring buffer to start sending + // by design: don't bother checking the return value + UART2_write(palUart->UartDriver, (const void *)palUart->TxRingBuffer.Reader(), length, NULL); + + // pop data that was written to FIFO + // pop elements from ring buffer, just pop + palUart->TxRingBuffer.Pop(length); + } + } + + while (eventResult) + { + if (!palUart->IsLongRunning) + { + // this is not a long running operation so nothing to do here + break; + } + + // non-blocking wait allowing other threads to run while we wait for the Tx operation to complete + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortOut, eventResult)); + + if (eventResult) + { + // event occurred + // get from the eval stack how many bytes were buffered to Tx + length = stack.m_evalStack[1].NumericByRef().s4; + + // reset Tx ongoing count + palUart->TxOngoingCount = 0; + + // done here + break; + } + else + { + NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT); + } + } + + if (palUart->IsLongRunning) + { + // pop length heap block from stack + stack.PopValue(); + + // pop timeout heap block from stack + stack.PopValue(); + } + + stack.SetResult_U4(length); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeRead___U4__SZARRAY_U1__I4__I4( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + CLR_RT_HeapBlock_Array *dataBuffer; + NF_PAL_UART *palUart = NULL; + CLR_RT_HeapBlock hbTimeout; + + uint8_t uartNum; + uint8_t *data; + size_t dataLength = 0; + + size_t count = 0; + size_t bytesRead = 0; + size_t bytesToRead = 0; + size_t readOffset = 0; + + int64_t *timeoutTicks; + bool eventResult = true; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + if (pThis[FIELD___disposed].NumericByRef().u1 != 0) + { + NANOCLR_SET_AND_LEAVE(CLR_E_OBJECT_DISPOSED); + } + + // dereference the data buffer from the argument + dataBuffer = stack.Arg1().DereferenceArray(); + + // The offset to start filling the buffer + readOffset = stack.Arg2().NumericByRef().s4; + + // get a the pointer to the array by using the first element of the array + data = dataBuffer->GetElement(readOffset); + + // get how many bytes are requested to read + count = stack.Arg3().NumericByRef().s4; + + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + // Choose the driver for this SerialDevice + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // setup timeout from the _readtimeout heap block + hbTimeout.SetInteger((CLR_INT64)pThis[FIELD___readTimeout].NumericByRef().s4 * TIME_CONVERSION__TO_MILLISECONDS); + NANOCLR_CHECK_HRESULT(stack.SetupTimeoutFromTicks(hbTimeout, timeoutTicks)); + + // figure out what's available in the Rx ring buffer + if (UART2_getRxCount(palUart->UartDriver) >= count) + { + // read from Rx ring buffer + bytesToRead = count; + + // we have enough bytes, skip wait for event + eventResult = false; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + } + else + { + if (stack.m_customState == 1) + { + // not enough bytes available, have to read from UART + palUart->RxBytesToRead = count; + + // clear event by getting it + Events_Get(SYSTEM_EVENT_FLAG_COM_IN); + + // don't read anything from the buffer yet + bytesToRead = 0; + } + } + + while (eventResult) + { + if (stack.m_customState == 1) + { + if (bytesToRead > 0) + { + // enough bytes available + eventResult = false; + } + else + { + // need to read from the UART + // update custom state + stack.m_customState = 2; + } + } + else + { + // wait for event + NANOCLR_CHECK_HRESULT( + g_CLR_RT_ExecutionEngine + .WaitEvents(stack.m_owningThread, *timeoutTicks, Event_SerialPortIn, eventResult)); + + if (!eventResult) + { + // event timeout + + bytesToRead = count; + + if (count > UART2_getRxCount(palUart->UartDriver)) + { + // need to adjust because there aren't enough bytes available + bytesToRead = UART2_getRxCount(palUart->UartDriver); + } + } + } + } + + if (bytesToRead > 0) + { + // pop the requested bytes from the ring buffer + UART2_read(palUart->UartDriver, data, bytesToRead, &bytesRead); + } + + // pop timeout heap block from stack + stack.PopValue(); + + // return how many bytes were read + stack.SetResult_U4(bytesRead); + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::NativeSetWatchChar___VOID(CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + NF_PAL_UART *palUart; + uint8_t uartNum; + + // get a pointer to the managed object instance and check that it's not NULL + CLR_RT_HeapBlock *pThis = stack.This(); + FAULT_ON_NULL(pThis); + + uartNum = PORT_INDEX_TO_UART_NUM(pThis[FIELD___portIndex].NumericByRef().s4); + + palUart = GetPalUartFromUartNum(uartNum); + if (palUart == NULL) + { + NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER); + } + + // set watch char + palUart->WatchChar = (uint8_t)pThis[FIELD___watchChar].NumericByRef().u1; + + NANOCLR_NOCLEANUP(); +} + +HRESULT Library_sys_io_ser_native_System_IO_Ports_SerialPort::GetDeviceSelector___STATIC__STRING( + CLR_RT_StackFrame &stack) +{ + NANOCLR_HEADER(); + + // declare the device selector string whose max size is "COM2," + terminator + // and init with the terminator + char deviceSelectorString[4 + 1] = {0}; + +#if defined(NF_SERIAL_COMM_TI_USE_UART1) && (NF_SERIAL_COMM_TI_USE_UART1 == TRUE) + strcat(deviceSelectorString, "COM2,"); +#endif + + // replace the last comma with a terminator + deviceSelectorString[hal_strlen_s(deviceSelectorString) - 1] = '\0'; + + // because the caller is expecting a result to be returned + // we need set a return result in the stack argument using the appropriate SetResult according to the variable + // type (a string here) + stack.SetResult_String(deviceSelectorString); + + NANOCLR_NOCLEANUP_NOLABEL(); +} diff --git a/targets/TI-SimpleLink/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h b/targets/TI-SimpleLink/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h new file mode 100644 index 0000000000..cc2baac8b0 --- /dev/null +++ b/targets/TI-SimpleLink/_nanoCLR/System.IO.Ports/sys_io_ser_native_target.h @@ -0,0 +1,48 @@ +// +// Copyright (c) .NET Foundation and Contributors +// See LICENSE file in the project root for full license information. +// + +#ifndef _SYS_IO_SER_NATIVE_TARGET_H_ +#define _SYS_IO_SER_NATIVE_TARGET_H_ + +#include +#include + +#include +#include + +// struct representing the UART +typedef struct +{ + UART2_Handle UartDriver; + UART2_Params UartParams; + uint8_t UartNum; + + HAL_RingBuffer TxRingBuffer; + uint8_t *TxBuffer; + uint16_t TxOngoingCount; + + uint16_t RxBytesToRead; + + bool IsLongRunning; + + uint8_t WatchChar; +} NF_PAL_UART; + +//////////////////////////////////////////// +// declaration of the the UART PAL strucs // +//////////////////////////////////////////// +#if defined(NF_SERIAL_COMM_TI_USE_UART1) && (NF_SERIAL_COMM_TI_USE_UART1 == TRUE) +extern NF_PAL_UART Uart1_PAL; +#endif + +///////////////////////////////////// +// UART Tx buffers // +// these live in the target folder // +///////////////////////////////////// +extern uint8_t Uart1_TxBuffer[]; + +#define UART_TX_BUFFER_SIZE(num) UART##num##_TX_SIZE + +#endif //_SYS_IO_SER_NATIVE_TARGET_H_ diff --git a/targets/win32/Include/targetHAL.h b/targets/win32/Include/targetHAL.h index 2e068d158d..3b2ad057ef 100644 --- a/targets/win32/Include/targetHAL.h +++ b/targets/win32/Include/targetHAL.h @@ -8,6 +8,8 @@ // #include +#define PLATFORM_DELAY(milliSecs) Sleep(milliSecs); + // set min possible number of sockets #define PLATFORM_DEPENDENT__SOCKETS_MAX_COUNT 1 diff --git a/targets/win32/nanoCLR.sln b/targets/win32/nanoCLR.sln index d267d3e580..74ffde4466 100644 --- a/targets/win32/nanoCLR.sln +++ b/targets/win32/nanoCLR.sln @@ -72,6 +72,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Networking.Sntp", "..\..\sr EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "System.Net", "..\..\src\DeviceInterfaces\System.Net\System.Net.vcxproj", "{87B3B6FB-AE1F-4777-ABBF-3E42E0DEB336}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "System.IO.Ports", "..\..\src\System.IO.Ports\System.IO.Ports.vcxproj", "{46556AFC-C248-4082-ABE6-9B07F4E57579}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "System.Device.Gpio", "..\..\src\System.Device.Gpio\System.Device.Gpio.vcxproj", "{830A7E28-7B2B-4BE6-8888-A39775A0092A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -430,6 +434,28 @@ Global {87B3B6FB-AE1F-4777-ABBF-3E42E0DEB336}.Release|x64.Build.0 = Release|x64 {87B3B6FB-AE1F-4777-ABBF-3E42E0DEB336}.Release|x86.ActiveCfg = Release|Win32 {87B3B6FB-AE1F-4777-ABBF-3E42E0DEB336}.Release|x86.Build.0 = Release|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Debug|Any CPU.Build.0 = Debug|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Debug|x64.ActiveCfg = Debug|x64 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Debug|x64.Build.0 = Debug|x64 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Debug|x86.ActiveCfg = Debug|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Debug|x86.Build.0 = Debug|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Release|Any CPU.ActiveCfg = Release|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Release|x64.ActiveCfg = Release|x64 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Release|x64.Build.0 = Release|x64 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Release|x86.ActiveCfg = Release|Win32 + {46556AFC-C248-4082-ABE6-9B07F4E57579}.Release|x86.Build.0 = Release|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Debug|Any CPU.Build.0 = Debug|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Debug|x64.ActiveCfg = Debug|x64 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Debug|x64.Build.0 = Debug|x64 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Debug|x86.ActiveCfg = Debug|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Debug|x86.Build.0 = Debug|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Release|Any CPU.ActiveCfg = Release|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Release|x64.ActiveCfg = Release|x64 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Release|x64.Build.0 = Release|x64 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Release|x86.ActiveCfg = Release|Win32 + {830A7E28-7B2B-4BE6-8888-A39775A0092A}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -460,6 +486,8 @@ Global {3CAE286F-0EF8-45E4-8111-AFA0AA9282B4} = {383CE434-88F9-4BD4-99C3-D7F19558868D} {84C62EFC-DBA2-4D47-BB81-322E8902C6D6} = {383CE434-88F9-4BD4-99C3-D7F19558868D} {87B3B6FB-AE1F-4777-ABBF-3E42E0DEB336} = {76169580-0DE3-48D0-9545-8FC438C54094} + {46556AFC-C248-4082-ABE6-9B07F4E57579} = {383CE434-88F9-4BD4-99C3-D7F19558868D} + {830A7E28-7B2B-4BE6-8888-A39775A0092A} = {383CE434-88F9-4BD4-99C3-D7F19558868D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {432A3A35-F7BC-47DA-B887-9F18A369A065} diff --git a/targets/win32/nanoCLR/Generated/CLR_RT_InteropAssembliesTable.cpp b/targets/win32/nanoCLR/Generated/CLR_RT_InteropAssembliesTable.cpp index 42b0606e62..c586378af8 100644 --- a/targets/win32/nanoCLR/Generated/CLR_RT_InteropAssembliesTable.cpp +++ b/targets/win32/nanoCLR/Generated/CLR_RT_InteropAssembliesTable.cpp @@ -14,6 +14,8 @@ extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Resour extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_Windows_Storage; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Networking_Sntp; extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_Net; +extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_IO_Ports; +extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_Device_Gpio; // nanoFramework class libraries declarations extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_nanoFramework_Runtime_Events; @@ -31,6 +33,8 @@ const CLR_RT_NativeAssemblyData *g_CLR_InteropAssembliesNativeData[] = { &g_CLR_AssemblyNative_Windows_Storage, &g_CLR_AssemblyNative_nanoFramework_Networking_Sntp, &g_CLR_AssemblyNative_System_Net, + &g_CLR_AssemblyNative_System_IO_Ports, + &g_CLR_AssemblyNative_System_Device_Gpio, NULL}; uint16_t g_CLR_InteropAssembliesCount = ARRAYSIZE(g_CLR_InteropAssembliesNativeData) - 1; diff --git a/targets/win32/nanoCLR/Various.cpp b/targets/win32/nanoCLR/Various.cpp index 4bfdeae3d6..a29144038f 100644 --- a/targets/win32/nanoCLR/Various.cpp +++ b/targets/win32/nanoCLR/Various.cpp @@ -97,16 +97,6 @@ bool ConfigurationManager_StoreConfigurationBlock( return true; } -int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) -{ - return 0; -} - -int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) -{ - return 0; -} - void NFReleaseInfo::Init( NFReleaseInfo &NFReleaseInfo, unsigned short int major, @@ -509,3 +499,8 @@ int nanoBooter_GetTargetInfo(TargetInfo *targetInfo) } /////////////////////////////////////////////////////////////// + +void WP_Message_PrepareReception_Platform() +{ + // empty on purpose, nothing to configure +} diff --git a/targets/win32/nanoCLR/base64.cpp b/targets/win32/nanoCLR/base64.cpp new file mode 100644 index 0000000000..405fde804e --- /dev/null +++ b/targets/win32/nanoCLR/base64.cpp @@ -0,0 +1,295 @@ +// +// Copyright (c) .NET Foundation and Contributors +// Portions Copyright (c) The Mbed TLS Contributors. All Rights Reserved. +// See LICENSE file in the project root for full license information. +// + +////////////////////////////////////////////////////////////////////////////////////////////// +// we are using the function declarations matching the mbedTLS ones BUT with weak attribute // +// if the image includes the mbedTLS, these will be replaced by the strong ones from there // +// thus there will be no duplicate code // +////////////////////////////////////////////////////////////////////////////////////////////// + +////////////////////////////////////////////////////////////////////////////// +// Any changes here should be refelected in src\CLR\Helpers\Base64\base64.c // +////////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include + +static void mbedtls_base64_cond_assign_uint32(uint32_t *dest, const uint32_t src, uint32_t condition) +{ + /* MSVC has a warning about unary minus on unsigned integer types, + * but this is well-defined and precisely what we want to do here. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + /* Generate bitmask from condition, mask will either be 0xFFFFFFFF or 0 */ + uint32_t mask = (condition | -condition); + mask >>= 31; + mask = -mask; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + *dest = (src & mask) | ((*dest) & ~mask); +} + +static unsigned char mbedtls_base64_eq(size_t in_a, size_t in_b) +{ + size_t difference = in_a ^ in_b; + + /* MSVC has a warning about unary minus on unsigned integer types, + * but this is well-defined and precisely what we want to do here. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + difference |= -difference; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + /* cope with the varying size of size_t per platform */ + difference >>= (sizeof(difference) * 8 - 1); + + return (unsigned char)(1 ^ difference); +} + +static void mbedtls_base64_cond_assign_uchar( + unsigned char *dest, + const unsigned char *const src, + unsigned char condition) +{ + /* MSVC has a warning about unary minus on unsigned integer types, + * but this is well-defined and precisely what we want to do here. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4146) +#endif + + /* Generate bitmask from condition, mask will either be 0xFF or 0 */ + unsigned char mask = (condition | -condition); + mask >>= 7; + mask = -mask; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + + *dest = ((*src) & mask) | ((*dest) & ~mask); +} + +static unsigned char mbedtls_base64_table_lookup( + const unsigned char *const table, + const size_t table_size, + const size_t table_index) +{ + size_t i; + unsigned char result = 0; + + for (i = 0; i < table_size; ++i) + { + mbedtls_base64_cond_assign_uchar(&result, &table[i], mbedtls_base64_eq(i, table_index)); + } + + return result; +} + +__nfweak int mbedtls_base64_encode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) +{ + size_t i, n; + int C1, C2, C3; + unsigned char *p; + + if (slen == 0) + { + *olen = 0; + return (0); + } + + n = slen / 3 + (slen % 3 != 0); + + if (n > (BASE64_SIZE_T_MAX - 1) / 4) + { + *olen = BASE64_SIZE_T_MAX; + return (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); + } + + n *= 4; + + if ((dlen < n + 1) || (NULL == dst)) + { + *olen = n + 1; + return (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); + } + + n = (slen / 3) * 3; + + for (i = 0, p = dst; i < n; i += 3) + { + C1 = *src++; + C2 = *src++; + C3 = *src++; + + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((C1 >> 2) & 0x3F)); + + *p++ = + mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((((C1 & 3) << 4) + (C2 >> 4)) & 0x3F)); + + *p++ = mbedtls_base64_table_lookup( + base64_enc_map, + sizeof(base64_enc_map), + ((((C2 & 15) << 2) + (C3 >> 6)) & 0x3F)); + + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), (C3 & 0x3F)); + } + + if (i < slen) + { + C1 = *src++; + C2 = ((i + 1) < slen) ? *src++ : 0; + + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((C1 >> 2) & 0x3F)); + + *p++ = + mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), ((((C1 & 3) << 4) + (C2 >> 4)) & 0x3F)); + + if ((i + 1) < slen) + { + *p++ = mbedtls_base64_table_lookup(base64_enc_map, sizeof(base64_enc_map), (((C2 & 15) << 2) & 0x3F)); + } + else + { + *p++ = '='; + } + + *p++ = '='; + } + + *olen = p - dst; + *p = 0; + + return 0; +} + +__nfweak int mbedtls_base64_decode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen) +{ + size_t i, n; + uint32_t j, x; + unsigned char *p; + unsigned char dec_map_lookup; + + /* First pass: check for validity and get output length */ + for (i = n = j = 0; i < slen; i++) + { + /* Skip spaces before checking for EOL */ + x = 0; + while (i < slen && src[i] == ' ') + { + ++i; + ++x; + } + + /* Spaces at end of buffer are OK */ + if (i == slen) + { + break; + } + + if ((slen - i) >= 2 && src[i] == '\r' && src[i + 1] == '\n') + { + continue; + } + + if (src[i] == '\n') + { + continue; + } + + /* Space inside a line is an error */ + if (x != 0) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + if (src[i] == '=' && ++j > 2) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + dec_map_lookup = mbedtls_base64_table_lookup(base64_dec_map, sizeof(base64_dec_map), src[i]); + + if (src[i] > 127 || dec_map_lookup == 127) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + if (dec_map_lookup < 64 && j != 0) + { + return (MBEDTLS_ERR_BASE64_INVALID_CHARACTER); + } + + n++; + } + + if (n == 0) + { + *olen = 0; + return (0); + } + + /* The following expression is to calculate the following formula without + * risk of integer overflow in n: + * n = ( ( n * 6 ) + 7 ) >> 3; + */ + n = (6 * (n >> 3)) + ((6 * (n & 0x7) + 7) >> 3); + n -= j; + + if (dst == NULL || dlen < n) + { + *olen = n; + return (MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); + } + + for (j = 3, n = x = 0, p = dst; i > 0; i--, src++) + { + if (*src == '\r' || *src == '\n' || *src == ' ') + { + continue; + } + + dec_map_lookup = mbedtls_base64_table_lookup(base64_dec_map, sizeof(base64_dec_map), *src); + + mbedtls_base64_cond_assign_uint32(&j, j - 1, mbedtls_base64_eq(dec_map_lookup, 64)); + x = (x << 6) | (dec_map_lookup & 0x3F); + + if (++n == 4) + { + n = 0; + if (j > 0) + { + *p++ = (unsigned char)(x >> 16); + } + + if (j > 1) + { + *p++ = (unsigned char)(x >> 8); + } + + if (j > 2) + { + *p++ = (unsigned char)(x); + } + } + } + + *olen = p - dst; + + return (0); +} diff --git a/targets/win32/nanoCLR/nanoCLR.vcxproj b/targets/win32/nanoCLR/nanoCLR.vcxproj index e2d5f0dccd..a6150a9c39 100644 --- a/targets/win32/nanoCLR/nanoCLR.vcxproj +++ b/targets/win32/nanoCLR/nanoCLR.vcxproj @@ -22,7 +22,7 @@ {B5515C8A-B056-4320-8EA4-8CACE21A7D2E} Win32Proj nanoCLR - 10.0.18362.0 + 10.0.19041.0 @@ -107,7 +107,7 @@ Use Level3 Disabled - NANOCLR_REFLECTION=TRUE;WIN32;_DEBUG;_CONSOLE;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + NANOCLR_REFLECTION=TRUE;SUPPORT_ANY_BASE_CONVERSION;WIN32;_DEBUG;_CONSOLE;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) ..\..\..\src\CLR\Core;..\..\..\src\CLR\CorLib;..\..\..\src\CLR\Helpers\Base64;.;..\Include;..\..\..\src\CLR\Include;..\..\..\src\HAL\Include;..\..\..\src\PAL\Include;..\..\..\src\nanoFramework.Runtime.Events @@ -134,7 +134,7 @@ MaxSpeed true true - NANOCLR_REFLECTION=TRUE;WIN32;NDEBUG;_CONSOLE;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) + NANOCLR_REFLECTION=TRUE;SUPPORT_ANY_BASE_CONVERSION;WIN32;NDEBUG;_CONSOLE;VERSION_MAJOR=$(NBGV_VersionMajor);VERSION_MINOR=$(NBGV_VersionMinor);VERSION_BUILD=$(NBGV_BuildNumber);VERSION_REVISION=$(NBGV_VersionHeight);VERSION_STRING="$(NBGV_AssemblyInformationalVersion)";OEMSYSTEMINFOSTRING="WIN_32 PLAYGROUND APP";TARGETNAMESTRING="CLR_WIN32";TARGETINFOSTRING="CLR_WIN32";PLATFORMNAMESTRING="WIN32";%(PreprocessorDefinitions) ..\..\..\src\CLR\Core;..\..\..\src\CLR\CorLib;..\..\..\src\CLR\Helpers\Base64;.;..\Include;..\..\..\src\CLR\Include;..\..\..\src\HAL\Include;..\..\..\src\PAL\Include;..\..\..\src\nanoFramework.Runtime.Events @@ -178,6 +178,7 @@ + @@ -303,6 +304,12 @@ {70922447-ebf0-4473-b014-776f8c9426e7} + + {830a7e28-7b2b-4be6-8888-a39775a0092a} + + + {46556afc-c248-4082-abe6-9b07f4e57579} + {3cae286f-0ef8-45e4-8111-afa0aa9282b4} diff --git a/targets/win32/nanoCLR/nanoCLR.vcxproj.filters b/targets/win32/nanoCLR/nanoCLR.vcxproj.filters index 767bc7cce3..93060e31a1 100644 --- a/targets/win32/nanoCLR/nanoCLR.vcxproj.filters +++ b/targets/win32/nanoCLR/nanoCLR.vcxproj.filters @@ -131,6 +131,9 @@ Source Files + + Source Files + diff --git a/targets/win32/nanoCLR/targetPAL_Events.cpp b/targets/win32/nanoCLR/targetPAL_Events.cpp index d4ffff1968..fd85a0fe32 100644 --- a/targets/win32/nanoCLR/targetPAL_Events.cpp +++ b/targets/win32/nanoCLR/targetPAL_Events.cpp @@ -31,7 +31,7 @@ void Events_SetBoolTimer(bool *timerCompleteFlag, uint32_t millisecondsFromNow) // we assume only 1 can be active, abort previous just in case if (boolEventsTimer != NULL) { - boolEventsTimer.release(); + delete boolEventsTimer.release(); } if (timerCompleteFlag) diff --git a/version.json b/version.json index cf8aa0ff58..7faf39485d 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "1.6.4", + "version": "1.6.5", "assemblyVersion": { "precision": "revision" }, @@ -25,4 +25,4 @@ "versionIncrement": "build", "firstUnstableTag": "preview" } -} +} \ No newline at end of file