#RustLang runs OK on #BL602 IoT SDK ... After creating custom target "riscv32imacf-unknown-none-elf" yay! 🎉
https://github.com/lupyuen/bl_iot_sdk/tree/rust/customer_app/sdk_app_rust
More about #RustLang Custom Targets...
https://docs.rust-embedded.org/embedonomicon/custom-target.html
Why is #BL602 designated RV32-IMACFX ? Here's the #RISCV alphabet soup...
https://en.wikipedia.org/wiki/RISC-V#ISA_base_and_extensions
Here's our #RustLang Blinky Firmware for #RISCV #BL602 IoT SDK
https://github.com/lupyuen/bl_iot_sdk/blob/rust/customer_app/sdk_app_rust/rust/src/lib.rs
Here's how we import #BL602 IoT SDK into our #RustLang Firmware ... Someday we shall auto-generate these wrappers with "bindgen" and a Rust Procedural Macro
https://github.com/lupyuen/bl_iot_sdk/blob/rust/customer_app/sdk_app_rust/rust/src/lib.rs#L59-L180
Code Switching C to #RustLang ... For #BL602 IoT SDK
https://lupyuen.github.io/articles/rust?6#bl602-blinky-in-rust
Here's how we import the #BL602 IoT SDK into #RustLang
https://lupyuen.github.io/articles/rust?14#import-bl602-iot-sdk-into-rust
Passing Strings from #RustLang to #BL602 IoT SDK
https://lupyuen.github.io/articles/rust?16#pass-strings-from-rust-to-c
Auto-generating #RustLang Wrappers for #BL602 IoT SDK
https://lupyuen.github.io/articles/rust?18#autogenerate-wrapper-functions
#RustLang on #BL602 IoT SDK ... Works like any other BL602 Firmware
https://lupyuen.github.io/articles/rust?19#rust-on-bl602-iot-sdk
How we build #RustLang Firmware with #BL602 IoT SDK
https://lupyuen.github.io/articles/rust?21#build-the-bl602-rust-firmware
We flash #RustLang Firmware to #BL602 ... Just like any other BL602 Firmware
https://lupyuen.github.io/articles/rust?22#flash-the-bl602-rust-firmware
How we run #RustLang Firmware with #BL602 IoT SDK
https://lupyuen.github.io/articles/rust?24#run-the-bl602-rust-firmware
Picking a #RustLang Target that's compatible with #BL602 IoT SDK
https://lupyuen.github.io/articles/rust?28#selecting-another-rust-target
Here's how we create a Custom #RustLang Target for #RISCV #BL602 Hardware Floating-Point
https://lupyuen.github.io/articles/rust?32#custom-rust-target-for-bl602
@lupyuen
Wait bl602 has single prec fp?
@lupyuen
Could it be a mistyped 'K' for crypto extension?
@jeancf That's what the BL602 firmware says when it boots ... Also the letters seem to be sorted, so X looks kinda correct 🤔
@lupyuen
Was I right on float lib?
@lupyuen
You rock, prof. Youre my rockstar.
@lupyuen
Man Youre my hero. Loving content Youre sharing.
@lupyuen
Awesome!
@lupyuen
Wonder whether we could wrap linux kernel and drivers interfaces with it.
@lupyuen
Youre a rockstar. Btw youre of age of around my elder bro i found out from bio.
@lupyuen
Ahhh. Here is how you did it.
@lupyuen
Btw by using rust you are one step closer to switching to clang. Good for you. Great for project. Afaik fyi official rust compiler is llvm based thus connected to clang.
Our Custom #RustLang Target for #BL602 also needs "features" set to "+m,+a,+c,+f" ... Figured this out by comparing the Standard Rust Targets "riscv32imac-unknown-none-elf" and "riscv64gc-unknown-none-elf" (64-bit #RISCV, double-precision hardfloat)
https://github.com/lupyuen/bl_iot_sdk/blob/rust/customer_app/sdk_app_rust/riscv32imacf-unknown-none-elf.json