Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

WIP: Add blinky example #1

Closed
wants to merge 3 commits into from
Closed

Conversation

Abdillah
Copy link

This example contains valid Rust syntax.
But, I currently struggle for the linking process, it failed using cargo xbuild.

@jessebraham
Copy link
Member

I believe you need to create .cargo/config, build.rs and memory.x. See esp32-hal as a reference.

@Abdillah Abdillah changed the title Add blinky example WIP: Add blinky example Apr 10, 2020
The "crt1-sim.so and _vectors.so not found" error resolved.
But, the CIF not supported on debug build still appeared.
@Abdillah
Copy link
Author

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 espressif/llvm-project#6.

Debug Build Error Log
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

@icewind1991
Copy link
Member

A blinky example has been added

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants