diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d14cd0b..021afc2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - zephyr_version: [3.6.0, 3.5.0, 3.4.0, 2.7.3, 2.3.0] + zephyr_version: [3.7.0, 2.7.3, 2.3.0] board: [qemu_x86, qemu_cortex_m3, qemu_cortex_r5, nucleo_l552ze_q, native_posix, qemu_riscv32, qemu_riscv64] test: [samples/rust-app, samples/no_std, samples/serial] exclude: @@ -20,28 +20,16 @@ jobs: zephyr_version: 2.3.0 - board: qemu_riscv64 zephyr_version: 2.3.0 - - board: qemu_riscv32 - zephyr_version: 2.4.0 - - board: qemu_riscv64 - zephyr_version: 2.4.0 - - board: qemu_riscv32 - zephyr_version: 2.5.0 - - board: qemu_riscv64 - zephyr_version: 2.5.0 - - board: qemu_riscv32 - zephyr_version: 2.6.0 - - board: qemu_riscv64 - zephyr_version: 2.6.0 - board: qemu_riscv32 zephyr_version: 2.7.3 - board: qemu_riscv64 zephyr_version: 2.7.3 + # serial/uart does not exist on posix - board: native_posix test: samples/serial + # posix has header issues on Zephyr 3.x - board: native_posix - zephyr_version: 3.5.0 - - board: native_posix - zephyr_version: 3.6.0 + zephyr_version: 3.7.0 include: - fails: false - run: false diff --git a/Kconfig b/Kconfig index 68ec6f4..ccb0489 100644 --- a/Kconfig +++ b/Kconfig @@ -1,12 +1,26 @@ menuconfig RUST bool "Rust" select THREAD_CUSTOM_DATA - select CPLUSPLUS - select PICOLIBC_USE_MODULE if PICOLIBC + # Static initializers for Zephyr >=3.7 + select STATIC_INIT_GNU if TOOLCHAIN_SUPPORTS_STATIC_INIT_GNU + # Static initializers for Zephyr 2.x + select CPLUSPLUS if !TOOLCHAIN_SUPPORTS_STATIC_INIT_GNU help Rust language support. if RUST + +# Define this choice to use PICOLIBC_USE_MODULE on 3.7 and be compatible with 2.x +# This breaks older 3.x versions because PICOLIBC_SOURCE is not a choice there +# It is not possible to use 'select' with a 'choice' +choice PICOLIBC_SOURCE + prompt "Source of Picolibc" + default PICOLIBC_USE_MODULE + +config PICOLIBC_USE_MODULE + bool "Picolibc from module" +endchoice + choice RUST_GLOBAL_ALLOCATOR prompt "Rust global allocator" default RUST_ALLOC_POOL if USERSPACE