Skip to content

stm32g491 not compiling #184

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

Closed
JDRobotter opened this issue Feb 17, 2025 · 4 comments
Closed

stm32g491 not compiling #184

JDRobotter opened this issue Feb 17, 2025 · 4 comments

Comments

@JDRobotter
Copy link

It seems that this crate does not compile using stm32g491 feature, a lot of unresolved import, redefinitions, etc.
I'm ready to do what's necessary to patch this myself but I need some pointers. Can anybody point me to relevant issues or procedure to fix this crate for stm32g491 ?

I'm including the first lines of compile log here:

error[E0432]: unresolved import `crate::stm32::FDCAN2`
   --> src/can.rs:128:9
    |
128 |     use crate::stm32::FDCAN2;
    |         ^^^^^^^^^^^^^^------
    |         |             |
    |         |             help: a similar name exists in the module: `FDCAN`
    |         no `FDCAN2` in `stm32g491`

error[E0432]: unresolved import `crate::opamp::OpampEx`
  --> src/prelude.rs:36:9
   |
36 | pub use crate::opamp::OpampEx as _;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `OpampEx` in `opamp`

error[E0432]: unresolved import `crate::stm32::TIM20`
   --> src/pwm.rs:185:5
    |
185 | use crate::stm32::TIM20;
    |     ^^^^^^^^^^^^^^-----
    |     |             |
    |     |             help: a similar name exists in the module: `TIM2`
    |     no `TIM20` in `stm32g491`

error[E0412]: cannot find type `Opamp1` in module `opamp`
    --> src/adc.rs:2821:12
     |
2821 |     opamp::Opamp1 => (ADC1, 13),
     |            ^^^^^^ not found in `opamp`
...
@usbalbin
Copy link
Member

Is this on latest master?

@usbalbin
Copy link
Member

usbalbin commented Feb 17, 2025

If so, would you like to check if this works better on the staged-pac branch? I believe there might be some fixes in the new pac that are only present in that branch

@JDRobotter
Copy link
Author

Yes it was on master !
I've successfully compiled and tested some code on target for my stm32g491 using the stage-pac branch.

@usbalbin
Copy link
Member

Unless someone objects, my plan is to merge that branch into master once all PRs targeting that are closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants