diff --git a/arch/arm/src/nrf52/nrf52_tickless_rtc.c b/arch/arm/src/nrf52/nrf52_tickless_rtc.c index 9d05a70322954..08e6e8e2418c7 100644 --- a/arch/arm/src/nrf52/nrf52_tickless_rtc.c +++ b/arch/arm/src/nrf52/nrf52_tickless_rtc.c @@ -202,8 +202,6 @@ static void rtc_cancel_ack(void) g_tickless_dev.alarm_set = false; leave_critical_section(flags); - - return OK; } /**************************************************************************** diff --git a/arch/arm/src/nrf53/nrf53_tickless_rtc.c b/arch/arm/src/nrf53/nrf53_tickless_rtc.c index 8fa6e0df3386a..d9035ab0a24c4 100644 --- a/arch/arm/src/nrf53/nrf53_tickless_rtc.c +++ b/arch/arm/src/nrf53/nrf53_tickless_rtc.c @@ -200,8 +200,6 @@ static void rtc_cancel_ack(void) g_tickless_dev.alarm_set = false; leave_critical_section(flags); - - return OK; } /**************************************************************************** diff --git a/arch/arm/src/nrf91/nrf91_tickless_rtc.c b/arch/arm/src/nrf91/nrf91_tickless_rtc.c index b3065a546206d..788c3d9188398 100644 --- a/arch/arm/src/nrf91/nrf91_tickless_rtc.c +++ b/arch/arm/src/nrf91/nrf91_tickless_rtc.c @@ -196,8 +196,6 @@ static void rtc_cancel_ack(void) g_tickless_dev.alarm_set = false; leave_critical_section(flags); - - return OK; } /**************************************************************************** diff --git a/boards/arm/nrf91/nrf9160-dk/src/Make.defs b/boards/arm/nrf91/nrf9160-dk/src/Make.defs index 24deac0e54ea0..acf42fe70bc0e 100644 --- a/boards/arm/nrf91/nrf9160-dk/src/Make.defs +++ b/boards/arm/nrf91/nrf9160-dk/src/Make.defs @@ -40,6 +40,11 @@ endif ifeq ($(CONFIG_NRF91_MODEM),y) CSRCS += nrf91_modem.c + +# The modem glue pulls in headers from the proprietary NRFXlib drop, so make +# sure the board objects see the same include path the arch build relies on. +NRFXLIB_DIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)sdk-nrfxlib +CFLAGS += ${INCDIR_PREFIX}$(NRFXLIB_DIR)$(DELIM)nrf_modem$(DELIM)include endif DEPPATH += --dep-path board diff --git a/boards/arm/nrf91/thingy91/src/Make.defs b/boards/arm/nrf91/thingy91/src/Make.defs index 3d3ff590d9616..543ad98dc8b8c 100644 --- a/boards/arm/nrf91/thingy91/src/Make.defs +++ b/boards/arm/nrf91/thingy91/src/Make.defs @@ -34,6 +34,12 @@ endif ifeq ($(CONFIG_NRF91_MODEM),y) CSRCS += nrf91_modem.c + +# Give the board objects access to the NRFXlib headers required by the modem +# glue. The archive is downloaded into the chip directory when the feature +# is enabled, so reuse that location here as well. +NRFXLIB_DIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)sdk-nrfxlib +CFLAGS += ${INCDIR_PREFIX}$(NRFXLIB_DIR)$(DELIM)nrf_modem$(DELIM)include endif DEPPATH += --dep-path board diff --git a/boards/arm/sama5/giant-board/include/board_sdram.h b/boards/arm/sama5/giant-board/include/board_sdram.h index 2986293fdc70b..4a41a3c94a2a3 100644 --- a/boards/arm/sama5/giant-board/include/board_sdram.h +++ b/boards/arm/sama5/giant-board/include/board_sdram.h @@ -29,6 +29,26 @@ #include +#ifndef __ASSEMBLY__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +uint32_t sam_pllack_frequency(uint32_t mainclk); +uint32_t sam_plladiv2_frequency(uint32_t mainclk); +uint32_t sam_pck_frequency(uint32_t mainclk); +uint32_t sam_mck_frequency(uint32_t mainclk); + +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/arm/sama5/jupiter-nano/include/board_sdram.h b/boards/arm/sama5/jupiter-nano/include/board_sdram.h index dcf7efc89e1d9..815a1f1b4ddef 100644 --- a/boards/arm/sama5/jupiter-nano/include/board_sdram.h +++ b/boards/arm/sama5/jupiter-nano/include/board_sdram.h @@ -29,6 +29,26 @@ #include +#ifndef __ASSEMBLY__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +uint32_t sam_pllack_frequency(uint32_t mainclk); +uint32_t sam_plladiv2_frequency(uint32_t mainclk); +uint32_t sam_pck_frequency(uint32_t mainclk); +uint32_t sam_mck_frequency(uint32_t mainclk); + +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/arm/sama5/sama5d2-xult/include/board_sdram.h b/boards/arm/sama5/sama5d2-xult/include/board_sdram.h index 30465ee21be26..6c553a914a849 100644 --- a/boards/arm/sama5/sama5d2-xult/include/board_sdram.h +++ b/boards/arm/sama5/sama5d2-xult/include/board_sdram.h @@ -29,6 +29,25 @@ #include +#ifndef __ASSEMBLY__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +uint32_t sam_pllack_frequency(uint32_t mainclk); +uint32_t sam_plladiv2_frequency(uint32_t mainclk); +uint32_t sam_pck_frequency(uint32_t mainclk); +uint32_t sam_mck_frequency(uint32_t mainclk); + +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -47,22 +66,23 @@ * crystal. */ -#define BOARD_MAINCK_FREQUENCY BOARD_MAINOSC_FREQUENCY -#define BOARD_PLLA_FREQUENCY (sam_pllack_frequency(BOARD_MAINOSC_FREQUENCY)) -#define BOARD_PLLADIV2_FREQUENCY (sam_plladiv2_frequency(BOARD_MAINOSC_FREQUENCY)) -#define BOARD_PCK_FREQUENCY (sam_pck_frequency(BOARD_MAINOSC_FREQUENCY)) -#define BOARD_MCK_FREQUENCY (sam_mck_frequency(BOARD_MAINOSC_FREQUENCY)) +#define BOARD_MAINCK_FREQUENCY BOARD_MAINOSC_FREQUENCY +#define BOARD_PLLA_FREQUENCY (sam_pllack_frequency(BOARD_MAINOSC_FREQUENCY)) +#define BOARD_PLLADIV2_FREQUENCY \ + (sam_plladiv2_frequency(BOARD_MAINOSC_FREQUENCY)) +#define BOARD_PCK_FREQUENCY (sam_pck_frequency(BOARD_MAINOSC_FREQUENCY)) +#define BOARD_MCK_FREQUENCY (sam_mck_frequency(BOARD_MAINOSC_FREQUENCY)) /* Clocking to certain peripherals may be MCK/2. * * REVISIT: I am not sure why this is. Perhaps because of H32MXDIV? */ -#define BOARD_PIT_FREQUENCY (BOARD_MCK_FREQUENCY >> 1) -#define BOARD_USART_FREQUENCY (BOARD_MCK_FREQUENCY >> 1) -#define BOARD_FLEXCOM_FREQUENCY (BOARD_MCK_FREQUENCY >> 1) +#define BOARD_PIT_FREQUENCY (BOARD_MCK_FREQUENCY >> 1) +#define BOARD_USART_FREQUENCY (BOARD_MCK_FREQUENCY >> 1) +#define BOARD_FLEXCOM_FREQUENCY (BOARD_MCK_FREQUENCY >> 1) -#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \ +#if defined(CONFIG_SAMA5_EHCI) || defined(CONFIG_SAMA5_OHCI) || \ defined(CONFIG_SAMA5_UDPHS) /* The USB Host High Speed requires a 480 MHz clock (UPLLCK) for the embedded @@ -90,10 +110,10 @@ * driver is initialized. */ -# define BOARD_USE_UPLL 1 /* Use UPLL for clock source */ -# define BOARD_CKGR_UCKR_UPLLCOUNT (15) /* Maximum value */ -# define BOARD_CKGR_UCKR_BIASCOUNT (15) /* Maximum value */ -# define BOARD_UPLL_OHCI_DIV (10) /* Divide by 10 */ +#define BOARD_USE_UPLL 1 /* Use UPLL for clock source */ +#define BOARD_CKGR_UCKR_UPLLCOUNT (15) /* Maximum value */ +#define BOARD_CKGR_UCKR_BIASCOUNT (15) /* Maximum value */ +#define BOARD_UPLL_OHCI_DIV (10) /* Divide by 10 */ #endif /* ADC Configuration @@ -102,14 +122,15 @@ * PRESCAL = (MCK / (2 * ADCClock) - 1) */ -#define BOARD_ADCCLK_FREQUENCY (8000000) /* ADCCLK: MCK / ((7+1)*2) */ -#define BOARD_ADCCLK_FREQUENCY \ - ((BOARD_PLLADIV2_FREQUENCY / (2 *BOARD_PLLADIV2_FREQUENCY)) - 1) +#define BOARD_ADCCLK_FREQUENCY (8000000) /* ADCCLK: MCK / ((7+1)*2) */ +#define BOARD_ADCCLK_FREQUENCY \ + ((BOARD_PLLADIV2_FREQUENCY / (2 * BOARD_PLLADIV2_FREQUENCY)) - 1) -#define BOARD_ADC_PRESCAL (7) -#define BOARD_TSD_STARTUP (40) /* 40 nanoseconds */ -#define BOARD_TSD_TRACKTIM (2000) /* Min 1µs at 8MHz */ -#define BOARD_TSD_DEBOUNCE (10000000) /* 10 milliseconds (units nanoseconds) */ +#define BOARD_ADC_PRESCAL (7) +#define BOARD_TSD_STARTUP (40) /* 40 nanoseconds */ +#define BOARD_TSD_TRACKTIM (2000) /* Min 1µs at 8MHz */ +#define BOARD_TSD_DEBOUNCE (10000000) /* 10 milliseconds (units nanoseconds) \ + */ /* HSMCI clocking * @@ -128,17 +149,17 @@ /* Initial clock: 400 KHz (target) */ -#define HSMCI_INIT_CLKDIV sam_hsmci_clkdiv(400000) +#define HSMCI_INIT_CLKDIV sam_hsmci_clkdiv(400000) /* MMC transfer clock: 20 MHz (target) */ -#define HSMCI_MMCXFR_CLKDIV sam_hsmci_clkdiv(20000000) +#define HSMCI_MMCXFR_CLKDIV sam_hsmci_clkdiv(20000000) /* SD transfer clock: 25 MHz (target) */ -#define HSMCI_SDXFR_CLKDIV sam_hsmci_clkdiv(25000000) +#define HSMCI_SDXFR_CLKDIV sam_hsmci_clkdiv(25000000) -#define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV +#define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV /**************************************************************************** * Public Data @@ -149,8 +170,7 @@ #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" -{ +extern "C" { #else #define EXTERN extern #endif diff --git a/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h b/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h index c1f8578186a30..133a7d22a182f 100644 --- a/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h +++ b/boards/arm/sama5/sama5d3-xplained/include/board_sdram.h @@ -29,6 +29,26 @@ #include +#ifndef __ASSEMBLY__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +uint32_t sam_pllack_frequency(uint32_t mainclk); +uint32_t sam_plladiv2_frequency(uint32_t mainclk); +uint32_t sam_pck_frequency(uint32_t mainclk); +uint32_t sam_mck_frequency(uint32_t mainclk); + +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h b/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h index 329603a529416..cfe5ea2f52fbc 100644 --- a/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h +++ b/boards/arm/sama5/sama5d3x-ek/include/board_sdram.h @@ -29,6 +29,26 @@ #include +#ifndef __ASSEMBLY__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +uint32_t sam_pllack_frequency(uint32_t mainclk); +uint32_t sam_plladiv2_frequency(uint32_t mainclk); +uint32_t sam_pck_frequency(uint32_t mainclk); +uint32_t sam_mck_frequency(uint32_t mainclk); + +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/arm/sama5/sama5d4-ek/include/board_sdram.h b/boards/arm/sama5/sama5d4-ek/include/board_sdram.h index b337e858d2f31..98045aaa31a0b 100644 --- a/boards/arm/sama5/sama5d4-ek/include/board_sdram.h +++ b/boards/arm/sama5/sama5d4-ek/include/board_sdram.h @@ -29,6 +29,26 @@ #include +#ifndef __ASSEMBLY__ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +uint32_t sam_pllack_frequency(uint32_t mainclk); +uint32_t sam_plladiv2_frequency(uint32_t mainclk); +uint32_t sam_pck_frequency(uint32_t mainclk); +uint32_t sam_mck_frequency(uint32_t mainclk); + +#ifdef __cplusplus +} +#endif + +#endif /* __ASSEMBLY__ */ + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/sim/sim/sim/src/sim_gpio.c b/boards/sim/sim/sim/src/sim_gpio.c index 44e5051bd6b03..bb6fce820ddc9 100644 --- a/boards/sim/sim/sim/src/sim_gpio.c +++ b/boards/sim/sim/sim/src/sim_gpio.c @@ -131,7 +131,7 @@ static struct simgpint_dev_s g_gpint = * Private Functions ****************************************************************************/ -static int sim_interrupt(wdparm_t arg) +static void sim_interrupt(wdparm_t arg) { struct simgpint_dev_s *simgpint = (struct simgpint_dev_s *)arg; @@ -139,7 +139,6 @@ static int sim_interrupt(wdparm_t arg) gpioinfo("Interrupt! callback=%p\n", simgpint->callback); simgpint->callback(&simgpint->simgpio.gpio, simgpint->simgpio.id); - return OK; } static int gpin_read(struct gpio_dev_s *dev, bool *value) diff --git a/drivers/video/isx019.c b/drivers/video/isx019.c index c02ce3e8f7a13..a531490e3c8fe 100644 --- a/drivers/video/isx019.c +++ b/drivers/video/isx019.c @@ -2593,18 +2593,18 @@ static int calc_spot_position_regval(uint16_t val, static int set_spot_position(FAR isx019_dev_t *priv, imgsensor_value_t val) { - uint8_t regval; - uint8_t reg_x; - uint8_t reg_y; - uint16_t w; - uint16_t h; - uint16_t clip_w; - uint16_t clip_h; - uint16_t offset_x; - uint16_t offset_y; + uint8_t regval = 0; + uint8_t reg_x = 0; + uint8_t reg_y = 0; + uint16_t w = 0; + uint16_t h = 0; + uint16_t clip_w = 0; + uint16_t clip_h = 0; + uint16_t offset_x = 0; + uint16_t offset_y = 0; uint16_t x = (uint16_t)(val.value32 >> 16); uint16_t y = (uint16_t)(val.value32 & 0xffff); - int split; + int split = 0; /* Spot position of ISX019 is divided into 9x7 sections. * - Horizontal direction is divided into 9 sections. @@ -3319,18 +3319,18 @@ static uint32_t restore_spot_position(uint16_t regval, static int get_spot_position(FAR isx019_dev_t *priv, FAR imgsensor_value_t *val) { - uint8_t regval; - uint8_t regx; - uint8_t regy; - uint16_t w; - uint16_t h; - uint32_t x; - uint32_t y; - uint16_t clip_w; - uint16_t clip_h; - uint16_t offset_x; - uint16_t offset_y; - int split; + uint8_t regval = 0; + uint8_t regx = 0; + uint8_t regy = 0; + uint16_t w = 0; + uint16_t h = 0; + uint32_t x = 0; + uint32_t y = 0; + uint16_t clip_w = 0; + uint16_t clip_h = 0; + uint16_t offset_x = 0; + uint16_t offset_y = 0; + int split = 0; isx019_i2c_read(priv, CAT_CATAE, SPOT_FRM_NUM, ®val, 1); diff --git a/drivers/wireless/lpwan/sx127x/sx127x.c b/drivers/wireless/lpwan/sx127x/sx127x.c index 8d4e1181bda7d..06126c0996007 100644 --- a/drivers/wireless/lpwan/sx127x/sx127x.c +++ b/drivers/wireless/lpwan/sx127x/sx127x.c @@ -1286,7 +1286,8 @@ static int sx127x_poll(FAR struct file *filep, FAR struct pollfd *fds, * ****************************************************************************/ -#ifdef CONFIG_LPWAN_SX127X_RXSUPPORT +#if defined(CONFIG_LPWAN_SX127X_RXSUPPORT) && \ + CONFIG_LPWAN_SX127X_RX_TIMEOUT > 0 static void sx127x_rx_watchdog(FAR void *arg) { FAR struct sx127x_dev_s *dev = (FAR struct sx127x_dev_s *)arg; @@ -1320,7 +1321,7 @@ static void sx127x_rx_watchdog(FAR void *arg) sx127x_rx_watchdog, dev, MSEC2TICK(dev->rx_timeout)); } -#endif +#endif /* CONFIG_LPWAN_SX127X_RXSUPPORT && CONFIG_LPWAN_SX127X_RX_TIMEOUT > 0 */ /**************************************************************************** * Name: sx127x_lora_isr0_process @@ -1519,6 +1520,7 @@ static int sx127x_fskook_isr0_process(FAR struct sx127x_dev_s *dev) { /* Should we take care of RX timeout? */ +#if CONFIG_LPWAN_SX127X_RX_TIMEOUT > 0 if (dev->rx_timeout > 0) { /* Keep a track of last RX time to detect timeout */ @@ -1531,6 +1533,7 @@ static int sx127x_fskook_isr0_process(FAR struct sx127x_dev_s *dev) sx127x_rx_watchdog, dev, MSEC2TICK(dev->rx_timeout)); } +#endif if (dev->pfd) { @@ -4268,7 +4271,9 @@ static int sx127x_deinit(FAR struct sx127x_dev_s *dev) #ifdef CONFIG_LPWAN_SX127X_RXSUPPORT /* Cancel any running watchdog */ +# if CONFIG_LPWAN_SX127X_RX_TIMEOUT > 0 work_cancel(LPWORK, &dev->rx_watchdog); +# endif #endif /* Enter SLEEP mode */ @@ -4626,7 +4631,9 @@ static int sx127x_unregister(FAR struct sx127x_dev_s *dev) nxsem_destroy(&dev->tx_sem); #endif #ifdef CONFIG_LPWAN_SX127X_RXSUPPORT +# if CONFIG_LPWAN_SX127X_RX_TIMEOUT > 0 work_cancel(LPWORK, &dev->rx_watchdog); +# endif nxsem_destroy(&dev->rx_sem); nxmutex_destroy(&dev->rx_buffer_lock); #endif diff --git a/include/nuttx/video/imgdata.h b/include/nuttx/video/imgdata.h index 99a80338d3712..eb4130af51be9 100644 --- a/include/nuttx/video/imgdata.h +++ b/include/nuttx/video/imgdata.h @@ -56,7 +56,7 @@ #define IMGDATA_UNINIT(d) \ ((d)->ops->uninit ? (d)->ops->uninit(d) : -ENOTTY) #define IMGDATA_SET_BUF(d, n, f, a, s) \ - ((d)->ops->set_buf ? (d)->ops->set_buf(d, n, f, a, s) : NULL) + ((d)->ops->set_buf ? (d)->ops->set_buf(d, n, f, a, s) : -ENOTTY) #define IMGDATA_VALIDATE_FRAME_SETTING(d, n, f, i) \ ((d)->ops->validate_frame_setting ? \ (d)->ops->validate_frame_setting(d, n, f, i) : -ENOTTY) diff --git a/net/pkt/pkt_recvmsg.c b/net/pkt/pkt_recvmsg.c index 57cf3471de1ab..633978c1a5158 100644 --- a/net/pkt/pkt_recvmsg.c +++ b/net/pkt/pkt_recvmsg.c @@ -154,7 +154,7 @@ static inline void pkt_add_recvlen(FAR struct pkt_recvfrom_s *pstate, static void pkt_recvfrom_newdata(FAR struct net_driver_s *dev, FAR struct pkt_recvfrom_s *pstate) { - unsigned int offset = 0; + int offset = 0; size_t recvlen; #ifdef CONFIG_NET_TIMESTAMP diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index f91681bbbd522..e2587bb060134 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -15,56 +15,66 @@ # License for the specific language governing permissions and limitations # under the License. -FROM ubuntu:22.04 AS builder-base +FROM ubuntu:24.04 AS builder-base # NOTE WE ARE NOT REMOVING APT CACHE. # This should only be used for temp build images that artifacts will be copied from +ENV DEBIAN_FRONTEND="noninteractive" RUN apt-get update -qq && apt-get install -y -qq \ curl \ patch \ - xz-utils + xz-utils \ + bzip2 \ + git \ + build-essential ############################################################################### # Base image that should be used to prepare tools from nuttx-tools ############################################################################### FROM builder-base AS nuttx-tools -RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ +RUN apt-get update -qq && apt-get install -y -qq \ bison \ clang \ cmake \ flex \ g++ \ gawk \ - git \ gperf \ - libncurses5-dev \ + libncurses-dev \ make \ ninja-build \ nodejs \ npm \ unzip \ zip \ - python3 + python3 \ + python3-pip \ + python3-venv RUN mkdir -p /tools WORKDIR /tools +# NuttX 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 +# Bloaty RUN mkdir -p /tools/bloaty \ - && git clone --depth 1 --branch v1.1 https://github.com/google/bloaty bloaty-src \ + && git clone --depth 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 +# Kconfig Frontends +# Note: kconfig-frontends is sensitive to gperf versions, but generally works on 24.04 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 +# GN RUN mkdir -p /tools/gn \ && cd /tools/gn \ && git clone https://gn.googlesource.com/gn gn \ @@ -73,22 +83,23 @@ RUN mkdir -p /tools/gn \ && python3 build/gen.py \ && ninja -C out -# Upgrade nodejs to the stable version we need before install zap -RUN npm install -g n && n 20.10.0 node && hash -r +# Install Zap +# 24.04 has a recent node, but we ensure specific version management +RUN npm install -g n && n 24.13.0 node && hash -r 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 \ + && curl -s -O -L https://github.com/project-chip/zap/releases/download/v2025.12.02/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 \ + && curl -s -O -L https://github.com/project-chip/zap/archive/refs/tags/v2025.12.02.zip \ + && unzip v2025.12.02.zip \ + && mv zap-2025.12.02 zap \ + && rm v2025.12.02.zip \ && cd zap && npm install cross-spawn folder-hash ######################### @@ -105,27 +116,19 @@ RUN mkdir -p $CARGO_HOME \ && $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 -# ENV SWIFT_HOME=/tools/swift -# RUN mkdir -p ${SWIFT_HOME} \ -# && curl -s -O -L https://download.swift.org/swift-6.0-branch/ubuntu2204/swift-${SWIFT_VERSION}/swift-${SWIFT_VERSION}-ubuntu22.04.tar.gz \ -# && tar xzf swift-${SWIFT_VERSION}-ubuntu22.04.tar.gz -C ${SWIFT_HOME} \ -# && rm swift-${SWIFT_VERSION}-ubuntu22.04.tar.gz - -# Install Zig latest release -ENV ZIG_VERSION=0.13.0 +# Install Zig latest release (0.14.0) +ENV ZIG_VERSION=0.14.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 \ + && curl -s -O -L https://github.com/marler8997/zigup/releases/download/v2025_05_24/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 +# Install LDC2 latest release (1.41.0) +ENV LDC_VERSION=1.41.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 \ @@ -138,7 +141,6 @@ CMD [ "/bin/bash" ] # Base image that should be used to prepare arch build images ############################################################################### FROM builder-base AS nuttx-toolchain-base - RUN mkdir -p /tools WORKDIR /tools @@ -146,33 +148,29 @@ WORKDIR /tools # Build image for tool required by ARM builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-arm -# Download the latest ARM clang toolchain prebuilt by ARM +# ARM Clang 19.1.5 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" \ + curl -s -L "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases/download/release-19.1.5/LLVM-ET-Arm-19.1.5-Linux-x86_64.tar.xz" \ | tar -C clang-arm-none-eabi --strip-components 1 -xJ -# Download the latest ARM GCC toolchain prebuilt by ARM +# ARM GCC 14.3 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" \ + curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/14.3.Rel1/binrel/arm-gnu-toolchain-14.3.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 +# ARM64 GCC 14.3 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" \ + curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/14.3.Rel1/binrel/arm-gnu-toolchain-14.3.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 ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-avr32 -# Download the prebuilt AVR32 GCC toolchain -RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ - git -# Clone Main Repository RUN mkdir -p gcc-avr32-gnu && \ git clone --depth 1 https://github.com/ramangopalan/avr32-gnu-toolchain-linux_x86 gcc-avr32-gnu @@ -180,17 +178,17 @@ RUN mkdir -p gcc-avr32-gnu && \ # Build image for tool required by Pinguino builds ############################################################################### 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 ############################################################################### # Build image for tool required by Renesas builds +# CRITICAL: We use ubuntu:22.04 here because compiling GCC 8.3 sources +# fails on Ubuntu 24.04 due to newer system compiler and texinfo versions. ############################################################################### -FROM nuttx-toolchain-base AS nuttx-toolchain-renesas -# Build Renesas RX GCC toolchain +FROM ubuntu:22.04 AS nuttx-toolchain-renesas + RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ bison \ flex \ @@ -201,21 +199,21 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q make \ texinfo \ wget \ - bzip2 + bzip2 \ + curl -# 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 + | tar -C /tools/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 + | tar -C /tools/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 + | tar -C /tools/renesas-tools/source/newlib --strip-components=1 -xz # Install binutils -RUN cd renesas-tools/source/binutils && \ +RUN cd /tools/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 &&\ @@ -223,7 +221,7 @@ RUN cd renesas-tools/source/binutils && \ ENV PATH="/tools/renesas-toolchain/rx-elf-gcc/bin:$PATH" # Install gcc -RUN cd renesas-tools/source/gcc && \ +RUN cd /tools/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 && \ @@ -236,7 +234,7 @@ RUN cd renesas-tools/source/gcc && \ ENV PATH="/tools/renesas-toolchain/rx-elf-gcc/bin:$PATH" # Install newlib -RUN cd renesas-tools/source/newlib && \ +RUN cd /tools/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 && \ @@ -248,27 +246,26 @@ RUN cd /tools/renesas-tools/build/gcc && \ # Build image for tool required by RISCV builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-riscv -# Download the latest RISCV GCC toolchain prebuilt by xPack +# RISCV GCC 14.3.0-1 RUN mkdir -p riscv-none-elf-gcc && \ - curl -s -L "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.2.0-3/xpack-riscv-none-elf-gcc-14.2.0-3-linux-x64.tar.gz" \ + curl -s -L "https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.3.0-1/xpack-riscv-none-elf-gcc-14.3.0-1-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" \ + curl -s -L "https://www.gaisler.com/anonftp/bcc2/bin/bcc-2.2.4-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, ESP32-S2 and ESP32-S3 GCC toolchain prebuilt by Espressif +# ESP 14.2.0 RUN mkdir -p xtensa-esp-elf-gcc && \ - curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/xtensa-esp-elf-14.2.0_20241119-x86_64-linux-gnu.tar.xz" \ + curl -s -L "https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20251219/xtensa-esp-elf-14.2.0_20251219-x86_64-linux-gnu.tar.xz" \ | tar -C xtensa-esp-elf-gcc --strip-components 1 -xJ RUN echo "ESP Binaries: 2022/01/26" @@ -286,21 +283,20 @@ RUN mkdir -p /tools/blobs && cd /tools/blobs \ # 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 +# Upgrade to WASI SDK 29.0 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" \ + curl -s -L "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-29/wasi-sdk-29.0-x86_64-linux.tar.gz" \ | tar -C wasi-sdk --strip-components 1 -xz -# Download the latest "wamrc" AOT compiler prebuilt by WAMR +# WAMR 2.4.4 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" \ + curl -s -L "https://github.com/bytecodealliance/wasm-micro-runtime/releases/download/WAMR-2.4.4/wamrc-2.4.4-x86_64-ubuntu-22.04.tar.gz" \ | tar -C wamrc -xz ############################################################################### # Build image for tool required by Raspberry Pi pico-sdk builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-raspberrypi-pico-sdk -# Download the latest pico-sdk source archive RUN mkdir -p pico-sdk && \ curl -s -L "https://github.com/raspberrypi/pico-sdk/releases/download/2.2.0/pico-sdk-2.2.0.tar.gz" \ | tar -C pico-sdk --strip-components 1 -xz @@ -309,67 +305,62 @@ RUN mkdir -p pico-sdk && \ # Build image for tool required by Raspberry Pi picotool builds ############################################################################### FROM nuttx-toolchain-base AS nuttx-toolchain-raspberrypi-picotool -# Download the prebuilt Raspberry Pi picotool RUN mkdir -p picotool && \ - curl -s -L "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.2.0-0/picotool-2.2.0-x86_64-lin.tar.gz" \ + curl -s -L "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.2.0-3/picotool-2.2.0-a4-x86_64-lin.tar.gz" \ | tar -C picotool --strip-components 1 -xz ############################################################################### -# Final Docker image used for running CI system. This includes all toolchains -# supported by the CI system. +# Final Docker image used for running CI system. ############################################################################### -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL maintainer="dev@nuttx.apache.org" -RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ - build-essential \ - curl \ - gcc \ - libssl-dev - -RUN mkdir -p cmake && \ - curl -s -L 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 - +# Enable i386 architecture RUN dpkg --add-architecture i386 -# This is used for the final images so make sure to not store apt cache -# Note: xtensa-esp32-elf-gdb is linked to libpython2.7 + +# Install dependencies +# Note: libncurses5-dev replaced by libncurses-dev +# Note: python2 libraries removed +# Note: cmake is installed via apt (version in noble is > 3.26) RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" TZ=Etc/UTC apt-get install -y -qq --no-install-recommends \ -o APT::Immediate-Configure=0 \ avr-libc \ + build-essential \ ccache \ - clang \ - clang-tidy \ - g++-12-multilib \ + cmake \ + curl \ gcc-avr \ - gcc-12-multilib \ + gcc-multilib \ + g++-multilib \ genromfs \ gettext \ git \ + gnupg \ lib32z1-dev \ libasound2-dev libasound2-dev:i386 \ libc6-dev-i386 \ libcurl4-openssl-dev \ libmp3lame-dev:i386 \ libmad0-dev:i386 \ - libncurses5-dev \ + libncurses-dev \ libpulse-dev libpulse-dev:i386 \ - libpython2.7 \ - libtinfo5 \ + libtinfo6 \ libusb-1.0-0-dev libusb-1.0-0-dev:i386 \ libv4l-dev libv4l-dev:i386 \ libx11-dev libx11-dev:i386 \ libxext-dev libxext-dev:i386 \ linux-headers-generic \ linux-libc-dev:i386 \ + lsb-release \ ninja-build \ npm \ qemu-system-arm \ qemu-system-misc \ python3 \ python3-pip \ + python3-venv \ python-is-python3 \ + software-properties-common \ u-boot-tools \ unzip \ wget \ @@ -380,30 +371,64 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" TZ=Etc/UTC apt-get in zip \ && 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 && \ - update-alternatives --set c++ /usr/bin/g++ +# Add LLVM repository for clang-21 (Targeting Noble) +# Note: Clang-21 is a snapshot, ensured repo is noble +RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc +RUN echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | tee /etc/apt/sources.list.d/llvm.list +RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ + clang-21 \ + clang++-21 \ + clang-tidy-21 \ + && rm -rf /var/lib/apt/lists/* + +# Set Clang-21 as Default clang compiler +RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 50 && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 50 && \ + update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-21 50 -# Configure out base setup for adding python packages +# Install GCC 14 from Ubuntu packages +RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ + gcc-14 \ + g++-14 \ + && rm -rf /var/lib/apt/lists/* + +# Remove existing cpp symlinks to avoid circular reference +RUN rm -f /lib/cpp /usr/bin/cpp /etc/alternatives/cpp + +# Set up update-alternatives for GCC 14 and system GCC 13 +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 50 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 50 && \ + update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-14 100 && \ + update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-13 50 && \ + update-alternatives --install /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-14 100 && \ + update-alternatives --install /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-13 50 && \ + update-alternatives --install /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-14 100 && \ + update-alternatives --install /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-13 50 && \ + update-alternatives --install /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-14 100 && \ + update-alternatives --install /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-13 50 && \ + update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-14 100 && \ + update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 50 && \ + update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-14 100 && \ + update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-13 50 && \ + update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-14 100 && \ + update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-13 50 && \ + update-alternatives --install /usr/bin/lto-dump lto-dump /usr/bin/lto-dump-14 100 && \ + update-alternatives --install /usr/bin/lto-dump lto-dump /usr/bin/lto-dump-13 50 + +# Configure Python Environment +# PEP 668 in Ubuntu 24.04 prevents global pip install. +# We explicitly allow breaking system packages for this CI container. +ENV PIP_BREAK_SYSTEM_PACKAGES=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=true -# This disables the cache with value 0. We do not want caching as it -# increases the images size. ENV PIP_NO_CACHE_DIR=0 -# We are using the minimal python installation from the system so include -# setuptools and also wheel so we can use the binary releases of packages -# instead of requiring them to be compiled. -RUN pip3 install setuptools -RUN pip3 install wheel + +RUN pip3 install --upgrade --ignore-installed pip setuptools wheel + +# Install Python Tools RUN pip3 install cmake-format -# Install CodeChecker and use it to statically analyze the code. -# RUN pip3 install CodeChecker -# Install cvt2utf to check for non-UTF characters. RUN pip3 install cvt2utf -# Install pytest RUN pip3 install cxxfilt RUN pip3 install construct RUN pip3 install esptool==4.8.dev4 @@ -416,112 +441,87 @@ RUN pip3 install pytest==6.2.5 RUN pip3 install pytest-json==0.4.0 RUN pip3 install pytest-ordering==0.6 RUN pip3 install pytest-repeat==0.9.1 -# Install lark stringcase jinja2 and coloredlogs for matter build RUN pip3 install lark RUN pip3 install stringcase RUN pip3 install jinja2 RUN pip3 install coloredlogs -# Upgrade nodejs to the stable version we need -RUN npm install -g n && n 20.10.0 node && hash -r - -# Used to generate symbol table files +# Upgrade nodejs +RUN npm install -g n && n 24.13.0 node && hash -r +# Prepare Tools Directory RUN mkdir -p /tools WORKDIR /tools -# Pull in the tools we just built for nuttx +# COPY Tools from stages COPY --from=nuttx-tools /tools/bloaty/ bloaty/ ENV PATH="/tools/bloaty/bin:$PATH" COPY --from=nuttx-tools /tools/kconfig-frontends/ kconfig-frontends/ ENV PATH="/tools/kconfig-frontends/bin:$PATH" -# Pull in the Rust toolchain including supported targets COPY --from=nuttx-tools /tools/rust/ /tools/rust/ ENV CARGO_HOME=/tools/rust/cargo ENV RUSTUP_HOME=/tools/rust/rustup ENV PATH="/tools/rust/cargo/bin:$PATH" -# Pull in the Zig v0.13.0 toolchain COPY --from=nuttx-tools /tools/zig/ /tools/zig/ ENV PATH="/tools/zig/0.13.0/files:$PATH" -# Pull in the ldc2 1.39.0 toolchain COPY --from=nuttx-tools /tools/ldc2/ /tools/ldc2/ 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/usr/bin:$PATH" - -# ARM clang toolchain +# ARM Toolchains COPY --from=nuttx-toolchain-arm /tools/clang-arm-none-eabi/ clang-arm-none-eabi/ -# RUN cp /usr/bin/clang-extdef-mapping-10 clang-arm-none-eabi/bin/clang-extdef-mapping ENV PATH="/tools/clang-arm-none-eabi/bin:$PATH" -# ARM GCC toolchain COPY --from=nuttx-toolchain-arm /tools/gcc-arm-none-eabi/ gcc-arm-none-eabi/ ENV PATH="/tools/gcc-arm-none-eabi/bin:$PATH" -# ARM64 toolchain COPY --from=nuttx-toolchain-arm64 /tools/gcc-aarch64-none-elf/ gcc-aarch64-none-elf/ ENV PATH="/tools/gcc-aarch64-none-elf/bin:$PATH" -# AVR32 toolchain +# Other Toolchains COPY --from=nuttx-toolchain-avr32 /tools/gcc-avr32-gnu/ gcc-avr32-gnu/ ENV PATH="/tools/gcc-avr32-gnu/bin:$PATH" -# MIPS toolchain COPY --from=nuttx-toolchain-pinguino /tools/pinguino-compilers/p32/ pinguino-compilers/p32/ ENV PATH="/tools/pinguino-compilers/p32/bin:$PATH" -# Renesas toolchain COPY --from=nuttx-toolchain-renesas /tools/renesas-toolchain/rx-elf-gcc/ renesas-toolchain/rx-elf-gcc/ ENV PATH="/tools/renesas-toolchain/rx-elf-gcc/bin:$PATH" -# RISCV toolchain COPY --from=nuttx-toolchain-riscv /tools/riscv-none-elf-gcc/ riscv-none-elf-gcc/ ENV PATH="/tools/riscv-none-elf-gcc/bin:$PATH" -# SPARC toolchain COPY --from=nuttx-toolchain-sparc /tools/sparc-gaisler-elf-gcc/ sparc-gaisler-elf-gcc/ ENV PATH="/tools/sparc-gaisler-elf-gcc/bin:$PATH" -# ESP32, ESP32-S2, ESP32-S3 toolchain COPY --from=nuttx-toolchain-esp32 /tools/xtensa-esp-elf-gcc/ xtensa-esp-elf-gcc/ ENV PATH="/tools/xtensa-esp-elf-gcc/bin:$PATH" RUN mkdir -p /tools/blobs/esp-bins COPY --from=nuttx-toolchain-esp32 /tools/blobs/* /tools/blobs/esp-bins/ -# WASI-enabled WebAssembly C/C++ toolchain COPY --from=nuttx-toolchain-wasm /tools/wasi-sdk/ wasi-sdk/ ENV WASI_SDK_PATH="/tools/wasi-sdk" ENV PATH="/tools/wamr:$PATH" -COPY --from=nuttx-toolchain-esp32 /tools/blobs/* /tools/blobs/esp-bins/ -# Raspberry Pi pico-sdk source COPY --from=nuttx-toolchain-raspberrypi-pico-sdk /tools/pico-sdk/ pico-sdk/ ENV PICO_SDK_PATH="/tools/pico-sdk" -# Raspberry Pi picotool COPY --from=nuttx-toolchain-raspberrypi-picotool /tools/picotool/ picotool/ ENV PATH="/tools/picotool:$PATH" -# gn tool -RUN mkdir -p /tools/gn COPY --from=nuttx-tools /tools/gn/gn/out/gn /tools/gn ENV PATH="/tools/gn:$PATH" -# ZAP tool and nodejs packet COPY --from=nuttx-tools /tools/zap/ /tools/zap/ COPY --from=nuttx-tools /tools/zap_release/ /tools/zap_release/ ENV ZAP_INSTALL_PATH=/tools/zap_release ENV ZAP_DEVELOPMENT_PATH=/tools/zap -# Configure ccache -# use `/ccache` as cachedir for all users +# Configure Ccache RUN mkdir -p /ccache && \ chmod 666 /ccache && \ mkdir -p /tools/ccache/bin && \