Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Restructure examples #359

Closed
rleh opened this issue Mar 19, 2020 · 6 comments
Closed

Restructure examples #359

rleh opened this issue Mar 19, 2020 · 6 comments

Comments

@rleh
Copy link
Member

rleh commented Mar 19, 2020

Problems / possibilities for improvement

  • Boards modules contain lots of duplicate code.
  • Only 33 dev boards are currently supported.
    • Little effort to support all 47 ST Nucleo boards.
    • Little effort to support Arduino derivates.
  • One example only run one one single dev board without modifications.
  • Examples are hard to use for on-target software testing.
  • Many examples are hardly documented.

Restructuring modm examples

  • Unify board modules: Generate (e.g.) all nucleo board form a single lbuild module.
  • Extend board.hpp: Add "default" Spi, I2c, Uart, Gpio, ... (interfaces)
    • Should (if possible) use same pins on same form-factor dev boards.
    • Availability and number of interfaces as lbuild module properties on which the examples are then dependent.
    • Document interfaces similar to mbed
  • Generated (automated from CI) all examples into https://github.com/modm-io/modm-examples to keep the first steps with modm easy.
  • Make examples usable for automated integration tests, e.g. with a PASS/FAIL in the serial log.
@rleh
Copy link
Member Author

rleh commented Mar 19, 2020

List of Nucleo Boards

  • nucleo-f030r8
  • nucleo-f031k6 (supported in modm)
  • nucleo-f042k6 (supported in modm)
  • nucleo-f070rb
  • nucleo-f072rb
  • nucleo-f091rc
  • nucleo-f103rb (supported in modm)
  • nucleo-f207zg
  • nucleo-f302r8
  • nucleo-f303k8 (supported in modm)
  • nucleo-f303re
  • nucleo-f303ze
  • nucleo-f334r8
  • nucleo-f401re (supported in modm)
  • nucleo-f410rb
  • nucleo-f411re (supported in modm)
  • nucleo-f412zg
  • nucleo-f413zh
  • nucleo-f429zi (supported in modm)
  • nucleo-f446re (supported in modm)
  • nucleo-f446ze
  • nucleo-f722ze
  • nucleo-f746zg
  • nucleo-f767zi
  • nucleo-g070rb
  • nucleo-g071rb (supported in modm)
  • nucleo-g431kb
  • nucleo-g431rb
  • nucleo-g474re (supported in modm)
  • nucleo-h743zi
  • nucleo-h745zi
  • nucleo-h753zi
  • nucleo-h755zi
  • nucleo-l010rb
  • nucleo-l011k4
  • nucleo-l031k6
  • nucleo-l053r8
  • nucleo-l073rz
  • nucleo-l152re (supported in modm)
  • nucleo-l412kb
  • nucleo-l412rb
  • nucleo-l432kc (supported in modm)
  • nucleo-l433rc
  • nucleo-l452re
  • nucleo-l476rg (supported in modm)
  • nucleo-l496zg
  • nucleo-l4r5zi

ST Discovery boards

This list seems not to be complete, is there a good overview on STs website?

  • STM32F0DISCOVERY (supported in modm)
  • STM32F0308-DISCO
  • STM32F072B-DISCO (supported in modm)
  • STM32F3DISCOVERY (supported in modm)
  • STM32F3348-DISCO
  • STM32F303C-DISC1
  • STM32F401C-DISCO
  • STM32F411E-DISCO
  • STM32F407G-DISC1
  • STM32F429I-DISC1 (supported in modm)
  • STM32F469I-DISCO (supported in modm)
  • STM32F746G-DISCO (supported in modm)
  • STM32F769I-DISCO or STM32F769I-DISC1 (supported in modm, I can't identify which one)
  • STM32F723E-DISCO
  • STM32F7308-DISCO
  • STM32L0538-DISCO
  • STM32L100C-DISCO
  • STM32L-DISCOVERY (supported in modm)
  • STM32L152C-DISCO
  • STM32L476G-DISCO (supported in modm)
  • STM32F412G-DISCO
  • STM32F413H-DISCO
  • STM32VLDISCOVERY
  • STM32L496G-DISCO
  • STM32G071B-DISCO
  • STM32G0316-DISCO
  • STM32H747I-DISCO
  • STM32H747I-DISC1
  • STM32H745I-DISCO
  • STM32L4R9I-DISCO
  • F1 Discovery (supported in modm, but not listed by ST anymore)
  • F4 Discovery (supported in modm, but not listed by ST anymore)

@salkinium
Copy link
Member

In addition, we should have at least the Nucleo Pinouts available as machine readable data, so we can generate both BSPs and unittests for them like this GPIO test.

@salkinium
Copy link
Member

Generated (automated from CI) all examples into https://github.com/modm-io/modm-examples to keep the first steps with modm easy.

That's a great idea! Perhaps we can also generate https://github.com/modm-io/modm-template at the same time cos it would be basically have a mostly similiar structure?

@rleh
Copy link
Member Author

rleh commented Mar 19, 2020

For the nucleo boards the only unavoidable difference is the SystemClock struct with all static constexpr frequencies and the enable() method.

Can we somehow get machine-readable data (from CubeMX?) to generate the code?

@salkinium
Copy link
Member

Can we somehow get machine-readable data (from CubeMX?) to generate the code?

Yes, I found this: https://salkinium.com/stm32/clock/

But it's both matches too much and too little, because ST has some logic conditions inside their XML that I do evaluate, so there may be duplicates or missing nodes. It's pretty horrifying.

@salkinium
Copy link
Member

salkinium commented Mar 19, 2020

Ah, found the code: it's quite simple: salkinium/modm-devices@5381b4b

(Simple in the sense that ST's data is basically just a graph dump, but the difficulty is getting the actual limitations, like clock rate resolved, which are part of the IP file)

@modm-io modm-io locked and limited conversation to collaborators Sep 29, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Development

No branches or pull requests

2 participants