1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

1647 Commits

Author SHA1 Message Date
bors[bot]
e15304788b
Merge #19921
19921: dist/tools/pyterm: set exclusive access on port r=benpicco a=benpicco




Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-09-13 11:22:52 +00:00
Benjamin Valentin
dad593a5f5 dist/tools/pyterm: set exclusive access on port
A common source of error is that a user connects to a serial port that
has already been opened in another terminal.
This may lead to garbled output or no output at all.

To avoid this, claim exclusive access on the serial port so we get a
proper error instead of corrupted output.
2023-09-13 12:04:52 +02:00
bors[bot]
9be022afd8
Merge #18547
18547: sys: PSA Crypto API implementation r=MrKevinWeiss a=Einhornhool

### Contribution description
This adds an implementation of the ARM [PSA Crypto API](https://armmbed.github.io/mbed-crypto/html/index.html) specification to RIOT. 

It is a cryptographic API that supports software and hardware backends as well as the use of multiple secure elements, which can be configured with Kconfig.
It integrates indirect, identifier based key management to support persistent storage of key material in local memory and devices with protected key storage.

A description of the implementation design and an evaluation of the processing time and memory overhead in RIOT has been published here: [Usable Security for an IoT OS: Integrating the Zoo of Embedded Crypto Components Below a Common API](https://arxiv.org/abs/2208.09281)

#### Implementation status
So far this implementation supports the following operations:
- Volatile key storage
- AES in CBC mode
- Hashes (MD5, SHA1, SHA224, SHA256)
- HMAC SHA256
- ECDSA with NIST P192 and P256 curves

The following backends are supported so far:
- RIOT Cipher Module
- RIOT Hash Module
- Micro ECC library package
- Cryptocell 310 hardware accelerator on the Nordic NRF52840dk
- Microchip ATECC608A secure element

Other operations and backends as well as persistent key storage can and will be implemented by me and anyone who wants to contribute in the future.

### Testing procedure
So far there is a show case application in `examples/psa_crypto` to demonstrate the usage and configuration of different backends of the API (refer to the application README for more information). 


Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
2023-09-04 08:15:08 +00:00
Lena Boeckmann
a0ccbce5a8 dist/tools/codespell: Add ignored words 2023-09-04 09:58:49 +02:00
Gunar Schorcht
ebe51e7f51 drivers/stmpe811: introduce coordinate conversion
To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates from the touch display by swapping and mirroring. For the sake of simplicity, possible rotations are additionally defined.
2023-09-02 17:01:46 +02:00
Gunar Schorcht
ca6760047c drivers/ft5x06: introduce coordinate conversions
To obtain coordinates from the touch panel that correspond to the display coordinates, it is often necessary to convert the coordinates from the touch display by swapping and mirroring. For the sake of simplicity, possible rotations are additionally defined.
2023-08-26 17:49:29 +02:00
bors[bot]
576731ca97
Merge #19452
19452: dist/tools/esptools: upgrade ESP32x toolchains to GCC version 12.2 r=MrKevinWeiss a=gschorcht

### Contribution description

This PR upgrades ESP32x toolchains to GCC version 12.2 which is a prerequisite for upgrading the ESP-IDF to version 5.1.

This PR depends on PR #19450 

### Testing procedure

`dist/tools/install.sh all` should install all ESP32x toolchains.
`. dist/tools/export.sh all` should make them visible.

### Issues/PRs references

Depends on PR #19450 

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-08-01 12:19:48 +00:00
Gunar Schorcht
3472e27ba0 dist/tools/codespell: ignore NOE and NWE signal names 2023-07-26 09:02:10 +02:00
Gunar Schorcht
a83d5ba9b1 dist/tools/esptool: set --retry for curl in install.sh for stability 2023-07-25 23:42:11 +02:00
Gunar Schorcht
1438d41347 dist/tools/esptools: upgrade to gcc 12.2 2023-07-25 23:42:11 +02:00
bors[bot]
bff745236c
Merge #19817 #19826 #19841 #19842
19817: compile_and_test_for_boards: Add no-compile flag r=benpicco a=MrKevinWeiss


### Contribution description

Since we have a no-test flag that prevents executing tests, I think a no-compile flag is a nice compliment. Why? Well if I want to use this script for running multiple boards at the same time, RIOT is not so great handling parallel compile steps with conflicts on lockfiles happening, mostly due to packages. With this I can compile a list of boards sequentially, then flash and run tests in parallel, skipping the compile step.


### Testing procedure

Run the following once to compile and clean:
```
./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . native --applications tests/sys/shell --clean-after
```

Then try to run without the compile step and it should fail due to lack of the binary
```
./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . native --applications tests/sys/shell --no-compile
```

### Issues/PRs references


19826: ztimer/periodic: reinit remove from right clock and handle aquired ztimer r=benpicco a=kfessel

### Contribution description

#19806 added some retinit handling for ztimer periodic removing the timer from the new clock 

This tries to detect if this is a reinit and remove the timer from the old clock
this also removes the ztimer_acquire/_release handling by removing now calls in favour of set return value and now values  that are allready in ztimer,
that also has the potential to reduce the jitter of the periodic calls and bus-usage (for cpus that take their time to get "now") 

### Testing procedure

read

run tests/sys/ztimer_periodic

### Issues/PRs references

Fixes #19806 

19841: boards/adafruit-itsybitsy-nrf52: Add configuration for DotStar LED r=benpicco a=jimporter



19842: cpu/stm32: fix ld script for SRAM4 r=benpicco a=gschorcht

### Contribution description

This PR fixes the LD script for STM32.

Since the CCM and SRAM4 length are defined as symbols with perifx `_`, the LD script didn't use them correctly. Instead of using `ccmram_length` and `sram4_length`, `_ccmram_length` and `_sram4_length` have to be used. Furthermore, the location counter for the SRAM has to be set to the beginning of SRAM4 to work.

BTW, I don't understand why the `ccmram` region is defined. There is no section definition that would use it to place code or data with attribute `.ccmram.*` there.

Without the fix in this PR, defined symbols in `tests/sys/malloc` for the `b-u585i-iot02a` board were:
```python
00000000 T _sheap2     <== wrong start position because of wrong location counter
28000000 T _eheap2     <== wrong end position because of `sram4_length` is 0.
```
Although the `tests/sys/malloc` crashes for `b-u585i-iot02a` at the end of the heap (known problem, see [here](https://github.com/RIOT-OS/RIOT/pull/17410#issuecomment-996556823)), it uses only the backup RAM before it crashes:
```
Allocated 512 Bytes at 0x200bf600, total 756072
Allocated 512 Bytes at 0x200bf818, total 756592
Allocated 512 Bytes at 0x200bfa30, total 757112
Allocated 512 Bytes at 0x200bfc48, total 757632
Allocated 512 Bytes at 0x40036408, total 758152
Allocated 512 Bytes at 0x40036610, total 758672
Allocated 512 Bytes at 0x40036818, total 759192
```

With the fix in this PR, defined symbols in `tests/sys/malloc` for the `b-u585i-iot02a` board are:
```python
28000000 T _sheap2     <== correct start position
28004000 T _eheap2     <== correct end position
```
`tests/sys/malloc` also crashes for the `b-u585i-iot02a` at the end of the heap, but it uses also the SRAM4 before it crashes.
```
Allocated 512 Bytes at 0x200bf600, total 756072
Allocated 512 Bytes at 0x200bf818, total 756592
Allocated 512 Bytes at 0x200bfa30, total 757112
Allocated 512 Bytes at 0x200bfc48, total 757632
Allocated 512 Bytes at 0x40036408, total 758152
Allocated 512 Bytes at 0x40036610, total 758672
Allocated 512 Bytes at 0x40036818, total 759192
Allocated 512 Bytes at 0x28000008, total 759712
Allocated 512 Bytes at 0x28000210, total 760232
Allocated 512 Bytes at 0x28000418, total 760752
...
Allocated 512 Bytes at 0x280038e8, total 774272
Allocated 512 Bytes at 0x28003af0, total 774792
Allocated 512 Bytes at 0x28003cf8, total 775312
```

### Testing procedure

1. Flash `tests/sys/malloc` and use `MAX_MEM` limit to stop `malloc` before the crash:
   ```
   CFLAGS='-DMAX_MEM=774800 -DCHUNK_SIZE=512 -DDEBUG_ASSERT_VERBOSE' \
   BOARD=b-u585i-iot02a make -j8 -C tests/sys/malloc flash
   ```
   Without the PR it crashes at the end of the backup RAM. With the PR it works.

2. Check `_sheap2` and `_eheap2` with
   ```
   nm -s tests/sys/malloc/bin/b-u585i-iot02a/tests_malloc.elf | grep heap2 | sort
   ```
   Without the PR it will be:
   ```
   00000000 T _sheap2
   28000000 T _eheap2
   ```
   With the PR it should be:
   ```
   28000000 T _sheap2
   28004000 T _eheap2
   ```

### Issues/PRs references


Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Jim Porter <jporterbugs@gmail.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-24 10:50:36 +00:00
MrKevinWeiss
d12d5925de
compile_and_test_for_boards: Add no-compile flag
Since we have a no-test flag that prevents executing tests, I think
a no-compile flag is a nice compliment. Why? Well if I want to use
this script for running multiple boards at the same time, RIOT is
not so great handling parallel compile steps with conflicts on
lockfiles happening, mostly due to packages. With this I can
compile a list of boards sequentially, then flash and run tests
in parallel, skipping the compile step.
2023-07-18 12:22:36 +02:00
Dylan Laduranty
1007f020ea dist/tools/usb-serial/find-tty.sh: call ttys.py with its path
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-13 16:43:57 +02:00
Dylan Laduranty
3b85c56646 dist/tools/usb-serial/list-ttys.sh: call ttys.py with its path
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-07-13 16:36:12 +02:00
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
Marian Buschsieweke
45b353c6ef
cpu/msp430: make use of vendor header files
The MSP430 vendor files already provide macros containing register
constants and symbols (provided via linker scripts) containing addresses
of peripheral registers. So lets make use of that rather than
maintaining a long list of constants.
2023-07-04 20:21:05 +02:00
Marian Buschsieweke
efb3a32a8d
dist/tools/doccheck: update exclude patterns 2023-06-26 17:24:07 +02:00
bors[bot]
970734efd8
Merge #19750
19750: dist/tools/usb-serial: Fix handling of None while quoting r=aabadie a=maribu

### Contribution description

This fixes:

    Traceback (most recent call last):
      File "/home/maribu/Repos/software/RIOT/master/dist/tools/usb-serial/ttys.py", line 259, in <module>
        print_ttys(sys.argv)
      File "/home/maribu/Repos/software/RIOT/master/dist/tools/usb-serial/ttys.py", line 255, in print_ttys
        print_results(args, ttys)
      File "/home/maribu/Repos/software/RIOT/master/dist/tools/usb-serial/ttys.py", line 189, in print_results
        if item.rfind(args.format_sep) >= 0:
           ^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'rfind'

Which occurs while testing whether a string requires special quoting if an attribute is None.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-22 05:40:27 +00:00
Marian Buschsieweke
6192c620c8
dist/tools/usb-serial: Fix handling of None while quoting
This fixes:

    Traceback (most recent call last):
      File "/home/maribu/Repos/software/RIOT/master/dist/tools/usb-serial/ttys.py", line 259, in <module>
        print_ttys(sys.argv)
      File "/home/maribu/Repos/software/RIOT/master/dist/tools/usb-serial/ttys.py", line 255, in print_ttys
        print_results(args, ttys)
      File "/home/maribu/Repos/software/RIOT/master/dist/tools/usb-serial/ttys.py", line 189, in print_results
        if item.rfind(args.format_sep) >= 0:
           ^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'rfind'

Which occurs while testing whether a string requires special quoting
if an attribute is None.
2023-06-21 22:13:21 +02:00
Fabian Hüßler
1b93025ab1 dist/tools/openocd: start debug-server in background and wait 2023-06-15 19:27:15 +02:00
bors[bot]
829af7c105
Merge #19703 #19724 #19735
19703: cpu/sam0_eth: interrupt based link detection/auto-negotiation r=benpicco a=benpicco



19724: dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable r=benpicco a=fabian18



19735: nrf5x_common: Clear I2C periph shorts r=benpicco a=bergzand

### Contribution description

The I2C peripheral's shortcuts are used with the read and write register to automatically stop the I2C transaction or to continue with the next stage.

With simple I2C read and write bytes these shorts are not used, but are also not cleared by the function in all cases, causing it to use the shortcut configuration set by a previous function call. This patch ensures that the shorts are always set by the read and write functions

### Testing procedure

Should be possible to spot with a logic analyzer and the I2C periph test. Maybe the HIL test can also detect it :)

### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-06-14 12:34:33 +00:00
bors[bot]
5e7c6c2ff7
Merge #19697 #19725
19697: drivers/sx127x: reduce use of floats r=benpicco a=maribu

### Contribution description

Convert the floating point arithmetic to integer arithmetic.


19725: buildsystem: add target debug-client r=benpicco a=fabian18



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-06-13 19:08:40 +00:00
Fabian Hüßler
17d0e586c5 dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable 2023-06-13 21:04:27 +02:00
bors[bot]
0fdea67238
Merge #19723
19723: dist/tools/openocd: add RTT port variable r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-06-12 10:23:49 +00:00
Fabian Hüßler
c76a192eb8 openocd: support target debug-client 2023-06-10 01:03:30 +02:00
Fabian Hüßler
4e1ac37400 buildsystem: add target debug-client 2023-06-10 00:04:56 +02:00
Fabian Hüßler
dbfb0ea76a dist/tools/openocd: add RTT port variable 2023-06-09 23:49:35 +02:00
Oleg Hahm
30e1d3ef8a tools/jlink.sh: start gdb server with setsid
Adopted from openocd script in order to prevent killing the gdb server
upon SIGINT.
2023-06-09 15:33:14 +02:00
MrKevinWeiss
bfd9153391
tools/kconfiglib: Update to RIOT-OS package 2023-05-31 12:55:47 +02:00
7bac10f13d
dist/tools/buildsystem_sanity_check: add check for tests subdirs 2023-05-28 09:42:40 +02:00
bors[bot]
993c10a2a2
Merge #19556 #19662
19556: tools/mspdebug: fix `make debug` and `make debugserver` r=aabadie a=maribu

### Contribution description

The semantics of `make debug` and `make debugserver` have changed in the years since the MSP430 integration. This brings the implementation back into line with the current semantics

- `make debug` now starts both mspdebug and GDB, no need to run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added


19662: driver/lc709203f: remove unnecessary use of float r=aabadie a=kfessel

### Contribution description

removes a unnecessary use of float

### Testing procedure

read and test if you got that hardware (I don't)

### Issues/PRs references

#19614 

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-05-24 15:54:23 +00:00
Marian Buschsieweke
ca15b1e1f8
tools/mspdebug: fix make debug and make debugserver
The semantics of `make debug` and `make debugserver` have changed in
the years since the MSP430 integration. This brings the implementation
back into line with the current semantics

- `make debug` now starts both mspdebug and GDB, no need to
  run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase
  cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added
2023-05-24 17:00:38 +02:00
bors[bot]
7e75fdf2c5
Merge #19620
19620: dist/tools/openocd: fix parsing of flash bank base r=aabadie a=maribu

### Contribution description

Since [80fc9fabc66a0bc767467fa14c703e5a9f340cd3] the format of the `flash list` command changed to a more human readable multi-line variant. Technically, the change is white-space only. Still, the current approach of parsing them with awk, sed and cut doesn't like the new multi-line format. The parsing is now delegated into a python script that is compatible across OpenOCD versions.

[80fc9fabc66a0bc767467fa14c703e5a9f340cd3]: 80fc9fabc6


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-23 23:08:27 +00:00
bors[bot]
8408d69ea8
Merge #19602
19602: dist/tools/compile_commands: add another workaround r=chrysn a=maribu

### Contribution description

Filter out GCC only `--param=min-pagesize=0` in `clangd` mode. This fixes compilation of rust applications, that now fails with:

    thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("error: argument unused during compilation: '--param=min-pagesize=0' [-Wunused-command-line-argument]\n")', /home/maribu/.cargo/git/checkouts/rust-riot-sys-d12733b89271907c/b4bd4bd/build.rs:224:10


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-23 10:44:46 +00:00
bors[bot]
f3150120f7
Merge #17425
17425: cpu/rpx0xx: initial PIO support r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
2023-05-23 07:02:45 +00:00
Fabian Hüßler
13522d4ee5 dist/tools: fix compilation of elf2uf2 2023-05-23 08:49:37 +02:00
Marian Buschsieweke
dd19110e8a
dist/tools/compile_commands: add another workaround
Filter out GCC only `--param=min-pagesize=0` in `clangd` mode. This
fixes compilation of rust applications, that now fails with:

    thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("error: argument unused during compilation: '--param=min-pagesize=0' [-Wunused-command-line-argument]\n")', /home/maribu/.cargo/git/checkouts/rust-riot-sys-d12733b89271907c/b4bd4bd/build.rs:224:10
2023-05-22 13:26:03 +02:00
Marian Buschsieweke
47ec58dc9b
dist/tools/openocd: fix parsing of flash bank base
Since 80fc9fabc66a0bc767467fa14c703e5a9f340cd3 the format of the
`flash list` command changed to a more human readable multi-line
variant. Technically, the change is white-space only. Still, the
current approach of parsing them with awk, sed and cut doesn't like
the new multi-line format. The parsing is now delegated into a
python script that is compatible across OpenOCD versions.
2023-05-19 13:12:12 +02:00
Marian Buschsieweke
5457014c4a
build-system: Allow out of tree BUILD_DIR
- Replace all users of `$(RIOTBASE)/build` with the already present
  `$(BUILD_DIR)` variable
- Replace all users of `$(BUILD_DIR)/pkg` with the already present
  `$(PKGDIRBASE)` variable
- Create a `CACHEDIR.TAG` file in the `$(BUILD_DIR)`
2023-05-16 22:23:03 +02:00
bors[bot]
070025f119
Merge #19558 #19598
19558: boards: support for Olimex MSP430-H1611 board r=maribu a=maribu

### Contribution description

- implement a clock driver so that boards declare their clock configuration, rather than initializing the CPU clock in `board_init()` by hand
    - Note: A board can still overwrite the weak symbol `clock_init()` in case some really crazy things should happen
- add support for the Olimex-H1611 board


19598: dist/tools/insufficient_memory: fix collection of app folders r=maribu a=maribu

### Contribution description

There is actually a make target to list the applications in the repo. Let's just use that.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-16 13:20:47 +00:00
Marian Buschsieweke
4f4616bb35
dist/tools/insufficient_memory: fix collection of app folders
There is actually a make target to list the applications in the repo.
Let's just use that.
2023-05-16 14:59:53 +02:00
Marian Buschsieweke
df5c319978
cpu/msp430fxyz: clean up clock initialization
Provide a common clock initialization driver rather than leaving
clock initialization to the boards code. A declarative description of
the board's clock configuration using a struct does still allow to
fine-tune settings. In addition, a board is still allowed to just
provide a custom `void clock_init(void)` if there really is the need
to do crazy things.
2023-05-16 10:05:09 +02:00
Marian Buschsieweke
022dde89b7
dist/tools/insufficient_memory: handle address space wraps
When a region wraps around the address space, the application typically
is way too large to fit into the 16 bit address space of 16 bit or
8 bit platforms. Hence, classify this as "too big" in the tools.
2023-05-15 21:56:46 +02:00
023e676a1a
compile_like_murdock.py: fix path to test applications 2023-05-13 19:08:37 +02:00
3989cd79ff
treewide: fix path to shell related tests in doc 2023-05-13 18:27:58 +02:00
Fabian Hüßler
cea57ef1f2 tools/pioasm: Add PIO assembler pioasm 2023-05-12 23:03:05 +02:00
b8001f48b2
tools/buildsystem_sanity_check: update exclude list 2023-05-11 14:30:51 +02:00
f9d247791d
treewide: replace occurrences of tests/driver_ with new path 2023-05-06 15:38:21 +02:00
07d2e1c228
treewide: replace remaining occurrences of tests/pkg_* 2023-05-06 07:55:03 +02:00
74eb56e141
dist/tools/vera++: fix exclude rules for tests/pkg/utensor 2023-05-06 07:55:01 +02:00
bors[bot]
9c6291e19f
Merge #19548
19548: boards/telosb: minor clean ups r=maribu a=maribu

### Contribution description

This cleans up the documentation and the header files of the TelosB board. It is supposed to not changed the generated firmware (except for debug symbols).


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-04 20:20:25 +00:00
Marian Buschsieweke
b0e5bbca46
dist/tools/doccheck: generalize exclude patterns
Generalize exclude patterns for MSP430 board macros to match
undocumented macros regardless of whether they are in `board.h` or in
`periph_conf.h`.
2023-05-04 22:16:22 +02:00
Marian Buschsieweke
666dc23266
dist/tools/jlink/jlink.sh: allow flashing with ELF file
Adapt the script to flash files as ELF file if the file extension is
`.elf`, otherwise stick with default behavior and flash as bin file.
2023-05-03 15:32:17 +02:00
Marian Buschsieweke
73e7e30795
dist/tools/codespell: ignore false positives
Add two false positives to the list of words to ignore.
2023-05-02 09:53:16 +02:00
Alain Péteut
25df307ea1 dist/tools: Use /usr/bin/env to lookup Python.
Fixes some Python scripts which didn't use `/usr/bin/env`.
2023-04-10 14:39:42 +02:00
MrKevinWeiss
1a2ed1fecc
tools/compile_like_murdock: Add simple test 2023-03-24 13:21:30 +01:00
MrKevinWeiss
f3dea757e9
tools/compile_like_murdock: Fix default board case... 2023-03-24 13:21:26 +01:00
Gunar Schorcht
43ac5d4c33 dist/tools/openocd: fix flash_addr function for openocd v0.12 2023-03-19 12:06:58 +01:00
MrKevinWeiss
c9cfd27d3b tools/compile_like_murdock: Add -m to only check mod/pkgs 2023-03-08 14:35:03 +01:00
MrKevinWeiss
df3f0ce71c tools/compile_like_murdock: -v -vv -vvv verbosity settings 2023-03-08 07:59:57 +01:00
MrKevinWeiss
57899387a0 tools/compile_like_murdock: Allow 'all' boards 2023-03-08 07:59:56 +01:00
MrKevinWeiss
1bc8cdabc1 tools/compile_like_murdock: Ignore warning from info-* 2023-03-08 07:59:56 +01:00
bors[bot]
743ae3f095
Merge #19242
19242: usbus/msc: add initial Mass Storage Class support r=benpicco a=dylad

### Contribution description

This PR adds the initial support for Mass Storage Class in USBUS. This PR relies on the RIOT MTD implementation to implement the Mass Storage Class support. With the provided test application, a MTD device will be accessible as a normal storage device on your host computer.
Read and Write operations are allowed.
Multiple LUNs are supported so several MTD devices can be exported through USB.
The MSC relies on SCSI protocol to operate.

Currently there are some limitations:
    Supported host : Linux & Windows (macOS is untested)
    MSC cannot be used if MTD page size > 4096
    MTD device must have at least 512 bytes of memory to be exported.

Please be aware that performance are not so great.

### Testing procedure
Flash `tests/usbus_msc` application on a board with at least one MTD device.
Once the shell has started, prepare one or several MTD devices to be exported using `add_lun` command.
Once ready, start the USB connection with `usb_attach`

All MTD exported should appear as` /dev/sdX` on Linux.

### Issues/PRs references
Supersede #15941 


Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-03-02 22:19:41 +00:00
Dylan Laduranty
854d3b7e94 dist/tools/doccheck: remove false positives
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-03-02 22:04:08 +01:00
Benjamin Valentin
3ce5fd592a dist/tools/edbg: bump edbg version 2023-03-01 17:33:07 +01:00
ea1ab1a092
esptools/install.sh: Fix shellcheck issues
Quote all the things!
2023-02-27 13:58:34 +01:00
Marian Buschsieweke
48a02d60e2
dist/tools/usb-serial/ttys.py: Allow combining simple formats
For scripts it can be useful to output not only one, but multiple
formats (e.g. to obtain both path and serial of a TTY). The script
now support passing multiple formats.

Note that only simple formats can be combined, as the JSON and markdown
table won't mix well with any other format.
2023-02-24 16:49:44 +01:00
bors[bot]
1de75a6cbb
Merge #19309
19309: ci/print_versions: print all ESP32 toolchains r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-24 13:12:07 +00:00
Benjamin Valentin
0ecba666b9 ci/print_versions: don't print compiler error 2023-02-23 23:51:25 +01:00
Benjamin Valentin
c89eccd219 ci/print_versions: print all ESP32 toolchains 2023-02-23 23:49:14 +01:00
Marian Buschsieweke
fe176f5b1f
dist/tools/insufficient_memory: Minor improvements
`create_makefile.sh`:
- address all shellcheck warnings
- make script POSIX shell compatible
- use nproc to set the number of parallel jobs to increase throughput
- print error messages when building fails
- run `make info-boards-supported` with `EXTERNAL_BOARD_DIRS=""` to
  avoid adding out-of-tree boards to `Makefile.ci`.
- classify output as "not supported" also when used features are
  blacklisted, not only when required features are missing
- classify output as "not supported' also when output contains
  `not supported.  Stop.`, e.g. as raised by pkg/tinyusb on unsupported
  CPUs / CPU families.

`add_insufficient_memory_board.sh`:
- classify output as "not supported" also when used features are
  blacklisted, not only when required features are missing
- classify output as "not supported' also when output contains
  `not supported.  Stop.`, e.g. as raised by pkg/tinyusb on unsupported
  CPUs / CPU families.
2023-02-23 13:47:00 +01:00
Marian Buschsieweke
f7b032e444
dist/tools/insufficient_memory: Improve and clean up script
- drop all bash specifics and use generic sh
- fix all shellcheck warnings
- use nproc instead of hard-coded `-j4`
- print output on (real) compilation error
2023-02-21 12:07:02 +01:00
bors[bot]
dd2d336962
Merge #19240 #19248 #19255
19240: tools/doccheck: add simple exclude to doccheck r=benpicco a=kfessel

while doccheck runs for #19228 and #19220, i saw some spikes in memory consumption, turned out that was `grep -Evf dist/tools/doccheck/exclude_patterns` using about 2GB RAM. This PR changes that.

### Contribution description

add `exclude_simple`  to `doccheck` drived from `exclude patterns`
`sort`ed and `uniq`ued the simple excludes
removes no longer needed patterns from `exclude patterns`

simple excludes are string rules (no patterns just strings) 
how to apply these:
in this PR: 
*remove the path and line number from the rule
* that made some of them doubles of each other
* sorted and uniqued them. 
* this set of excludes is no longer path specific (an exception covers all paths but may of them still contain a file name)

another possible solution would be to have the excludes line number specific.

### Testing procedure

run `dist/tools/doccheck/check.sh`

compare memory consumption of 
master: `grep -Evf dist/tools/doccheck/exclude_patterns`
to 
this PR: `grep -Fvf dist/tools/doccheck/exclude_simple`

### Issues/PRs references



19248: cpu/gd32v: add periph_dac support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_dac` support for GD32VF103.

### Testing procedure

`tests/periph_dac` should work on `sipeed-longan-nano` port on PA4 and PA5.

### Issues/PRs references

19255: boards/esp*: complete SD Card MTD config r=benpicco a=gschorcht

### Contribution description

This PR provides the remaining changes necessary to use the generic MTD SD Card configuration as described in PR #19216. 

This includes defining the MTD offset for SD cards, since the default `MTD_0` device always uses the internal flash device, and the completion of the configuration for the ESP32 boards with a SD card interface.

### Testing procedure

`tests/vfs_default` should work now with SD Cards:
```
main(): This is RIOT! (Version: 2023.04-devel-323-gfcc07)
mount points:
	/nvm0
	/sd0

data dir: /sd0
> vfs df 
Mountpoint              Total         Used    Available     Use%
/nvm0                3052 KiB        8 KiB     3044 KiB       0%
/sd0                 7580 MiB 3632148992 B   21089792 B      99%
```

### Issues/PRs references


Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-07 14:55:44 +00:00
Gunar Schorcht
066b9216ad dist/toos/doccheck: add DAC configu to generic_exclude_pattern 2023-02-07 02:42:19 +01:00
Karl Fessel
ce6a42ebdd tools/doccheck: add simple exclude to doccheck
uniq and sorted simple excludes
removes no longer needed exclude patterns
2023-02-06 16:35:43 +01:00
bors[bot]
f3a487b5e4
Merge #12509
12509: black/white e-Paper/e-Ink display driver r=bergzand a=silkeh



Co-authored-by: Silke Hofstra <silke@slxh.eu>
2023-02-04 09:57:17 +00:00
bors[bot]
8700157f92
Merge #19220 #19232
19220: dist/tools/doccheck: Fix grep warning r=benpicco a=maribu

### Contribution description

Fix `grep: warning: stray \ before -` warnings.

### Testing procedure

```
$ ./dist/tools/doccheck/check.sh
```
Should no longer print lots of the warning anymore

### Issues/PRs references


19232: build system: Fix linker feature test with newlib 4.3.0 r=benpicco a=maribu

### Contribution description

Before the build system used something like

    echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic <FLAGS_TO_TEST>

to check for flags supported by the compiler (used as linker frontend). This however no longer works with newlib 4.3.0, which requires the symbols `_sbrk_r`, `_close_r`, `_lseek_r`, `_read_r`, and `_write_r` to be present. Instead, now a new file `minimal_linkable.c` was added that adds all the missing symbols and is used in the linker feature tests instead.

### Testing procedure

- No regressions on the CI
- No changes in binaries
- Building rust apps with newlib 4.3.0 should work again

### Issues/PRs references


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-02-02 23:40:57 +00:00
Marian Buschsieweke
2b2506c052
build system: Fix linker feature test with newlib 4.3.0
Before the build system used something like

    echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic <FLAGS_TO_TEST>

to check for flags supported by the compiler (used as linker frontend).
This however no longer works with newlib 4.3.0, which requires the
symbols `_sbrk_r`, `_close_r`, `_lseek_r`, `_read_r`, and `_write_r` to
be present. Instead, now a new file `minimal_linkable.c` was added that
adds all the missing symbols and is used in the linker feature tests
instead.
2023-02-02 20:47:37 +01:00
Marian Buschsieweke
7868963cc3 dist/tools/doccheck: Fix grep warning
Fix `grep: warning: stray \ before -` warnings.
2023-02-02 12:47:13 +01:00
Gunar Schorcht
57463cb0c1 dist/tools/dockcheck: add ADC config as generic exclude pattern 2023-02-01 23:11:07 +01:00
bors[bot]
12a05b8fa2
Merge #19230
19230: tools/backport_pr: remove Unnecessary "else" after "raise" r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-01 16:04:28 +00:00
Benjamin Valentin
630a82a260 tools/backport_pr: remove Unnecessary "else" after "raise" 2023-02-01 16:00:28 +01:00
bors[bot]
053f5266a5
Merge #19228
19228: doccheck: avoid generating dot or html r=benpicco a=kfessel

### Contribution description

doccheck without generating dot or html

this also has some new generated lines for exclude_pattern (some of them where broke so I regenerated the block)

### Testing procedure

doccheck 

### Issues/PRs references



Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-02-01 13:25:03 +00:00
Gunar Schorcht
929bb3e0ab dist/tools/doccheck: add ST7735 config to generic_exclude_pattern 2023-02-01 02:44:54 +01:00
Gunar Schorcht
1e5b89c40b dist/tools/doccheck: add SD_SPI CARD config to generic_exclude_pattern 2023-02-01 02:44:54 +01:00
Gunar Schorcht
4b3663ee02 dist/tools/doccheck: add SPI config to generic_exclude_pattern 2023-02-01 02:44:54 +01:00
bors[bot]
718e4a8340
Merge #16782 #19201
16782: drivers/mfrc522: add new driver r=benpicco a=HendrikVE

### Contribution description

This PR adds support for the MFRC522. It is quite common in the Arduino world and it is quite cheap. The driver connects to the MFRC522 via SPI and is heavily based on the Arduino driver available [here](https://github.com/miguelbalboa/rfid). Basically it was ported, but with several improvements in readability and documentation.

### Testing procedure

The given (manual) test provides single commands for some driver functions.

19201: cpu/gd32v: add periph_i2c support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_i2c` support and is one of a bunch of PRs that complete the peripheral drivers for GD32VF103.

The driver is a modified version of the driver for STM32F1 with some changes that were necessary to get it working on GD32V. As  for STM32F1, the driver is using polling instead of interrupts for now. It will be implemented interrupt-driven later.

### Testing procedure

`tests/periph_i2c` as well as a test with any I2C sensor should work. The driver was tested with `tests/driver_l3gxxxx` and `tests/driver_bmp180`.

### Issues/PRs references


Co-authored-by: Hendrik van Essen <hendrik.ve@fu-berlin.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-31 23:15:41 +00:00
Gunar Schorcht
51fd28f0dd dist/tools/doccheck: add I2C config to generic_exclude_pattern 2023-01-31 20:12:04 +01:00
Silke Hofstra
f4791a0280 epd_bw_spi: add generic black and white SPI e-Paper display driver
Add an initial implementation of a generic driver for black and white
e-paper displays. Includes parameters for the IL3829 display controller.
2023-01-31 19:50:11 +01:00
Karl Fessel
3de68c7651 doccheck: check without building 2023-01-31 19:36:23 +01:00
Karl Fessel
bd9ce34288 doccheck: regenerated some exclude patterns 2023-01-31 17:39:00 +01:00
Gunar Schorcht
993a65ef7d dist/tools/doccheck: add RTT config to generic_exclude_pattern 2023-01-29 18:51:59 +01:00
Gunar Schorcht
608a41213d dist/tools/doccheck: add PWM config to generic exclude pattern 2023-01-28 18:16:17 +01:00
Gunar Schorcht
31604da8fe boards/common: add common definitions for GD32VF103 boards 2023-01-23 18:59:32 +01:00
Jose Alamos
e5a80c6d44
doccheck: add mrf24j40 related exclude_patterns 2023-01-19 15:34:17 +01:00
bors[bot]
fb603f2660
Merge #18459 #18724 #19081 #19082 #19136
18459: makefiles/suit: make it possible to accept multiple SUIT keys r=miri64 a=benpicco



18724: nanocoap_sock: implement DTLS socket r=miri64 a=benpicco



19081: sys/stdio_udp: add stdio over UDP r=benpicco a=benpicco



19082: core/init: add early_init() r=benpicco a=benpicco



19136: CI: re-add "synchronize" event to check-labels r=miri64 a=kaspar030



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-13 13:50:55 +00:00
bors[bot]
89ef35f9c6
Merge #19050
19050: boards/common/cc26xx cc13xx: clean up and fix flash configs r=benpicco a=maribu

### Contribution description

- Add support for XDS110 debugger via `OPENOCD_DEBUG_ADAPTER=xds110`
- Clean up OpenOCD configs in `boards/common/cc26xx_cc13xx`
    - No longer hardcode the debugger to xds110, but use `OPENOCD_DEBUG_ADATER ?= xds110`
    - Add support for cc13x0, cc13x2, cc26x0
- `boards/cc2650*`: drop custom OpenOCD config in favor of shared one
- add variables needed to support flashing with `PROGRAMMER=jlink`
- allow specifying a custom OpenOCD command to bring the device to a halt state, as the default `reset halt` (which causes a second reset) is causing issues with the ICEPick JTAG routers in the CC26xx - CC13xx devices
- Use `halt` instead of `reset halt` for CC26xx / CC13xx boards in OpenOCD to avoid issues in flashing

### Testing procedure

```
make BOARD=cc2650-launchpad -C examples/default flash
```

Should now work. The same should still work for other cc26xx cc13xx boards.

### Issues/PRs references

Partially fixes: https://github.com/RIOT-OS/RIOT/issues/18750

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-13 00:51:31 +00:00
Gunar Schorcht
14bfabd6e9 dist/tools/esptools/export.sh: fix IDF_TOOL_PATH default setting 2023-01-10 22:12:56 +01:00
Marian Buschsieweke
3e1dcf31cb
tools/openocd: Allow specifying a custom halt command
Typically, OpenOCD is already performing a reset on connect. A
`reset halt` to bring the target to a `halt` state for flashing will
result in the device going through a second reset cycle. This can be
problematic with some device, such as the CC26xx MCUs. For these
devices, an `OPENOCD_CMD_RESET_HALT := -c 'halt'` will avoid the second
reset that is causing the issues.
2023-01-10 21:59:56 +01:00
bors[bot]
07031d0239
Merge #19099
19099: dist/tools/usb-serial: Clean up legacy scripts r=aabadie a=maribu

### Contribution description

Refactor the old bash scripts to use `ttys.py` instead and update the documentation.

### Testing procedure

The pi fleet should still work without modification.

### Issues/PRs references

Fixes https://github.com/RIOT-OS/RIOT/issues/15814

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-07 16:24:51 +00:00
Marian Buschsieweke
2cc70027b0
dist/tools/usb-serial: Clean up legacy scripts
Refactor the old bash scripts to use `ttys.py` instead and update the
documentation.
2023-01-06 15:52:09 +01:00
Marian Buschsieweke
5d93a485c5
drivers/hdc1000: Add missing doc and fix doccheck
This commits add documentation to the HDC1000 params and adds generic
exclude patters to the doc check, so that when boards provide custom
HDC1000 params they do not need to document them again. The reasoning
is that the documentation in the central place is sufficient.
2023-01-05 14:25:20 +01:00
Marian Buschsieweke
efbf6efdd3
drivers/fxos8700: Add missing doc and fix doccheck
This commits add documentation to the FXOS8700 params and adds generic
exclude patters to the doc check, so that when boards provide custom
FXOS8700 params they do not need to document them again. The reasoning
is that the documentation in the central place is sufficient.

In addition, a generic exclude patter is added to match FXOS8700_REG_*,
as the register names are relatively self-explaining and an
implementation detail of the driver that doesn't need public
documentation.
2023-01-05 14:25:20 +01:00
Marian Buschsieweke
479d5a311c
drivers/at86rf2xx: Add missing doc and fix doccheck
This commits add documentation to the AT86RF2xx params and adds generic
exclude patters to the doc check, so that when boards provide custom
AT86RF2xx params they do not need to document them again. The reasoning
is that the documentation in the central place is sufficient.
2023-01-05 14:25:19 +01:00
Marian Buschsieweke
404c8930da
sys/xtimer: Fix doccheck
Add generic patterns to allow XTIMER_DEV, XTIMER_HZ, XTIMER_WIDTH,
XTIMER_CHAN, XTIMER_BACKOFF, and XTIMER_ISR_BACKOFF to be undocumented.
The reasoning is that having them documented once is enough and warnings
for missing doc in every boards is just noise.
2023-01-05 14:25:19 +01:00
Marian Buschsieweke
fabb47bb93
drivers/tmp00x: Add missing doc and fix doccheck
This commits add documentation to the TMP00X params and adds generic
exclude patters to the doc check, so that when boards provide custom
TMP00X params they do not need to document them again. The reasoning is
that the documentation in the central place is sufficient.
2023-01-05 14:25:19 +01:00
Marian Buschsieweke
d6858a0ca4
drivers/pulse_counter: Add missing doc and fix doccheck
This commits add documentation to the pulse counter params and adds
generic exclude patters to the doc check, so that when boards provide
custom pulse counter params they do not need to document them again. The
reasoning is that the documentation in the central place is sufficient.
2023-01-05 14:25:19 +01:00
Marian Buschsieweke
395254af41
drivers/pir: Add missing doc and fix doccheck
This commits add documentation to the PIR params and adds generic
exclude patters to the doc check, so that when boards provide custom PIR
params they do not need to document them again. The reasoning is that
the documentation in the central place is sufficient.
2023-01-05 14:25:18 +01:00
d0319304ae
tools/mosquitto_rsmb: bump to latest version 2023-01-03 10:23:36 +01:00
J. David Ibáñez
d741f71ebd drivers/ds3231 fix docs, alarms are supported
Remove the text stating that setting alarms is not yet supported,
because it is, since PR #16180

Also document DS3231_PARAM_INT_PIN
2022-12-27 17:21:55 +01:00
bors[bot]
10c1909f2d
Merge #19046
19046: gnrc & coap: misc minor changes r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2022-12-14 17:18:05 +00:00
bors[bot]
d08601ec97
Merge #19039
19039: Ensure C locale when querying the compiler for compile commands r=maribu a=janhenke

### Contribution description

This fixes generating the compile commands with localization enabled GCC and non-English shell locale. The python script uses regexes to extract the required information. These only match on the default English output. GCC supports localized output messages which break the regexes used. Instead of matching any possible localization, this fix forces the C locale for message output on the compiler invocation, thus ensuring the regexes can match.

### Testing procedure

Needed: arm-none-eabi.gcc with localization support and non-English system locale.
Invoke the compile-commands make target (`make compile-commands`).

It should generate the `compile_commands.json` file correctly.

### Issues/PRs references

None found, fix was trivial enough to fix it directly.


Co-authored-by: Jan Henke <Jan.Henke@taujhe.de>
2022-12-13 18:56:57 +00:00
Jan Henke
53c8ebc287
dist/tools/compile_commands: Fix interoperability with localized GCC
GCC supports localized outputs, depending on the currently set locale.
This broke the compile-commands target, as the regexes only match the
English output. By invoking the compiler explicitly with the C locale,
it ensures the expected English language output.
2022-12-13 18:48:43 +01:00
Benjamin Valentin
2002e169dd net/coap: add COAP_CODE_TOO_MANY_REQUESTS 2022-12-13 00:27:45 +01:00
23cd98a654
tools/vagrant: fix Ubuntu version in README 2022-12-12 16:59:58 +01:00
bors[bot]
268e931f1c
Merge #19012
19012: boards/arduino-mega2560: add TTY_BOARD_FILTER r=gschorcht a=maribu

### Contribution description

This allows automatically selecting TTY actually belonging to an
Arduino Mega2560 if `MOST_RECENT_PORT=1` is set.

### Testing procedure

```
make BOARD=arduino-mega2560 MOST_RECENT_PORT=1 -C examples/default flash term
```

Should automatically select the TTY of the most recently connected Arduino Mega2560, even if a board of a different type is connect more recently.

### Issues/PRs references

- [x] depends on (and includes) https://github.com/RIOT-OS/RIOT/pull/19011

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2022-12-11 18:20:38 +00:00
Marian Buschsieweke
86b7159e37
dist/tools/usb-serial/ttys.py: return error on empty list
If no TTY serial (matching the given filters, if any) was found, use
the exit code `1`. The idea is that simple shell scripts falling back
to alternative variants of a board can be used via

```.sh
ttys.py --most-recent --model Fooboard --vendor Footronic || \
    ttys.py --most-recent --model Barboard --vendor Bartronic
```

Just adding a regex that would accept both vendors and models would
have different semantics: If both a Fooboard and a Barboard are
attached, it would pick the most recently connected of both. The shell
expression above would always prefer a Fooboard over a Borboard.

The use case cheap Arduino clones that replace the ATmega16U2 used
as USB UART bridge with cheap single purpose chips. The original
ATmega16U2 has the advantage that it provides identification data
unique the specific Arduino board, while the clones cannot be told
apart from standalone USB UART bridges or Arduino clones of other
models. Hence, we want to pick the genuine Arduino board if connected,
and only fall back to matching cheap USB UART bridges if no genuine
Arduino board is connected.
2022-12-09 13:00:54 +01:00
bors[bot]
20ddfb7e86
Merge #18803
18803: dist/tools: Add compile_like_murdock r=benpicco a=MrKevinWeiss




### Contribution description

Helper script to pre-test murdock build conditions.

This is intended to compile like murdock giving control for only a subset of boards or applications. One can use this if only a limited change should be build tested. Defaults boards and apps are selected to be an early warning if something is wrong.

This should be used before triggering much larger murdock builds.

The following use cases are:

I made a change to something in the stm32 clocks... ./compile_like_murdock.py -c stm32

I changed a driver the DHT driver
./compile_like_murdock.py -a tests/driver_dht tests/saul

I changed a nucleo-f103rb board...
./compile_like_murdock.py -a tests/driver_dht tests/saul

### Testing procedure

View the help...
```
./dist/tools/compile_test/compile_like_murdock.py -h
```

Do a dry run of the cpu...
```
./dist/tools/compile_test/compile_like_murdock.py -c stm -d
```

Play with each of the args, try adding a module to hello-world to get a module mismatch.

### 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/.
-->


Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
2022-12-08 18:40:30 +00:00
MrKevinWeiss
53d266e5a6
dist/tools: Add compile_like_murdock
Helper script to pre-test murdock build conditions.

This is intended to compile like murdock giving control for only a subset of
boards or applications. One can use this if only a limited change should be
build tested. Defaults boards and apps are selected to be an early warning
if something is wrong.

This should be used before triggering much larger murdock builds.

The following use cases are:

I made a change to something in the stm32 clocks...
./compile_like_murdock.py -c stm32

I changed a driver the DHT driver
./compile_like_murdock.py -a tests/driver_dht tests/saul

I changed a nucleo-f103rb board...
./compile_like_murdock.py -a tests/driver_dht tests/saul
2022-12-08 16:52:54 +01:00
benpicco
154b1d6397
Merge pull request #18836 from benpicco/gnrc_border_router-native
examples/gnrc_border_router: add option to re-use existing TAP interface
2022-12-07 22:34:01 +01:00
benpicco
2e50d5e448
Merge pull request #18988 from jia200x/pr/at86rf2xx/isolate_netdev
drivers/at86rf2xx: isolate netdev logic
2022-12-07 13:50:37 +01:00
Jose Alamos
1d60301599
doccheck: update AT86RF2XX macros 2022-12-06 17:53:14 +01:00
benpicco
3b23cb6171
Merge pull request #19011 from maribu/dist/tools/usb-serial/ttys.py
dist/tools/usb-serial: fix exception on missing entries
2022-12-05 14:27:42 +01:00
Marian Buschsieweke
572a713f22
dist/tools/usb-serial: fix exception on missing entries
For some TTY interfaces no DB entry exists, which is reflected by
having a `None` in `tty[key]`. Trying to match a regex against `None`
in turn resulted then in an exception.

This fixes the issue by treating a filter applied on a non-existing
entry as not matching.
2022-12-05 11:02:36 +01:00
34cfdac78a ci/can_fast_ci_run.py: add workaround for #18987 2022-11-30 09:37:34 +01:00
Juergen Fitschen
a6ff838a4b
Merge pull request #18933 from jue89/feature/cpu_efm32_series_2_adc
cpu/efm32: add periph_adc support for Gecko Series 2
2022-11-24 11:32:56 +01:00
Juergen Fitschen
ab86198112 boards/xg23-pk6068a: add ADC lines 2022-11-22 14:44:56 +01:00
benpicco
3c7c48e8d0
Merge pull request #18824 from krzysztof-cabaj/tools-cpy2remed-add-NOD
tools/cpy2remed: add support for NOD_xxxx removable media
2022-11-18 14:52:24 +01:00
krzysztof-cabaj
4cb2ed5406 tools/cpy2remed: add support for removable media name NOD_xxxx 2022-11-18 08:10:02 -05:00
Marian Buschsieweke
35149bd1c2
Merge pull request #18797 from MrKevinWeiss/pr/fixstmclk
cpu/stm32: Fix stm clock configuration
2022-11-15 11:39:25 +01:00
5c31e722d3
Merge pull request #18881 from maribu/dist/tools/backport_pr
tools/backport_pr: finally fix running outside of repo's root
2022-11-11 23:33:34 +01:00
Marian Buschsieweke
9bba2d074c
tools/backport_pr: finally fix running outside of repo's root
It turned out that 4983f8bb60 was not
enough to allow the tool to be executed from within
`dist/tools/backport_pr`. With this, I successfully tested it :)
2022-11-11 19:52:18 +01:00
Benjamin Valentin
4511f3f2a1 tapsetup: add --delay option 2022-11-11 16:54:21 +01:00
Benjamin Valentin
0eaa6edffd tapsetup: add --loss option 2022-11-11 14:41:15 +01:00
Karl Fessel
037f789718 utils/uncrustify: display warning instead of error 2022-11-10 22:20:50 +01:00
Marian Buschsieweke
4983f8bb60
tools/backport_pr.py: improve usability
Add `search_parent_directories=True` to `git.Repo()` so that
`backport_pr.py` can be called anywhere within the RIOT git repo
without manually passing the repo root path via `--gitdir`.

Previously the tool had to be called from the RIOT base repo.
2022-11-10 09:52:24 +01:00
Marian Buschsieweke
b540f6fe5e
dist/tools/flatc: Fix compilation on musl
flatc uses `strto<foo>_l()` over `strto<foo>()` when available, so that
they behave reproducible. The musl libc has no locale support, which
has the added benefit of reproducible behavior being the default.

For some reason a `strtof_l()` compatibility wrapper was added in
musl, but the other `strto<foo>_l()` wrappers are missing. This
adds a patch to check for `strtoull_l()` instead of `strtof_l()`. This
will not make a difference on a libc that supports all of them, but
fixes compilation on musl.
2022-11-09 22:33:23 +01:00
Benjamin Valentin
5260c18ae6 examples/gnrc_border_router: add option to re-use existing TAP interface 2022-11-08 15:06:33 +01:00
MrKevinWeiss
17cce015d4
treewide/stm32: Make CLOCK_HS* configurable 2022-11-03 11:37:28 +01:00
Gregory Holder
4a3240b524 dist/tools: add "RESET_PIN" value for the dwm1001
Set "RESET_PIN" to 21 if the selected board is "dwm1001".
2022-10-28 13:47:44 +02:00
Jue
77ee1c55bc boards/xg23-pk6068a: initial commit 2022-10-26 11:27:22 +02:00
Martine Lenders
9734f6f980
Merge pull request #18754 from keestux/avoid-using-deprecated
dist/tools/pyterm: avoid deprecated .setDaemon
2022-10-21 07:21:49 +02:00
Kees Bakker
627e40ae6b dist/tools/pyterm: avoid deprecated .setDaemon
Set .daemon property instead of calling .setDaemon()
2022-10-20 20:42:28 +02:00
benpicco
da5cd8fa88
Merge pull request #18755 from gschorcht/boards/sltb009a
boards: add support for EFM32GG12 Thunderboard Kit (SLTB009A)
2022-10-18 11:12:28 +02:00
Gunar Schorcht
7a6847edc7 boards: add SLTB009A EFM32GG12 Thunderboard Kit 2022-10-18 01:24:13 +02:00
benpicco
0b2fbce906
Merge pull request #18299 from fabian18/preprocessor_successor
sys: preprocessor successor module
2022-10-17 22:42:27 +02:00
Benjamin Valentin
2625f58774 makefiles/tools/serial.inc.mk: add support for bootterm 2022-10-15 00:20:09 +02:00
Fabian Hüßler
fad66e4a50 dist/tools: add script to generate preprocessor successors 2022-10-14 09:59:17 +02:00
Marian Buschsieweke
b0bccd9bed
Merge pull request #18385 from gschorcht/dist/tools/esptool/install.sh
dist/tools/esptools: add macOS support to install/export scripts
2022-10-13 13:58:58 +02:00
Benjamin Valentin
df159b47d3 codespell: add false positive for El Didi 2022-10-04 15:40:53 +02:00