-
Notifications
You must be signed in to change notification settings - Fork 67
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
Getting it to run on STM32F303, can't compile #215
Comments
There are changes on the master branch which are not yet in the version from https://crates.io. You should use the example from https://github.com/stm32-rs/stm32f3xx-hal/blob/v0.6.1/examples/pwm.rs probably. |
@Rahix thanks. I also had to add
Where should I put it? I tried putting inside And do you have a blinky example for this board? I won't be able to test the PWM. ps: I'll make a PR in this repo with better instructions once I make it work. |
I added memory.x to
do not know if it's related to where I've put it. |
Hey, as @Rahix correctly stated, the examples from the master branch are currently not building for the last released version. This should be fixed, when a new version is released, though it is advised to try out the examples under the corresponding version tag instead (in your case: The Do you have a Anyways, to the last problem you have: Does removing [dependencies.stm32f3xx-hal]
version = "0.6.1"
- features = ["rt", "stm32f303xc", "defmt"]
+ features = ["rt", "stm32f303xc"] |
@Sh3Rm4n removing fmt and putting memory.x in the right place and creating build.rs worked, it was one place off. Thank you very much. Could somebody link me with a blinking example? I'd like to see if things are working and I don't have any equipment to plug into the GPIO to test PWM. My discovery board has a build in LED (I guess). |
I dockerized everything inside a docker container and also plugged it into VSCode's devcontainer so begginers can simply open this project in VSCode and it will just work, even the burning program will work. Just need to test the blinking example if someone can link me with one and see how it goes, then I'll probably write a nice introduction for newcomers. Thanks for all the help. |
What about |
@Rahix thanks, I was able to find the correct pin for one of the LEDs in my stm32f303. Are you guys using
indeed this firmware is really old. Maybe some very recent firmware is needed for rust? Anyone got this problem before? |
Are you using the stm32f303-discovery board? It seems like the firmware for the onboard debugger is outdated and not supported by cargo-flash / probe-rs. Here is an issue with similar problems, with some pointers how to update the debugger firmware. This could also help. I definitely did update the probe on my debugger some time ago, but do not remember the details to write down a detailed instruction. I hope these pointers will help anyways. :) |
@Sh3Rm4n thanks, this worked and I was able to flash with I just don't know if my |
Great. Glad I could help you. As the original issue is resolved, I'll close this issue now.
Well, if cargo flash did not complain, I guess it is not "too" wrong and memory mappings and checks inside the debugger succeeded. If you have the STM32F303 Discovery Board, it should be at least clear, that you have an stm32f303 as this should be printed on the PCB. Which variant of the stm32f303 you have can be either found out, if you look closely on the print of the MCU. Or you could look at the datasheet about your discovery board, or count the number of pins on your chip and match it too existing ones 😀 My discovery board for example is the stm32f303 vct6 variant, therefore I would use |
FYI, for Maybe the README / documentation should point to this guide to avoid confusion. |
I'm very noob at this, would appreciate some help.
I'm trying the example https://github.com/stm32-rs/stm32f3xx-hal/blob/master/examples/pwm.rs on my STM32F303 Discovery board. Here's my cargo:
I've put the code of
pwm.rs
intomain.rs
.Errors:
By the way, where's the blinky example for this board?
The text was updated successfully, but these errors were encountered: