Closed Abdillah closed 4 years ago
I believe you need to create .cargo/config
, build.rs
and memory.x
. See esp32-hal as a reference.
Thanks @jessebraham, the missing files helped, but only for release build.
$ rustup run xtensa cargo xbuild --target=xtensa-esp8266-none-elf --example blinky --release
When building for debug mode, it stopped on " CFI is not supported for this target" error. Maybe related to https://github.com/espressif/llvm-project/issues/6.
error: linking with `xtensa-lx106-elf-gcc` failed: exit code: 1
note: "xtensa-lx106-elf-gcc" "-c" "-o" "/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.o" "/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s"
note: /path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s: Assembler messages:
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:9: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:10: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:13: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:17: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:25: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:28: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:33: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:41: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:44: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/void-38d517da1ddd30e9.void.d1uf8dys-cgu.0.rcgu.s:49: Error: CFI is not supported for this target
thread '' panicked at 'src/librustc_codegen_ssa/back/write.rs:1544: worker thread panicked', src/librustc/util/bug.rs:37:26
stack backtrace:
thread '' panicked at 'src/librustc_codegen_ssa/back/write.rs:1544: worker thread panicked', src/librustc/util/bug.rs:37:26
stack backtrace:
error: linking with `xtensa-lx106-elf-gcc` failed: exit code: 1
note: "xtensa-lx106-elf-gcc" "-c" "-o" "/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.o" "/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s"
note: /path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s: Assembler messages:
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:17: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:18: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:21: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:23: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:92: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:102: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:105: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:122: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:131: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:134: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:151: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:162: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:165: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:167: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:225: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:237: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:240: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:242: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:283: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:293: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:296: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:298: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:358: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:366: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:374: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:384: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:387: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:413: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:424: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:427: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:429: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:452: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:461: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:464: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:488: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:499: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:502: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:504: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:527: Error: CFI is not supported for this target
/path/to/workspace/esp8266-hal/target/xtensa-esp8266-none-elf/debug/deps/r0-7ba1f4546bdc7b6e.r0.c64d2jh4-cgu.0.rcgu.s:536: Error: CFI is not supported for this target
A blinky example has been added
This example contains valid Rust syntax. But, I currently struggle for the linking process, it failed using
cargo xbuild
.