Comments (5)
OK, so I've published a new version of cargo-pio
so you can try it out by re-issuing:
cargo install cargo-pio
The following command line now works:
cargo pio new -b sipeed-longan-nano -p gd32v my_blink2
(please note the lowercase name of the platform; matching is case sensitive)
... however, I cannot test the build of the resulting crate, because of this issue in PlatformIO.
Hope that helps.
from embuild.
By the way... this board looks like a pretty simple thing - no WiFi, BLE or anything like that. And only 32KB RAM / 128KB flash.
So if you really want to code in Rust for it, I don't see the need to go the Cargo->PIO route. Why not just using this crate, and forget about PlatformIO?
from embuild.
Great! Thank you.
Now it works flawlessly. Yes, Longan Nano is super cute and it has a Risc-V processor. I am a "fan" of rust and Risc-V and wanted to play with this combination.
Thank you for the tip for seedstudio-gd32v. I will give it a try.
The longan-nano
crate actually looks like even more appropriate for your board, so I guess you should keep using that.
I wrote some instructions how to setup a development environment for Longan Nano in Win10 + WSL2 Debian for the rust language:
https://github.com/LucianoBestia/longan_nano_rust_wsl2_platformio_setup
That's great and I'll put edition = "2018"
by default in the autogenerated lib.rs
by cargo-pio. However my point is: you don't need cargo-pio
actually?
Your project relies on a pure-Rust crate (longan-nano
) and it is not interfacing with any Vendor SDK and/or C APIs. So why bother with PlatformIO and cargo-pio
at all?
Just turn your demo crate from "static lib" to a binary crate one, say !#[cfg(no_main)]
and you should be good to go. The build will generate a regular .elf
file instead of the .hex
one you need for flashing, but I'm sure there are pure-Rust utilities, which can do .elf
to .hex
and then do the flashing for your board.
I read lately that the ESP32-C will have a Risc-V processor with Wi-Fi and Bluetooth 5. Sounds like a good future.
Yes. That's the ESP32-C3
chip which is on my desk as we speak. Now, the ESP32-C3
is a whole different beast compared to your board - 10x more RAM, 40x more flash, and very difficult to write the WiFi & BLE layer from scratch in Rust, so you have to interface with the ESP-IDF SDK APIs. That's a chip where cargo-pio
(either in its cargо-first variant or PIO-first) is really useful.
from embuild.
Nothing missing really, it is just that the current resolution algorithm assumes that the board name is unique across platforms. Let me try to fix it. Once/if fixed, your command cargo pio new -b sipeed-longan-nano -p GD32V my_blink2
should be working.
from embuild.
Great! Thank you.
Now it works flawlessly. Yes, Longan Nano is super cute and it has a Risc-V processor. I am a "fan" of rust and Risc-V and wanted to play with this combination.
Thank you for the tip for seedstudio-gd32v. I will give it a try.
I wrote some instructions how to setup a development environment for Longan Nano in Win10 + WSL2 Debian for the rust language:
https://github.com/LucianoBestia/longan_nano_rust_wsl2_platformio_setup
I needed to solve some workarounds, but now it works.
I read lately that the ESP32-C will have a Risc-V processor with Wi-Fi and Bluetooth 5. Sounds like a good future.
from embuild.
Related Issues (20)
- espidf installer: Check that python has venv package
- Build script failure when building esp-idf-sys as dependency of previously working project HOT 1
- [cargo install cargo-pio] error: failed to run custom build command for `ring v0.16.20` HOT 4
- Add docs and a user friendly README HOT 4
- embuild fails to compile with Rust 1.57 or older HOT 1
- Add CI to generate packages for releases
- Using lib_deps from PlatformIO.ini
- 3rd party C libraries HOT 1
- cargo-pio PlatformIO-first build with Arduino SDK HOT 20
- `menuconfig --release true` not saving changes
- Issue building esp-idf HOT 3
- Esp-idf installation is failing in Windows HOT 3
- Defmt library need some linking HOT 1
- Conditional compilation issue in mixed Rust/C project HOT 1
- How can we get bindgen output with wrap_static_fns()
- is pio working? HOT 2
- Change destination of the .embuild directory? HOT 2
- `embuild` shouldn't require `git` or `.git` to exist in order to build the project HOT 27
- Won't build with esp-idf 5.2 HOT 2
- Help with binding with C code HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embuild.