12-14-2020, 09:00 AM
(12-14-2020, 08:42 AM)barray Wrote: 1. Is the USB only for power? Does the device not allow for flashing via USB? I kind of hoped there would be a USB to serial flashing process.
2. How mature is the Rust library now? Is it functioning and if so, is it using binary blobs?
3. What is the compelling argument for using Rust over C for the stack?
So glad to have you onboard PineCone and RISC-V! :-)
1. The USB port is connected to PineCone's UART port. That's how we flash firmware over USB (and UART). Debugging is not supported over USB. More details here
The UART flashing protocol is non-standard, that's why I chose to use a JTAG Debugger instead. It just works better with Rust, GDB and VSCode. :-)
2. Many features are still missing in the Rust libraries for BL602, e.g. I2C, SPI. Check the docs here
BLE and WiFi are still not supported in the Rust BL602 libraries. We need to reverse engineer the blobs then get them working with Rust.
3. About C vs Rust: Yep it's perfectly fine to use C! :-) I'll be porting Mynewt OS to PineCone, which is mostly C anyway.
Rust seems friendlier for folks who are new to embedded coding. But it can get unnecessarily complex.
I wrote about Rust because the Sipeed Community has ported it to BL602. And it has GDB config files that actually work for flashing and debugging PineCone. So we can adapt them for our C projects as well.