1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles
bors[bot] ddf1fe252d
Merge #19733 #19747 #19769 #19782
19733: cpu/msp430: reorganize code r=maribu a=maribu

### Contribution description

RIOT supports two distinct families of the MSP430: The [MSP430 x1xx] MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible MCU families the code was located in the msp430fxyz folder, resulting in case of the UART driver in particularly bizarre code looking roughly like this:

```C
#ifndef UART_USE_USCI
/* implementation of x1xx peripheral ... */
#else
/* implementation of F2xx/G2xx peripheral ... */
#endif
/* zero shared code between both variants */
```

This moves peripheral drivers shared between the two families to msp430_common and splits the SPI and UART driver into two MCU families.

In addition, it cleans up the `msp430_regs.h` by dropping most of it and using the macros and symbols provided by the vendor header files. There is little reason for us to maintain constants when TI is already doing that.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf


19747: gnrc/ipv6/nib: reset rs_sent counter also for not-6LN interfaces r=maribu a=fabian18



19769: cpu/nrf53: add initial support with nRF5340DK-APP board r=maribu a=dylad

### Contribution description

This PR adds support for nRF5340 MCU and its associated Nordic development board, nRF5340DK.
This MCU provides a dual Cortex-M33, one application core running at up to 128MHz, and one network core running at up to 64MHz.
Peripherals are inherited from others Nordic MCUs families so it shouldn't be hard to add more of them in followup PRs.

For now, only the minimal set of peripherals is supported:
- GPIO / GPIO_IRQ
- UART
- TIMER

### Testing procedure
Build the usual test application for the supported peripherals and flash the board.
nRF5340DK provides two serial ports on its embedded debugger. RIOT's shell should be available on the first one (/dev/ttyACM0)


### Issues/PRs references
#18576
#19267 


19782: cpu/msp430: fix for ti's msp430-gcc-opensource package ld version r=maribu a=hugueslarrive

### Contribution description
My msp430 toolchain (https://www.ti.com/tool/MSP430-GCC-OPENSOURCE) was broken by #19484:
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
/opt/ti/msp430-gcc/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: .rodata not found for insert
collect2: error: ld returned 1 exit status
make: *** [/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/../../Makefile.include:761 : /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf] Erreur 1
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version
GNU ld (Mitto Systems Limited - msp430-gcc 9.3.1.11) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+'
9.3
1.11
2.34
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+$'
2.34
```


### Testing procedure
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
   text	   data	    bss	    dec	    hex	filename
   8612	    722	    866	  10200	   27d8	/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
```


### Issues/PRs references
Introduced by #19484, highlighted in #16727.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 18:43:26 +00:00
..
arch Merge #19733 #19747 #19769 #19782 2023-07-04 18:43:26 +00:00
boards makefiles/boards/stm32: fix DFU_USB_ID handling 2023-03-10 10:02:15 +01:00
boot makefiles/boot/riotboot-dfu-util: add tinyusb_dfu support 2023-01-15 18:09:55 +01:00
libc build system: Fix linker feature test with newlib 4.3.0 2023-02-02 20:47:37 +01:00
pkg makefiles/pkg/nimble.adv.mk: add utility to assign adv instance 2022-04-27 08:22:58 +02:00
tests makefiles/tests/tests.inc.mk: fix test/available target 2023-01-03 12:53:35 +01:00
toolchain makefiles/toolchain/gnu.inc.mk: fix compilation 2023-06-03 20:10:56 +02:00
tools Merge #19703 #19724 #19735 2023-06-14 12:34:33 +00:00
utils makefiles/utils/strings.mk: Fix version_is_greater_or_equal 2023-01-12 12:03:28 +01:00
app_dirs.inc.mk makefiles/app_dirs.inc.mk: add tests/net subdirectory 2023-05-12 16:36:38 +02:00
application.inc.mk core: split out library code 2022-03-09 21:43:05 +01:00
auto_init.inc.mk makefiles: add common makefile for auto_init modules 2020-06-08 10:27:35 +02:00
bindist.inc.mk makefiles/bindist: copy object files and use .bin to compare 2020-09-04 15:01:15 +02:00
blob.inc.mk blobs: include documentation in doxygen 2023-01-26 09:27:47 +01:00
boards.inc.mk make: add info-emulated-boards helper target 2021-10-12 10:39:57 +02:00
buildtests.inc.mk many typo fixes 2019-11-23 22:39:07 +01:00
cargo-settings.inc.mk Rust: Add crates-to-module adapter 2022-07-09 21:15:29 +02:00
cargo-targets.inc.mk make: pass make jobserver to cargo 2023-01-26 21:43:39 +01:00
cflags.inc.mk buildsystem: only expose CPU_RAM_BASE & SIZE when known 2023-06-24 23:35:14 +02:00
clang_tidy.inc.mk makefiles/clang-tidy: initial support 2021-05-28 11:57:20 +02:00
color.inc.mk makefiles/color: Add color functions. 2021-05-04 10:57:47 +02:00
default-radio-settings.inc.mk drivers/cc110x : Add CONFIG_ 2020-04-17 23:27:01 +05:30
defaultmodules_deps.inc.mk sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
defaultmodules_no_recursive_deps.inc.mk buildsystem: split default modules include early and late 2022-06-02 12:56:59 +02:00
defaultmodules_regular.inc.mk libc: add to default modules 2022-09-26 19:06:46 +02:00
dependencies_debug.inc.mk makefiles/dependencies_debug.inc.mk: add TOOLCHAIN 2021-01-27 11:11:43 +01:00
dependency_resolution.inc.mk sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
deprecated_boards.inc.mk cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
deprecated_cpus.inc.mk cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
deprecated_modules.inc.mk makefiles/pseudomodules: remove deprecated event_thread_lowest module 2023-05-19 16:15:10 +02:00
docker.inc.mk tools/mspdebug: fix make debug and make debugserver 2023-05-24 17:00:38 +02:00
driver_with_disp_dev.mk make: introduce makefile to optimize driver with disp/touch_dev build 2022-01-06 12:07:07 +01:00
driver_with_saul.mk make: introduce makefile to optimize driver with saul build 2022-01-06 12:07:06 +01:00
driver_with_touch_dev.mk make: introduce makefile to optimize driver with disp/touch_dev build 2022-01-06 12:07:07 +01:00
eclipse.inc.mk eclipse.inc.mk: Split eclipse support into it's own file. 2018-12-05 15:22:42 +01:00
features_check.inc.mk build_system: don't optionally use conflicting features 2021-02-22 12:06:27 +01:00
features_modules.inc.mk Merge #19499 #19500 2023-04-24 23:26:07 +00:00
git_version.inc.mk makefiles/git_version.inc.mk: deferred GIT_VERSION definition 2019-07-22 12:00:45 +02:00
info-global.inc.mk Make: default to docker with generate-Makefile.ci 2023-02-04 16:53:49 +01:00
info-nproc.inc.mk make: replace curly braces with parenthesis 2018-03-22 20:43:15 +01:00
info.inc.mk buildsystem: add target debug-client 2023-06-10 00:04:56 +02:00
kconfig.mk boards: Use BOARD.config pattern for kconfig 2022-02-14 13:10:09 +01:00
mcuboot.mk Merge pull request #11130 from cladmi/pr/make/flashfile/jlink 2019-03-14 12:01:02 +01:00
modules.inc.mk makefile: add a check for real modules 2020-09-04 15:01:16 +02:00
murdock.inc.mk makefiles/murdock.inc.mk: change policy to run tests by default 2019-08-21 12:49:26 +02:00
periph.mk Makefile: remove usage of SUBMODULES_NOFORCE 2020-04-15 12:11:44 +02:00
pio.inc.mk makefiles: add makefile to generate header file from PIO program 2023-05-23 08:49:37 +02:00
pseudomodules.inc.mk Merge #19712 2023-06-29 09:57:31 +00:00
scan-build.inc.mk makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
stdio.inc.mk sys/stdio: mark stdio_tinyusb_cdc_acm as buffered 2023-02-07 22:47:35 +01:00
suit.base.inc.mk makefiles/suit: allow multiple SUIT_SECs 2022-08-16 22:30:27 +02:00
suit.inc.mk makefiles/suit: allow to overwrite SUIT_VENDOR_DOMAIN 2022-06-01 13:18:00 +02:00
tests.inc.mk make: run static_tests.sh directly with static-tests target 2020-12-17 15:16:36 +01:00
ubsan.inc.mk make: add initial ubsan support 2022-02-16 12:20:45 +01:00
usb-codes.inc.mk makefile: Fix usage error with busybox grep 2020-10-06 17:16:26 +00:00
vars.inc.mk buildsystem: add target debug-client 2023-06-10 00:04:56 +02:00