I used to run bare-metal C/C++ application on Xilinx ZYNQ7000 chip. Now I want to try it also with rust. As the first step, I just want to create a static library (for a sum function) in rust language.
I can crate the library, but when I try to call the library in the C/C++ project, it reports some error related to Hard floating points. In my current Xilinx compiler settings, it is as follow -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard
while in rust, I can only find the the tool chain "armv7a-none-eabi", not a hf version.
Is there any suggestion on how to generate a hf version of rust library?
Thank you for the information. I tried to use rustup target add armv7a-none-eabihf command to add the toolchain. But the error happened. Could give further suggestion on how to use it?
It looks like the standard library doesn't come pre-compiled for your target. I've never had to deal with this myself, but some quick searching suggests that running
It looks like people encountered this error when trying to build for ARM-based Macs (e.g. here), so you might have luck searching for those cases and trying to adapt for your case.
Thank you for the hint! Now it works on my setup, I have not try on my board but at least it can pass the compiling stage and generate the binary file.
Below are the steps I followed (In case others may also need this)