I have created a small Rust program that I intend to call from C code running on a Nordic nRF52 SoC (
cargo build target=thumbv7em-none-eabihf). I've built the program as a static library (
crate-type = ["staticlib"]) having read the Rust embedded book a few times. I then add the resultant archive (
lib.a) to a Segger IDE C based project. When I do, and then attempt to link, the Segger linker reports:
Exception table sections and plain sections cannot be mixed
Is the linker complaining about the presence of
ARM.exidx.text sections in my Rust library archive?
If I build a static library in a similar fashion, but using C and from within the Segger IDE, then all is well. I suspect that I'm not setting up my Rust project correctly somehow.
Thanks for any pointers.
Related: My question on the Segger IDE forum.