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 STM32 L1-series #9333

Closed
postlund opened this issue Aug 8, 2018 · 12 comments · Fixed by #12354
Closed

Support for STM32 L1-series #9333

postlund opened this issue Aug 8, 2018 · 12 comments · Fixed by #12354
Labels
Feature Request A request for a new feature platform: STM32 ST Micro STM32

Comments

@postlund
Copy link

postlund commented Aug 8, 2018

I'm currently looking around for a small RTOS to use in a new project for a customer and Zephyr matches more or less perfectly what I need. My current problem is that the CPU used in the project is based on the STM32L1 series (STM32L152RE to be more exact) and Zephyr does not seem to support that at the moment. So I would like to request support for L1 to be added.

https://www.st.com/en/embedded-software/stm32cubel1.html

@erwango erwango added the platform: STM32 ST Micro STM32 label Aug 8, 2018
@erwango
Copy link
Member

erwango commented Aug 8, 2018

Hi @postlund ,

Thanks for your interest for Zephyr and STM32.
Indeed L1 is one of the few STM32 series not yet ported into Zephyr. All other series have been ported by the community and often by new members like you.
This is some work, but mostly copy/paste and adaptation of existing code. It is the perfect task to dive into Zephyr and learn the basics. Also, doing this upstream work is usually quite formative to start to work with Zephyr community in general.
If you're interested in this journey, here are examples:
#7284 (STM32F7)
#7450 (STM32F2)
#5949 (STM32L0)

Of course people will help you during the review. And here are some few recommendations that are meant to fasten the review and upstream process:
-Split your work into small but coherent commits (hal, arch, dts, drivers, boards ..)
-Limit initial work to the basics drivers required for hello_world and blinky: clock_control, uart, exti, gpio, pinmux
-Port one board (ideally ST nucleo, disco) that can be used by others to check your work

Cheers!

@erwango erwango added the Feature Request A request for a new feature label Aug 8, 2018
@postlund
Copy link
Author

postlund commented Aug 8, 2018

Hi @erwango,

Thanks for the quick reply. I actually started a port last week and it seems quite straight-forward. But I'm new both to the STM32 processor family and zephyr, so it's a slow process (along with my time being limited). But I will try to make some PRs for the things I do and hopefully get things working bit-by-bit. Getting "hello world" working on my development board would be a splendid start.

Thanks again!

@Aukstkalnis
Copy link

Aukstkalnis commented Mar 13, 2019

As I understand @postlund did not finished STM32L1 MCU support, so I started to work on this.

@erwango
Copy link
Member

erwango commented Mar 14, 2019

@Aukstkalnis, work is actually completed and waiting for 1.15 merge window openning: #12354

@Aukstkalnis
Copy link

Good;-) I spent 1 day to write all GPIO alternate functions for all posible l1 pins and double checking everything😅 So i will check this pull request🙂

@erwango
Copy link
Member

erwango commented Mar 14, 2019

@Aukstkalnis , I don't know what was your ambition, but if you're looking for fun, STM32H7 series are yet to be ported on Zephyr ;-)

@Aukstkalnis
Copy link

My ambition was to add STM32L152C_Discovery board support to zephyr OS and have fun, but there was no STM32L1x support, so I searched open cases and pull request for STM32L1, found this case and didn't check attached cases because their titles did not contain string "STM32L1", so I jumped to conclusion that there is not support for L1 and started working on it :D With this pull request now I only need to add STM32L152C_Discovery board support :)

@erwango
Copy link
Member

erwango commented Mar 14, 2019

So you lost one day, but gained 10 then :-)
This is great, have fun with zephyr on STM32!

@Aukstkalnis
Copy link

Thank you :) 👍

@Aukstkalnis
Copy link

I have one question about boards. I am planing to add STM32L152C discovery board support to zephyr. Can I add support on #12354 pull request, test it, then move changes to zephyr master that does not have STM32L1 support and generate pull request? Or should I generate pull request when STM32L1 support will be added?

@erwango
Copy link
Member

erwango commented Mar 14, 2019

You can push a PR with your board support which would include #12354. Then, once #12354 is merged you'll have to rebase and your commits will remain.

@takumiando
Copy link
Contributor

This implementation doesn't work correctly.
#22078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A request for a new feature platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants