From 4276ca9c412dcec7c743e9a924dfc7e200df8ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Sun, 26 Nov 2023 18:54:31 +0100 Subject: [PATCH] Backtrack on the S2 changes --- esp-wifi/.cargo/config.toml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/esp-wifi/.cargo/config.toml b/esp-wifi/.cargo/config.toml index 3fa4a4d2..4bf6c864 100644 --- a/esp-wifi/.cargo/config.toml +++ b/esp-wifi/.cargo/config.toml @@ -5,14 +5,14 @@ # - `embassy-executor-thread` on Xtensa chips to take advantage of the Xtensa specific executor we have in esp-hal [alias] esp32 = "run --features esp32 --target xtensa-esp32-none-elf --features esp32-hal/default,esp32-hal/embassy-time-timg0,esp32-hal/embassy-executor-thread" -esp32s2 = "run --features esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2-hal/default,esp32s2-hal/embassy-time-timg0,esp32s2-hal/embassy-executor-thread,portable-atomic/critical-section" +esp32s2 = "run --features esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2-hal/default,esp32s2-hal/embassy-time-timg0,esp32s2-hal/embassy-executor-thread" esp32s3 = "run --features esp32s3 --target xtensa-esp32s3-none-elf --features esp32s3-hal/default,esp32s3-hal/embassy-time-timg0,esp32s3-hal/embassy-executor-thread" esp32c2 = "run --features esp32c2 --target riscv32imc-unknown-none-elf --features esp32c2-hal/default,esp32c2-hal/embassy-time-timg0,portable-atomic/critical-section" esp32c3 = "run --features esp32c3 --target riscv32imc-unknown-none-elf --features esp32c3-hal/default,esp32c3-hal/embassy-time-timg0,portable-atomic/critical-section" esp32c6 = "run --features esp32c6 --target riscv32imac-unknown-none-elf --features esp32c6-hal/default,esp32c6-hal/embassy-time-timg0" besp32 = "build --features esp32 --target xtensa-esp32-none-elf --features esp32-hal/default,esp32-hal/embassy-time-timg0,esp32-hal/embassy-executor-thread" -besp32s2 = "build --features esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2-hal/default,esp32s2-hal/embassy-time-timg0,esp32s2-hal/embassy-executor-thread,portable-atomic/critical-section" +besp32s2 = "build --features esp32s2 --target xtensa-esp32s2-none-elf --features esp32s2-hal/default,esp32s2-hal/embassy-time-timg0,esp32s2-hal/embassy-executor-thread" besp32s3 = "build --features esp32s3 --target xtensa-esp32s3-none-elf --features esp32s3-hal/default,esp32s3-hal/embassy-time-timg0,esp32s3-hal/embassy-executor-thread" besp32c2 = "build --features esp32c2 --target riscv32imc-unknown-none-elf --features esp32c2-hal/default,esp32c2-hal/embassy-time-timg0,portable-atomic/critical-section" besp32c3 = "build --features esp32c3 --target riscv32imc-unknown-none-elf --features esp32c3-hal/default,esp32c3-hal/embassy-time-timg0,portable-atomic/critical-section" @@ -53,6 +53,25 @@ runner = "espflash flash --monitor" rustflags = [ "-C", "link-arg=-Tlinkall.x", "-C", "link-arg=-Trom_functions.x", + "-C", "force-frame-pointers", + + # TODO: these should be removed but heapless 0.7 would fail to compile without it + # Enable the atomic codegen option for Xtensa. + "-C", "target-feature=+s32c1i", + + # tell the core library have atomics even though it's not specified in the target definition + "--cfg", "target_has_atomic_load_store", + "--cfg", 'target_has_atomic_load_store="8"', + "--cfg", 'target_has_atomic_load_store="16"', + "--cfg", 'target_has_atomic_load_store="32"', + "--cfg", 'target_has_atomic_load_store="ptr"', + # Tell the `core` library that we have atomics, even though it's not + # specified in the target definition + "--cfg", 'target_has_atomic', + "--cfg", 'target_has_atomic="8"', + "--cfg", 'target_has_atomic="16"', + "--cfg", 'target_has_atomic="32"', + "--cfg", 'target_has_atomic="ptr"', ] [unstable]