19465: drivers/mtd: use XFA for pointers to defined MTDs r=benpicco a=gschorcht
### Contribution description
This PR provides the support to hold pointers to defined MTDs within a XFA. The XFA allows
- to access MTDs of different types (`mtd_flashpage`, `mtd_sdcard`, `mtd_emulated`, ...) by an index
- to determine the number of MTDs defined in the system.
### Testing procedure
To be defined once PR #19443 is merged because emulated MTDs will allow to test this PR on arbitrary boards.
### Porting Guide
For external boards:
- remove the `MTD_NUMOF` definition from `board.h`
- add `MTD_XFA_ADD(<mtd_dev>, <idx>);` to the definition of `<mtd_dev>`.
- `MTD_0`, `MTD_1`, … defines are no longer needed.
### Issues/PRs references
Related to PR #19443
19981: Fletcher32: Add incremental API r=benpicco a=bergzand
### Contribution description
This PR extends the current fletcher32 checksum with an incremental API mode. This way the bytes to be checksummed can be supplied via multiple successive calls and do not have to be provided in a single consecutive buffer.
I've also rephrased the warning with the original function a bit as that function uses an `unaligned_get_u16` to access the data. The data thus does not require alignment, but the length does need to be supplied as number of 16 bit words.
### Testing procedure
The test has been extended
### Issues/PRs references
None
19995: sys/psa_crypto: Fix macro for public key max size and SE example r=benpicco a=Einhornhool
### Contribution description
#### 1. Wrong public key size when using secure elements, introduced by #19954
Fixed conditions for key size macros in `crypto_sizes.h`.
#### 2. EdDSA and ECDSA examples fail when using a secure element because of unsopported changes introduced by #19954
Updated `example/psa_crypto` to use only supported functions for secure elements.
### Testing procedure
Build `example/psa_crypto` for secure elements and run application
Output on master:
```
2023-10-19 14:33:24,372 # main(): This is RIOT! (Version: 2019.07-devel-22378-gb6772)
2023-10-19 14:33:24,372 # HMAC SHA256 took 56393 us
2023-10-19 14:33:24,372 # Cipher AES 128 took 68826 us
2023-10-19 14:33:24,372 # *** RIOT kernel panic:
2023-10-19 14:33:24,373 # HARD FAULT HANDLER
2023-10-19 14:33:24,373 #
2023-10-19 14:33:24,373 # *** rebooting...
```
Output with fixes:
```
2023-10-19 13:35:24,715 # main(): This is RIOT! (Version: 2019.07-devel-22384-g8ef66-dev/psa-crypto-fixes)
2023-10-19 13:35:24,715 # HMAC SHA256 took 56374 us
2023-10-19 13:35:24,715 # Cipher AES 128 took 68805 us
2023-10-19 13:35:24,715 # ECDSA took 281164 us
2023-10-19 13:35:24,715 # All Done
```
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
Use the new OPENOCD_RESET_USE_CONNECT_ASSERT_SRST to configure
'reset_config connect_assert_srst' when flashing and resetting only.
This removes the need for a special debug configuration and should allow
connecting to a running target again.
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included
Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
The periph_dma is not pulled in automatically for all applications.
Applications willing to use the configured peripherals with periph_dma
for a given board will have to include the feature explictly in their
Makefile.
It was causing unrelated issues as threads got de-scheduled while
calling printf and this was not handled properly in tests at that
moment.
The file always exist so no need to do '-include'.
Replaced using:
sed -i 's|-\(include $(RIOTCPU)/.*/Makefile.features\)|\1|' \
$(git grep -l '$(RIOTCPU)/.*/Makefile.features' boards)
Includes of $(CPU)/include and $(BOARD)/include and already added in the
main Makefile.include.
Verification:
There are no common headers names between boards and cpus.
Except native that has a 'periph_conf.h' in cpu instead of being in board.
iotlab-m3 boards always ended up not being able to flash after time.
This changes managed to fix and flash boards that where able to be flashed with
the deprecated `ft2232` driver and not with the `ftdi` driver used in RIOT.
It combines configuration from openocd, iot-lab, RIOT config and Alexandre
Abadie feedback
* http://repo.or.cz/openocd.git/blob/HEAD:/tcl/interface/ftdi/iotlab-usb.cfg
* ftdi configuration
* https://github.com/iot-lab/iot-lab-gateway/blob/2.4.1/gateway_code/static/iot-lab-m3.cfg
* `trst_and_srst` config
* Alexandre feedback and http://openocd.org/doc/html/Reset-Configuration.html
* 'connect_assert_srst' reset configuration
* it prevents errors in the output on first flash
* should help on boards with invalid code
* It was taken from what Alexandre found for board 'b-l072z-lrwan1'
* It requires using '-c reset halt' instead of '-c halt' before debug
* RIOT
* Keep the `configure -rtos` auto