-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Questions regarding CH582F chip #2
Comments
ADC and RTC part works as expected.
The BLE broadcaster example also works.
I haven't looked into lower power sleep. The current implementation uses WFI opcode and DCDC. I need to check the official EVT for a full low power implementation |
Thank you. |
Happy new year. Sorry to bother you again. My goal is to flash board linked below using USB interface: https://github.com/WeActStudio/WeActStudio.WCH-BLE-Core I am trying to compile on Windows 7 machine but I am getting following errors: Is there something I am missing in setting up rust environment? Please help me get started.
|
Check out rust-lang/rust#44787 (comment) |
@andelf I searched on google for silutions for whole day but was unsuccessful. Finally I removed all old installation of rust and installed standalone rust application which can compile hello world example created by typing "cargo new hello". But when I try to compile your repository it gives following errors: Please help.
|
> rustup target add riscv32imac-unknown-none-elf |
I tried "hello world and seems like rust setup works fine. Thanks.
|
@andelf Unfortunately, with rust standalone I dont have rustup available. Is there any manual setting where I can add target? Thanks. This is the installation I have:
|
@andelf Seems like I am getting closer. I get fewer errors now:
|
That's a common error, use |
Finally. It compiled with some warnings. Thank you so much for your help. Now how can I download compiled Hex file using USB interface to above mentioned development board? |
Use either of https://github.com/ch32-rs/wchisp and https://github.com/ch32-rs/wlink |
@andelf I will take a look. Thanks. |
@andelf Pardon my ignorance. I was able to compile "brodcaster" example with your help. I have WeActstudio ch582f board with built in USB port. I have installed official WCHISP tool on my computer. Usually , With Mounriver studio it creates *.hex file and I download this *.hex file using USB port on my board and WCHISP tool. Can you give me step by step instructions please? Thanks. |
I have a WeActStudio CH582F too. It's the primary board I used to develop ch58x-hal. 😄 You need to locate the > rustup component add llvm-tools
Then you will have `cargo objcopy` available
> cargo objcopy --release --example blinky -- -O binary blinky.bin
This generates the binary firmware
> cargo objcopy --release --example blinky -- -O ihex blinky.hex
This generates the .hex file for WCHISPTool |
@andelf Thank you. I get following message:
|
C:\Users\ebhynes\CH582F>cargo search cargo-objcopy C:\Users\ebhynes\CH582F> |
Try this:
|
@andelf It did a trick. I got blinky.hex file. Thank you so much for helping me setup end to end environment for Rust embedded. Now is time to play with all your great code for this amazing little chip . I will sleep better. Goodnight. |
I will leave this instructions here for future user of this repository using windows 7 machine:
|
I am new to rust language. I have some questions regarding using CH582F chip.
I want to make an IOT project where I want to read 3 ADC pins every 5 minutes to read temperature, light level and battery level and then broadcast it using BLE (preferably coded phy 125kb for longer range). After broadcasting the chip should go to sleep for 5 minutes to conserve battery power.
Is this possible with current code in your repository?
Thanks.
The text was updated successfully, but these errors were encountered: