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

Support for the STM32L0x0 subfamily #141

Open
nbraud opened this issue Jan 16, 2021 · 9 comments
Open

Support for the STM32L0x0 subfamily #141

nbraud opened this issue Jan 16, 2021 · 9 comments

Comments

@nbraud
Copy link

nbraud commented Jan 16, 2021

Hi!

Support for the STM32L0x0 subfamily seems to be missing, according to both the README and docs.rs.
Presumably, this is because they are also missing from the Peripheral Access Crate, but what would be required (beyond some svd2rust calls) to make this happen?

I suspect @jglauche and I would be willing to make it happen, if you can point us in the right direction.

@nbraud
Copy link
Author

nbraud commented Jan 16, 2021

Looks like the SVD descriptors are missing from the files published by ST Micro... >_>'

@jglauche
Copy link

jglauche commented Jan 16, 2021

I poked ST about it, will post an update if I hear from them.

@jglauche
Copy link

They sent me
"STM32L0x0.svd Indeed, it seems the zip file is not updated on st.com, I will inform my colleague. For your information, you can also find this file at the following folder location: in STM32CubeProg tool (SVD folder) https://www.st.com/en/development-tools/stm32cubeprog.html or in STM32CubeIDE tool (\plugins\com.st.stm32cube.ide.mcu.productdb.debug_1.5.0.202011051456\resources\cmsis\STMicroelectronics_CMSIS_SVD)."

The file exists there, however it says it's under the "End User License Agreement for STMicroelectronics" license and I am unsure if this is any compatible to share so I asked them if this is okay to publish at this point

@jglauche
Copy link

jglauche commented Feb 3, 2021

I received an updated today:
"Small update on my side.
We are taking this into consideration and we will try to deliver new SVD files with license indication for upcoming products.

Regarding you github question, you have to respect the following license:

Copyright (c) 2020 STMicroelectronics.

SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License."

@jglauche
Copy link

jglauche commented Feb 3, 2021

for easier access to the file until ST fixes their SVD download package, I created a repo with the file https://github.com/jglauche/STM32L0x0

@snakehand
Copy link

I tried making HAL support (specifically serial ports) for STM32L0x0 by hacking around in the stm32f0xx-hal crate. It seems a new io definition is needed as a number of peripherals are missing compared to the L0x1 devices. But still I am pretty stuck, as I can't get simple GPIO / UART code working. I can upload a fork of the repo with my hacks, but I doubt it has much value.

@jglauche
Copy link

I tried making HAL support (specifically serial ports) for STM32L0x0 by hacking around in the stm32f0xx-hal crate. It seems a new io definition is needed as a number of peripherals are missing compared to the L0x1 devices. But still I am pretty stuck, as I can't get simple GPIO / UART code working. I can upload a fork of the repo with my hacks, but I doubt it has much value.

Have you tried my fork at https://github.com/jglauche/stm32l0xx-hal ?

@snakehand
Copy link

snakehand commented Sep 30, 2021

When building for the chip on my dev board, using this feature set : stm32l0xx-hal = { path="../test/stm32l0xx-hal", features = ["mcu-STM32L010R8Tx", "stm32l0x0", "rt"] } - I get compilation errors on the Nr interrupt trait.

error[E0277]: the trait bound stm32l0::stm32l0x0::Interrupt: Nr is not satisfied
--> /mnt/c/Users/11138/gitlab/rx_tracksensor2/test/stm32l0xx-hal/src/exti.rs:239:30
|
239 | NVIC::unmask(interrupt);
| ^^^^^^^^^ the trait Nr is not implemented for stm32l0::stm32l0x0::Interrupt
|
::: /home/frank/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-m-0.6.7/src/peripheral/nvic.rs:125:12
|
125 | I: Nr,
| -- required by this bound in nvic::<impl NVIC>::unmask

I removed the exti module from the build, and have managed to get some basics working. ( GPIO + I2C - seems promising )

@nikgul
Copy link

nikgul commented Sep 17, 2022

Is there any chance of this getting included ?
I'm new to rust, working through "The book" atm. so I don't know how much help I would be able to provide.

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

4 participants