[riot-notifications] [RIOT-OS/RIOT] cpu/stm32g0: add basic support + add nucleo-g070rb board (#14163)

Alexandre Abadie notifications at github.com
Thu May 28 18:35:43 CEST 2020

The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.

### Contribution description

This PR adds an initial support for the stm32g0 family of CPUs. The nucleo-g070rb board is also added so people can test.

Only a few peripheral APIs are supported for the moment: gpio (no IRQ!), timer, uart, flashpage. The riotboot feature is also available.

Important features that are missing: gpio_irq, rtc, i2c, spi

Note that even if the clock configuration is quite similar to L4/WB families, I decided to add a new file for g0, to avoid even more ifdef there.
The clock configuration defined in the board was also adapted to allow choosing between HSE, HSI or PLL (itself clocked by either HSI or HSE) as system source clock. The PLL clock source is the default.
Since there's no HSE available on the nucleo-g070rb, the default PLL clock source is HSI (@16MHz). The core clock is configured to be 64MHz.

Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes

### Testing procedure

- A green Murdock
- Run `./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . nucleo-g070rb --jobs=4` and check the results are ok

The script reported these failures:
Failures during test:
- [tests/driver_grove_ledbar](tests/driver_grove_ledbar/test.failed)
- [tests/driver_my9221](tests/driver_my9221/test.failed)
- [tests/emcute](tests/emcute/test.failed)
- [tests/gnrc_dhcpv6_client](tests/gnrc_dhcpv6_client/test.failed)
- [tests/gnrc_dhcpv6_client_6lbr](tests/gnrc_dhcpv6_client_6lbr/test.failed)
- [tests/gnrc_ipv6_ext](tests/gnrc_ipv6_ext/test.failed)
- [tests/gnrc_ipv6_ext_frag](tests/gnrc_ipv6_ext_frag/test.failed)
- [tests/gnrc_ipv6_ext_opt](tests/gnrc_ipv6_ext_opt/test.failed)
- [tests/gnrc_ipv6_nib_dns](tests/gnrc_ipv6_nib_dns/test.failed)
- [tests/gnrc_rpl_srh](tests/gnrc_rpl_srh/test.failed)
- [tests/gnrc_sock_dns](tests/gnrc_sock_dns/test.failed)
- [tests/gnrc_tcp](tests/gnrc_tcp/test.failed)
- [tests/periph_timer_short_relative_set](tests/periph_timer_short_relative_set/test.failed)
- [tests/pkg_libfixmath_unittests](tests/pkg_libfixmath_unittests/test.failed)

Most of them are related to network setup or root priviledge missing. `tests/pkg_libfixmath_unittests`, `tests/driver_grove_ledbar` and `tests/driver_my9221` are problematic but I haven't looked at them in detail for the moment.

Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output

### Issues/PRs references


Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/stm32: add stm32g0 support
  * boards/common/stm32: add common code for stm32g0
  * boards/nucleo-g070rb: add support
  * examples: exclude nucleo-g070rb where the firmware doesn't fit in memory

-- File Changes --

    M boards/common/nucleo/include/board_nucleo.h (4)
    A boards/common/stm32/dist/stm32g0.cfg (3)
    A boards/common/stm32/include/g0/cfg_clock_default.h (75)
    A boards/nucleo-g070rb/Makefile (4)
    A boards/nucleo-g070rb/Makefile.dep (1)
    A boards/nucleo-g070rb/Makefile.features (12)
    A boards/nucleo-g070rb/Makefile.include (2)
    A boards/nucleo-g070rb/doc.txt (5)
    A boards/nucleo-g070rb/include/periph_conf.h (87)
    M cpu/stm32/Makefile.features (7)
    M cpu/stm32/cpu_common.c (25)
    M cpu/stm32/cpu_init.c (2)
    M cpu/stm32/include/cpu_conf.h (13)
    M cpu/stm32/include/periph_cpu.h (13)
    A cpu/stm32/include/vendor/stm32g070xx.h (7646)
    A cpu/stm32/include/vendor/stm32g0xx.h (190)
    M cpu/stm32/periph/dma.c (4)
    M cpu/stm32/periph/flash_common.c (7)
    M cpu/stm32/periph/flashpage.c (18)
    M cpu/stm32/periph/gpio_all.c (4)
    M cpu/stm32/periph/hwrng.c (4)
    M cpu/stm32/periph/pm.c (7)
    M cpu/stm32/periph/rtt_all.c (4)
    M cpu/stm32/periph/uart.c (18)
    M cpu/stm32/stm32_info.mk (4)
    M cpu/stm32/stm32_mem_lengths.mk (6)
    M cpu/stm32/stmclk/Makefile (2)
    M cpu/stm32/stmclk/stmclk_common.c (2)
    A cpu/stm32/stmclk/stmclk_g0.c (116)
    A cpu/stm32/vectors/vectors_g0.c (86)
    M examples/javascript/Makefile.ci (1)
    M examples/lua_REPL/Makefile.ci (1)
    M examples/lua_basic/Makefile.ci (1)
    M examples/micropython/Makefile.ci (1)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200528/29176808/attachment.htm>

More information about the notifications mailing list