diff --git a/Documentation/applications/examples/leds_zig/index.rst b/Documentation/applications/examples/leds_zig/index.rst new file mode 100644 index 0000000000000..d06f79298230e --- /dev/null +++ b/Documentation/applications/examples/leds_zig/index.rst @@ -0,0 +1,6 @@ +================================= +``leds_zig`` Toggle LEDs in Zig +================================= + +This is a simple test in Zig of the board LED driver at +``nuttx/drivers/leds/userled_*.c``. diff --git a/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst b/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst index 34f137e6fd2e6..7db24177a41f7 100644 --- a/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst +++ b/Documentation/platforms/risc-v/qemu-rv/boards/rv-virt/index.rst @@ -262,6 +262,11 @@ leds64_rust Similar to the `leds64`_ configuration, but with ``leds_rust`` example enabled. +leds64_zig +----------- + +Similar to the `leds64`_ configuration, but with ``leds_zig`` example enabled. + netnsh ------ diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig new file mode 100644 index 0000000000000..a51da08646602 --- /dev/null +++ b/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig @@ -0,0 +1,76 @@ +# +# This file is autogenerated: PLEASE DO NOT EDIT IT. +# +# You can use "make menuconfig" to make any modifications to the installed .config file. +# You can then do "make savedefconfig" to generate a new defconfig file that includes your +# modifications. +# +# CONFIG_DISABLE_OS_API is not set +# CONFIG_NSH_DISABLE_LOSMART is not set +CONFIG_16550_ADDRWIDTH=0 +CONFIG_16550_UART0=y +CONFIG_16550_UART0_BASE=0x10000000 +CONFIG_16550_UART0_CLOCK=3686400 +CONFIG_16550_UART0_IRQ=37 +CONFIG_16550_UART0_SERIAL_CONSOLE=y +CONFIG_16550_UART=y +CONFIG_ARCH="risc-v" +CONFIG_ARCH_BOARD="rv-virt" +CONFIG_ARCH_BOARD_QEMU_RV_VIRT=y +CONFIG_ARCH_CHIP="qemu-rv" +CONFIG_ARCH_CHIP_QEMU_RV64=y +CONFIG_ARCH_CHIP_QEMU_RV=y +CONFIG_ARCH_CHIP_QEMU_RV_ISA_A=y +CONFIG_ARCH_CHIP_QEMU_RV_ISA_C=y +CONFIG_ARCH_CHIP_QEMU_RV_ISA_M=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_RISCV=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_BCH=y +CONFIG_BOARDCTL_POWEROFF=y +CONFIG_BOARD_LATE_INITIALIZE=y +CONFIG_BOARD_LOOPSPERMSEC=6366 +CONFIG_BUILTIN=y +CONFIG_DEBUG_FEATURES=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_DEVICE_TREE=y +CONFIG_DEV_ZERO=y +CONFIG_ELF=y +CONFIG_EXAMPLES_HELLO=y +CONFIG_EXAMPLES_LEDS=y +CONFIG_EXAMPLES_LEDS_ZIG=y +CONFIG_FS_HOSTFS=y +CONFIG_FS_PROCFS=y +CONFIG_IDLETHREAD_STACKSIZE=2048 +CONFIG_INIT_ENTRYPOINT="nsh_main" +CONFIG_INIT_STACKSIZE=3072 +CONFIG_LIBC_ENVPATH=y +CONFIG_LIBC_EXECFUNCS=y +CONFIG_LIBC_PERROR_STDOUT=y +CONFIG_LIBC_STRERROR=y +CONFIG_LIBM=y +CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 +CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_BUILTIN_APPS=y +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_READLINE=y +CONFIG_PATH_INITIAL="/system/bin" +CONFIG_RAM_SIZE=33554432 +CONFIG_RAM_START=0x80000000 +CONFIG_READLINE_CMD_HISTORY=y +CONFIG_RISCV_SEMIHOSTING_HOSTFS=y +CONFIG_RR_INTERVAL=200 +CONFIG_SCHED_WAITPID=y +CONFIG_SERIAL_UART_ARCH_MMIO=y +CONFIG_STACK_COLORATION=y +CONFIG_START_MONTH=12 +CONFIG_START_YEAR=2021 +CONFIG_SYMTAB_ORDEREDBYNAME=y +CONFIG_SYSTEM_NSH=y +CONFIG_SYSTEM_NSH_STACKSIZE=3072 +CONFIG_TESTING_GETPRIME=y +CONFIG_TESTING_OSTEST=y +CONFIG_USEC_PER_TICK=1000 +CONFIG_USERLED=y +CONFIG_USERLED_LOWER=y diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index 61b693851329d..e80902b32b514 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -46,41 +46,41 @@ RUN mkdir -p /tools WORKDIR /tools RUN mkdir -p /tools/nuttx-tools -RUN curl -s -L https://bitbucket.org/nuttx/tools/get/9ad3e1ee75c7.tar.gz \ - | tar -C nuttx-tools --strip-components=1 -xz - -RUN mkdir -p /tools/bloaty \ - && git clone --depth 1 --branch v1.1 https://github.com/google/bloaty bloaty-src \ - && cd bloaty-src \ - && cmake -B build -DCMAKE_INSTALL_PREFIX=/tools/bloaty \ - && cmake --build build \ - && cmake --build build --target install \ - && cd /tools && rm -rf bloaty-src - -RUN cd nuttx-tools/kconfig-frontends \ - && ./configure --enable-mconf --disable-gconf --disable-qconf --enable-static --prefix=/tools/kconfig-frontends \ - && make install && cd /tools && rm -rf nuttx-tools - -RUN mkdir -p /tools/gn \ - && cd /tools/gn \ - && git clone https://gn.googlesource.com/gn gn \ - && cd gn && ./build/gen.py \ - && cd out && ninja +RUN curl -s -L https://bitbucket.org/nuttx/tools/get/9ad3e1ee75c7.tar.gz | + tar -C nuttx-tools --strip-components=1 -xz + +RUN mkdir -p /tools/bloaty && + git clone --depth 1 --branch v1.1 https://github.com/google/bloaty bloaty-src && + cd bloaty-src && + cmake -B build -DCMAKE_INSTALL_PREFIX=/tools/bloaty && + cmake --build build && + cmake --build build --target install && + cd /tools && rm -rf bloaty-src + +RUN cd nuttx-tools/kconfig-frontends && + ./configure --enable-mconf --disable-gconf --disable-qconf --enable-static --prefix=/tools/kconfig-frontends && + make install && cd /tools && rm -rf nuttx-tools + +RUN mkdir -p /tools/gn && + cd /tools/gn && + git clone https://gn.googlesource.com/gn gn && + cd gn && ./build/gen.py && + cd out && ninja ENV ZAP_INSTALL_PATH=/tools/zap_release -RUN mkdir -p $ZAP_INSTALL_PATH \ - && cd $ZAP_INSTALL_PATH \ - && curl -s -O -L https://github.com/project-chip/zap/releases/download/v2023.10.09-nightly/zap-linux-x64.zip \ - && unzip zap-linux-x64.zip \ - && rm zap-linux-x64.zip +RUN mkdir -p $ZAP_INSTALL_PATH && + cd $ZAP_INSTALL_PATH && + curl -s -O -L https://github.com/project-chip/zap/releases/download/v2023.10.09-nightly/zap-linux-x64.zip && + unzip zap-linux-x64.zip && + rm zap-linux-x64.zip ENV ZAP_DEVELOPMENT_PATH=/tools/zap -RUN cd /tools \ - && curl -s -O -L https://github.com/project-chip/zap/archive/refs/tags/v2023.10.09-nightly.zip \ - && unzip v2023.10.09-nightly.zip \ - && mv zap-2023.10.09-nightly zap \ - && rm v2023.10.09-nightly.zip \ - && cd zap && npm install cross-spawn folder-hash +RUN cd /tools && + curl -s -O -L https://github.com/project-chip/zap/archive/refs/tags/v2023.10.09-nightly.zip && + unzip v2023.10.09-nightly.zip && + mv zap-2023.10.09-nightly zap && + rm v2023.10.09-nightly.zip && + cd zap && npm install cross-spawn folder-hash ######################### # Programming languages @@ -90,11 +90,11 @@ RUN cd /tools \ ENV RUST_HOME=/tools/rust ENV CARGO_HOME=$RUST_HOME/cargo ENV RUSTUP_HOME=$RUST_HOME/rustup -RUN mkdir -p $CARGO_HOME \ - && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ - && $CARGO_HOME/bin/rustup target add thumbv6m-none-eabi \ - && $CARGO_HOME/bin/rustup target add thumbv7m-none-eabi \ - && $CARGO_HOME/bin/rustup target add riscv64gc-unknown-none-elf +RUN mkdir -p $CARGO_HOME && + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && + $CARGO_HOME/bin/rustup target add thumbv6m-none-eabi && + $CARGO_HOME/bin/rustup target add thumbv7m-none-eabi && + $CARGO_HOME/bin/rustup target add riscv64gc-unknown-none-elf # Install Swift # ENV SWIFT_VERSION=6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a @@ -107,21 +107,21 @@ RUN mkdir -p $CARGO_HOME \ # Install Zig latest release ENV ZIG_VERSION=0.13.0 ENV ZIG_HOME=/tools/zig -RUN mkdir -p ${ZIG_HOME} \ - && curl -s -O -L https://github.com/marler8997/zigup/releases/download/v2024_05_05/zigup-x86_64-linux.tar.gz \ - && tar xzf zigup-x86_64-linux.tar.gz -C ${ZIG_HOME} \ - && rm zigup-x86_64-linux.tar.gz \ - && chmod +x ${ZIG_HOME}/zigup \ - && ${ZIG_HOME}/zigup fetch --install-dir ${ZIG_HOME} ${ZIG_VERSION} \ - && chmod +x ${ZIG_HOME}/${ZIG_VERSION}/files/zig +RUN mkdir -p ${ZIG_HOME} && + curl -s -O -L https://github.com/marler8997/zigup/releases/download/v2024_05_05/zigup-x86_64-linux.tar.gz && + tar xzf zigup-x86_64-linux.tar.gz -C ${ZIG_HOME} && + rm zigup-x86_64-linux.tar.gz && + chmod +x ${ZIG_HOME}/zigup && + ${ZIG_HOME}/zigup fetch --install-dir ${ZIG_HOME} ${ZIG_VERSION} && + chmod +x ${ZIG_HOME}/${ZIG_VERSION}/files/zig # Install LDC2 latest release ENV LDC_VERSION=1.39.0 ENV D_HOME=/tools/ldc2 -RUN mkdir -p ${D_HOME} \ - && curl -s -O -L https://github.com/ldc-developers/ldc/releases/download/v${LDC_VERSION}/ldc2-${LDC_VERSION}-linux-x86_64.tar.xz \ - && tar xf ldc2-${LDC_VERSION}-linux-x86_64.tar.xz -C ${D_HOME} \ - && rm ldc2-${LDC_VERSION}-linux-x86_64.tar.xz +RUN mkdir -p ${D_HOME} && + curl -s -O -L https://github.com/ldc-developers/ldc/releases/download/v${LDC_VERSION}/ldc2-${LDC_VERSION}-linux-x86_64.tar.xz && + tar xf ldc2-${LDC_VERSION}-linux-x86_64.tar.xz -C ${D_HOME} && + rm ldc2-${LDC_VERSION}-linux-x86_64.tar.xz CMD [ "/bin/bash" ] @@ -138,23 +138,23 @@ WORKDIR /tools ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-arm # Download the latest ARM clang toolchain prebuilt by ARM -RUN mkdir -p clang-arm-none-eabi && \ - curl -s -L "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz" \ - | tar -C clang-arm-none-eabi --strip-components 1 -xJ +RUN mkdir -p clang-arm-none-eabi && + curl -s -L "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-17.0.1/LLVMEmbeddedToolchainForArm-17.0.1-Linux-x86_64.tar.xz" | + tar -C clang-arm-none-eabi --strip-components 1 -xJ # Download the latest ARM GCC toolchain prebuilt by ARM -RUN mkdir -p gcc-arm-none-eabi && \ - curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi.tar.xz" \ - | tar -C gcc-arm-none-eabi --strip-components 1 -xJ +RUN mkdir -p gcc-arm-none-eabi && + curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi.tar.xz" | + tar -C gcc-arm-none-eabi --strip-components 1 -xJ ############################################################################### # Build image for tool required by ARM64 builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-arm64 # Download the latest ARM64 GCC toolchain prebuilt by ARM -RUN mkdir gcc-aarch64-none-elf && \ - curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf.tar.xz" \ - | tar -C gcc-aarch64-none-elf --strip-components 1 -xJ +RUN mkdir gcc-aarch64-none-elf && + curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf.tar.xz" | + tar -C gcc-aarch64-none-elf --strip-components 1 -xJ ############################################################################### # Build image for tool required by AVR32 builds @@ -164,7 +164,7 @@ FROM nuttx-toolchain-base AS nuttx-toolchain-avr32 RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ git # Clone Main Repository -RUN mkdir -p gcc-avr32-gnu && \ +RUN mkdir -p gcc-avr32-gnu && git clone --depth 1 https://github.com/ramangopalan/avr32-gnu-toolchain-linux_x86 gcc-avr32-gnu ############################################################################### @@ -173,9 +173,9 @@ RUN mkdir -p gcc-avr32-gnu && \ FROM nuttx-toolchain-base AS nuttx-toolchain-pinguino # Download the pinguino compilers. Note this includes both 8bit and 32bit # toolchains and builds for multiple host systems. Only copy what is needed. -RUN mkdir -p pinguino-compilers && \ - curl -s -L "https://github.com/PinguinoIDE/pinguino-compilers/archive/62db5158d7f6d41c6fadb05de81cc31dd81a1958.tar.gz" \ - | tar -C pinguino-compilers --strip-components=2 --wildcards -xz */linux64 +RUN mkdir -p pinguino-compilers && + curl -s -L "https://github.com/PinguinoIDE/pinguino-compilers/archive/62db5158d7f6d41c6fadb05de81cc31dd81a1958.tar.gz" | + tar -C pinguino-compilers --strip-components=2 --wildcards -xz */linux64 ############################################################################### # Build image for tool required by Renesas builds @@ -195,44 +195,44 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q bzip2 # Download toolchain source code -RUN mkdir -p /tools/renesas-tools/source/binutils && \ - curl -s -L "https://llvm-gcc-renesas.com/downloads/d.php?f=rx/binutils/8.3.0.202305-gnurx/binutils-2.36.1.tar.gz" \ - | tar -C renesas-tools/source/binutils --strip-components=1 -xz -RUN mkdir -p /tools/renesas-tools/source/gcc && \ - curl -s -L "https://llvm-gcc-renesas.com/downloads/d.php?f=rx/gcc/8.3.0.202305-gnurx/gcc-8.3.0.tar.gz" \ - | tar -C renesas-tools/source/gcc --strip-components=1 -xz -RUN mkdir -p /tools/renesas-tools/source/newlib && \ - curl -s -L "https://llvm-gcc-renesas.com/downloads/d.php?f=rx/newlib/8.3.0.202305-gnurx/newlib-4.1.0.tar.gz" \ - | tar -C renesas-tools/source/newlib --strip-components=1 -xz +RUN mkdir -p /tools/renesas-tools/source/binutils && + curl -s -L "https://llvm-gcc-renesas.com/downloads/d.php?f=rx/binutils/8.3.0.202305-gnurx/binutils-2.36.1.tar.gz" | + tar -C renesas-tools/source/binutils --strip-components=1 -xz +RUN mkdir -p /tools/renesas-tools/source/gcc && + curl -s -L "https://llvm-gcc-renesas.com/downloads/d.php?f=rx/gcc/8.3.0.202305-gnurx/gcc-8.3.0.tar.gz" | + tar -C renesas-tools/source/gcc --strip-components=1 -xz +RUN mkdir -p /tools/renesas-tools/source/newlib && + curl -s -L "https://llvm-gcc-renesas.com/downloads/d.php?f=rx/newlib/8.3.0.202305-gnurx/newlib-4.1.0.tar.gz" | + tar -C renesas-tools/source/newlib --strip-components=1 -xz # Install binutils -RUN cd renesas-tools/source/binutils && \ - chmod +x ./configure ./mkinstalldirs && \ - mkdir -p /tools/renesas-tools/build/binutils && cd /tools/renesas-tools/build/binutils && \ - /tools/renesas-tools/source/binutils/configure --target=rx-elf --prefix=/tools/renesas-toolchain/rx-elf-gcc --disable-werror &&\ +RUN cd renesas-tools/source/binutils && + chmod +x ./configure ./mkinstalldirs && + mkdir -p /tools/renesas-tools/build/binutils && cd /tools/renesas-tools/build/binutils && + /tools/renesas-tools/source/binutils/configure --target=rx-elf --prefix=/tools/renesas-toolchain/rx-elf-gcc --disable-werror && make && make install ENV PATH="/tools/renesas-toolchain/rx-elf-gcc/bin:$PATH" # Install gcc -RUN cd renesas-tools/source/gcc && \ - chmod +x ./contrib/download_prerequisites ./configure ./move-if-change ./libgcc/mkheader.sh && \ - ./contrib/download_prerequisites && \ - sed -i '1s/^/@documentencoding ISO-8859-1\n/' ./gcc/doc/gcc.texi && \ - sed -i 's/@tex/\n&/g' ./gcc/doc/gcc.texi && sed -i 's/@end tex/\n&/g' ./gcc/doc/gcc.texi && \ - mkdir -p /tools/renesas-tools/build/gcc && cd /tools/renesas-tools/build/gcc && \ +RUN cd renesas-tools/source/gcc && + chmod +x ./contrib/download_prerequisites ./configure ./move-if-change ./libgcc/mkheader.sh && + ./contrib/download_prerequisites && + sed -i '1s/^/@documentencoding ISO-8859-1\n/' ./gcc/doc/gcc.texi && + sed -i 's/@tex/\n&/g' ./gcc/doc/gcc.texi && sed -i 's/@end tex/\n&/g' ./gcc/doc/gcc.texi && + mkdir -p /tools/renesas-tools/build/gcc && cd /tools/renesas-tools/build/gcc && /tools/renesas-tools/source/gcc/configure --target=rx-elf --prefix=/tools/renesas-toolchain/rx-elf-gcc \ - --disable-shared --disable-multilib --disable-libssp --disable-libstdcxx-pch --disable-werror --enable-lto \ - --enable-gold --with-pkgversion=GCC_Build_1.02 --with-newlib --enable-languages=c && \ + --disable-shared --disable-multilib --disable-libssp --disable-libstdcxx-pch --disable-werror --enable-lto \ + --enable-gold --with-pkgversion=GCC_Build_1.02 --with-newlib --enable-languages=c && make && make install ENV PATH="/tools/renesas-toolchain/rx-elf-gcc/bin:$PATH" # Install newlib -RUN cd renesas-tools/source/newlib && \ - chmod +x ./configure && \ - mkdir -p /tools/renesas-tools/build/newlib && cd /tools/renesas-tools/build/newlib && \ - /tools/renesas-tools/source/newlib/configure --target=rx-elf --prefix=/tools/renesas-toolchain/rx-elf-gcc && \ +RUN cd renesas-tools/source/newlib && + chmod +x ./configure && + mkdir -p /tools/renesas-tools/build/newlib && cd /tools/renesas-tools/build/newlib && + /tools/renesas-tools/source/newlib/configure --target=rx-elf --prefix=/tools/renesas-toolchain/rx-elf-gcc && make && make install -RUN cd /tools/renesas-tools/build/gcc && \ +RUN cd /tools/renesas-tools/build/gcc && make && make install && cd /tools && rm -rf renesas-tools ############################################################################### @@ -240,60 +240,60 @@ RUN cd /tools/renesas-tools/build/gcc && \ ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-riscv # Download the latest RISCV GCC toolchain prebuilt by xPack -RUN mkdir -p riscv-none-elf-gcc && \ - curl -s -L "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz" \ - | tar -C riscv-none-elf-gcc --strip-components 1 -xz +RUN mkdir -p riscv-none-elf-gcc && + curl -s -L "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz" | + tar -C riscv-none-elf-gcc --strip-components 1 -xz ############################################################################### # Build image for tool required by SPARC builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-sparc # Download the SPARC GCC toolchain prebuilt by Gaisler -RUN mkdir -p sparc-gaisler-elf-gcc && \ - curl -s -L "https://www.gaisler.com/anonftp/bcc2/bin/bcc-2.1.0-gcc-linux64.tar.xz" \ - | tar -C sparc-gaisler-elf-gcc --strip-components 1 -xJ +RUN mkdir -p sparc-gaisler-elf-gcc && + curl -s -L "https://www.gaisler.com/anonftp/bcc2/bin/bcc-2.1.0-gcc-linux64.tar.xz" | + tar -C sparc-gaisler-elf-gcc --strip-components 1 -xJ ############################################################################### # Build image for tool required by ESP32 builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-esp32 # Download the latest ESP32 GCC toolchain prebuilt by Espressif -RUN mkdir -p xtensa-esp32-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ +RUN mkdir -p xtensa-esp32-elf-gcc && + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" | + tar -C xtensa-esp32-elf-gcc --strip-components 1 -xJ -RUN mkdir -p xtensa-esp32s2-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ +RUN mkdir -p xtensa-esp32s2-elf-gcc && + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s2-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" | + tar -C xtensa-esp32s2-elf-gcc --strip-components 1 -xJ -RUN mkdir -p xtensa-esp32s3-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" \ - | tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ +RUN mkdir -p xtensa-esp32s3-elf-gcc && + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-12.2.0_20230208/xtensa-esp32s3-elf-12.2.0_20230208-x86_64-linux-gnu.tar.xz" | + tar -C xtensa-esp32s3-elf-gcc --strip-components 1 -xJ RUN echo "ESP Binaries: 2022/01/26" -RUN mkdir -p /tools/blobs && cd /tools/blobs \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32.bin" -o bootloader-esp32.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32c3.bin" -o bootloader-esp32c3.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32s2.bin" -o bootloader-esp32s2.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32s3.bin" -o bootloader-esp32s3.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32.bin" -o partition-table-esp32.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32c3.bin" -o partition-table-esp32c3.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32s2.bin" -o partition-table-esp32s2.bin \ - && curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32s3.bin" -o partition-table-esp32s3.bin +RUN mkdir -p /tools/blobs && cd /tools/blobs && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32.bin" -o bootloader-esp32.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32c3.bin" -o bootloader-esp32c3.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32s2.bin" -o bootloader-esp32s2.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/bootloader-esp32s3.bin" -o bootloader-esp32s3.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32.bin" -o partition-table-esp32.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32c3.bin" -o partition-table-esp32c3.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32s2.bin" -o partition-table-esp32s2.bin && + curl -s -L "https://github.com/espressif/esp-nuttx-bootloader/releases/download/latest/partition-table-esp32s3.bin" -o partition-table-esp32s3.bin ############################################################################### # Build image for tool required by WASM builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-wasm # Download the latest WASI-enabled WebAssembly C/C++ toolchain prebuilt by WASM -RUN mkdir -p wasi-sdk && \ - curl -s -L "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz" \ - | tar -C wasi-sdk --strip-components 1 -xz +RUN mkdir -p wasi-sdk && + curl -s -L "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz" | + tar -C wasi-sdk --strip-components 1 -xz # Download the latest "wamrc" AOT compiler prebuilt by WAMR -RUN mkdir -p wamrc && \ - curl -s -L "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-1.1.2/wamrc-1.1.2-x86_64-ubuntu-20.04.tar.gz" \ - | tar -C wamrc -xz +RUN mkdir -p wamrc && + curl -s -L "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-1.1.2/wamrc-1.1.2-x86_64-ubuntu-20.04.tar.gz" | + tar -C wamrc -xz ############################################################################### # Final Docker image used for running CI system. This includes all toolchains @@ -308,10 +308,10 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q gcc \ libssl-dev -RUN mkdir -p cmake && \ - curl -s -L wget https://cmake.org/files/v3.26/cmake-3.26.0.tar.gz \ - | tar -C cmake --strip-components=1 -xz \ - && cd cmake && ./bootstrap && make && make install && rm -rf cmake +RUN mkdir -p cmake && + curl -s -L wget https://cmake.org/files/v3.26/cmake-3.26.0.tar.gz | + tar -C cmake --strip-components=1 -xz && + cd cmake && ./bootstrap && make && make install && rm -rf cmake RUN dpkg --add-architecture i386 # This is used for the final images so make sure to not store apt cache @@ -356,15 +356,15 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" TZ=Etc/UTC apt-get in wget \ xxd \ file \ - tclsh \ - && rm -rf /var/lib/apt/lists/* + tclsh && + rm -rf /var/lib/apt/lists/* # Set GCC-12 as Default compiler -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 20 && \ - update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 && \ - update-alternatives --set cc /usr/bin/gcc && \ - update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 && \ +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 && + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 20 && + update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 && + update-alternatives --set cc /usr/bin/gcc && + update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 && update-alternatives --set c++ /usr/bin/g++ # Configure out base setup for adding python packages @@ -431,7 +431,7 @@ ENV PATH="/tools/ldc2/ldc2-1.39.0-linux-x86_64/bin:$PATH" # Pull in the swift 6.0 toolchain # COPY --from=nuttx-tools /tools/swift/ /tools/swift/ -# ENV PATH="/tools/swift/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a/bin:$PATH" +# ENV PATH="/tools/swift/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-08-22-a/usr/bin:$PATH" # ARM clang toolchain COPY --from=nuttx-toolchain-arm /tools/clang-arm-none-eabi/ clang-arm-none-eabi/ @@ -498,33 +498,33 @@ ENV ZAP_INSTALL_PATH=/tools/zap_release ENV ZAP_DEVELOPMENT_PATH=/tools/zap # Configure ccache -RUN mkdir -p /tools/ccache/bin && \ - ln -sf `which ccache` /tools/ccache/bin/aarch64-none-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/aarch64-none-elf-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/arm-none-eabi-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/arm-none-eabi-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/avr-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/avr-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/avr32-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/avr32-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/cc && \ - ln -sf `which ccache` /tools/ccache/bin/c++ && \ - ln -sf `which ccache` /tools/ccache/bin/clang && \ - ln -sf `which ccache` /tools/ccache/bin/clang++ && \ - ln -sf `which ccache` /tools/ccache/bin/gcc && \ - ln -sf `which ccache` /tools/ccache/bin/g++ && \ - ln -sf `which ccache` /tools/ccache/bin/p32-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/rx-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/riscv-none-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/riscv-none-elf-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/sparc-gaisler-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/sparc-gaisler-elf-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/xtensa-esp32-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/xtensa-esp32-elf-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/xtensa-esp32s2-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/xtensa-esp32s2-elf-g++ && \ - ln -sf `which ccache` /tools/ccache/bin/xtensa-esp32s3-elf-gcc && \ - ln -sf `which ccache` /tools/ccache/bin/xtensa-esp32s3-elf-g++ +RUN mkdir -p /tools/ccache/bin && + ln -sf $(which ccache) /tools/ccache/bin/aarch64-none-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/aarch64-none-elf-g++ && + ln -sf $(which ccache) /tools/ccache/bin/arm-none-eabi-gcc && + ln -sf $(which ccache) /tools/ccache/bin/arm-none-eabi-g++ && + ln -sf $(which ccache) /tools/ccache/bin/avr-gcc && + ln -sf $(which ccache) /tools/ccache/bin/avr-g++ && + ln -sf $(which ccache) /tools/ccache/bin/avr32-gcc && + ln -sf $(which ccache) /tools/ccache/bin/avr32-g++ && + ln -sf $(which ccache) /tools/ccache/bin/cc && + ln -sf $(which ccache) /tools/ccache/bin/c++ && + ln -sf $(which ccache) /tools/ccache/bin/clang && + ln -sf $(which ccache) /tools/ccache/bin/clang++ && + ln -sf $(which ccache) /tools/ccache/bin/gcc && + ln -sf $(which ccache) /tools/ccache/bin/g++ && + ln -sf $(which ccache) /tools/ccache/bin/p32-gcc && + ln -sf $(which ccache) /tools/ccache/bin/rx-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/riscv-none-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/riscv-none-elf-g++ && + ln -sf $(which ccache) /tools/ccache/bin/sparc-gaisler-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/sparc-gaisler-elf-g++ && + ln -sf $(which ccache) /tools/ccache/bin/xtensa-esp32-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/xtensa-esp32-elf-g++ && + ln -sf $(which ccache) /tools/ccache/bin/xtensa-esp32s2-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/xtensa-esp32s2-elf-g++ && + ln -sf $(which ccache) /tools/ccache/bin/xtensa-esp32s3-elf-gcc && + ln -sf $(which ccache) /tools/ccache/bin/xtensa-esp32s3-elf-g++ ENV PATH="/tools/ccache/bin:$PATH"