Skip to content
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

ADC/linker problem - won't compile (STM32L432KC) #227

Open
nebelgrau77 opened this issue May 20, 2021 · 5 comments
Open

ADC/linker problem - won't compile (STM32L432KC) #227

nebelgrau77 opened this issue May 20, 2021 · 5 comments

Comments

@nebelgrau77
Copy link

I'm trying to use the ADC example with an STM32L432KC. If I specify version 0.6.0 of the crate, it can't find ADC1, ADC_COMMON or rcc.ccipr. I used git = "git = "https://github.com/stm32-rs/stm32l4xx-hal" instead and it seemed to compile OK, but then it won't:

note: "rust-lld" "-flavor" "gnu" "--eh-frame-hdr" "-L" (omitted)
= note: rust-lld: error: undefined symbol: ADC1_2
>>> referenced by stm32l4.arnfbrxu-cgu.3
>>> stm32l4-3c82b24cdd335e86.stm32l4.arnfbrxu-cgu.3.rcgu.o:(__INTERRUPTS) in archive

I believe I have everything necessary installed, I actually have some firmware already working on the same board, I just wanted to add ADC. Is it something I'm doing wrong, or an actual issue with the crate?

Thanks!

@korken89
Copy link
Collaborator

Seems like an error in the PAC with the fields and interrupt definition.
Could you have a look between the PAC and the reference manual?

@nebelgrau77
Copy link
Author

I don't think I'm versed enough in those details, but I see that in PAC there are the following lines:

ADC1:  
    _modify:    
        _interrupts:      
            ADC1:        
                name: ADC1_2

and ADC1_2 also appears in the NVIC vector table in the RM as ADC1 and ADC2 global interrupt (page 322).
I don't know if it's any help to understand the problem, though.

@korken89
Copy link
Collaborator

korken89 commented Jun 1, 2021

Hmm, unclear what is the issue here.
But the error you get are consistent with an error in the PAC.

Could you open an issue in stm32-rs/stm32-rs and link it here?

@nebelgrau77
Copy link
Author

OK, done: stm32-rs/stm32-rs#561

@korken89
Copy link
Collaborator

korken89 commented Jun 1, 2021

Thanks!

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