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

6775 Commits

Author SHA1 Message Date
chrysn
6724e851ca Rust: Update riot-wrappers
This fixes a regression by merging https://github.com/RIOT-OS/rust-riot-wrappers/pull/55
(the "G" unit has been deprecated, but that deprecation was done wrong
in https://github.com/RIOT-OS/rust-riot-wrappers/pull/50).
2023-04-25 09:20:58 +02:00
chrysn
5f91bd8812 Rust: Update non-RIOT dependencies 2023-04-24 11:38:59 +02:00
chrysn
de410314a3 Rust: Update riot-sys and riot-wrappers
This pulls in several fixes from these repositories:

* riot-sys:
    * Add `random` module to `riot-headers` (https://github.com/RIOT-OS/rust-riot-sys/pull/26)
    * README: fix 2 typos (https://github.com/RIOT-OS/rust-riot-sys/pull/31)
    * bindgen: Use 0.64 (https://github.com/RIOT-OS/rust-riot-sys/pull/30)
    * wolfSSL support added (https://github.com/RIOT-OS/rust-riot-sys/pull/28)
    * extern-types: Generate replacement types dynamically (https://github.com/RIOT-OS/rust-riot-sys/pull/27)
    * Extern types: Add netq_t, make them large (https://github.com/RIOT-OS/rust-riot-sys/pull/25)
    * doc: Suppress warnings about things C2Rust does not uphold (https://github.com/RIOT-OS/rust-riot-sys/pull/23)
    * export macro_DAC_LINE (https://github.com/RIOT-OS/rust-riot-sys/pull/22)
    * Add BINDGEN_OUTPUT_FILE export (https://github.com/RIOT-OS/rust-riot-sys/pull/21)
* riot-wrappers:
    * DAC: Add wrapper around RIOTs DAC-interface (https://github.com/RIOT-OS/rust-riot-wrappers/pull/36)
    * saul: Compatibly rename G* variants (https://github.com/RIOT-OS/rust-riot-wrappers/pull/50)
    * tests: Add test for auto-init when auto-init debug is active (https://github.com/RIOT-OS/rust-riot-wrappers/pull/48)
    * gcoap: Provide link encoder (https://github.com/RIOT-OS/rust-riot-wrappers/pull/47)
    * Drop SUIT support in riot-wrappers (https://github.com/RIOT-OS/rust-riot-wrappers/pull/44)
    * Add an auto init module (https://github.com/RIOT-OS/rust-riot-wrappers/pull/45)
    * gcoap: Allow registration without scope for 'static listeners (https://github.com/RIOT-OS/rust-riot-wrappers/pull/43)

Through direct dependency changes (the bindgen update), the number of
transitive dependencies could be reduced.
2023-04-24 11:29:52 +02:00
bors[bot]
0101663e39
Merge #19485
19485: sys/shell: Fix missing dependency r=aabadie a=maribu

### Contribution description

The shell commands depend on the shell module being use. This was already the case in KConfig, but was overlooked in the shell's `Makefile.dep`.

In addition, this uncovered that `tests/memarray` had a bogus dependency on shell commands without every using the shell.

### Testing procedure

Ideally binaries should not differ (except for debug section).

### Issues/PRs references

Split out of https://github.com/RIOT-OS/RIOT/pull/19483

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-04-22 06:21:38 +00:00
Martine Lenders
4f1e2a3709 gnrc_rpl_srh: check header fields consistency before substraction 2023-04-21 11:40:47 +02:00
Marian Buschsieweke
12140ffb0e
examples,tests: Drop redundant dependency
When depending on one or more shell commands, the shell is pulled in
as dependency anyway.
2023-04-19 16:58:10 +02:00
Gunar Schorcht
373b10e18c tests/riotboot_flashwrite: blacklist GD32V boards 2023-04-19 12:54:35 +02:00
Marian Buschsieweke
5e28ec5a63
tests/memarray: Drop bogus dependency
There is no need for shell commands if there is no shell.
2023-04-19 12:24:54 +02:00
Gunar Schorcht
c92b981581 boards/spieed-longan-nano: use stdio_cdc_acm by default 2023-04-16 23:24:23 +02:00
Gunar Schorcht
ff6e3d4f6d boards/seeedstudio-gd32: use stdio_cdc_acm by default 2023-04-16 23:24:23 +02:00
f50be77e05
tests/Makefile.boards.netif: add lora-e5-dev 2023-04-13 10:55:24 +02:00
a5699d0d5d
tests/Makefile.boards.netif: add nucleo-wl55jc 2023-04-13 10:55:24 +02:00
Gunar Schorcht
89f18c7821 tests/littlefs: remove blacklisted boards due to reduced sector count
Removing boards blacklisted for insufficient memory after reducing the number of sectors of the emulated MTD.
2023-04-12 11:37:24 +02:00
Gunar Schorcht
4af1fa6a3d tests/littlefs: reduce sector count for emulated MTD
A `SECTOR_COUNT` of 12 seems to be sufficient to work for this test in emulated MTD.
2023-04-12 11:23:58 +02:00
Gunar Schorcht
4bb283cb4b tests/usbus_msc: use emulated MTD as test mockup 2023-04-12 06:27:12 +02:00
Gunar Schorcht
631df7c69c tests/spiffs: use emulated MTD as test mockup 2023-04-12 06:27:12 +02:00
Gunar Schorcht
f724f34ac2 tests/littlefs2: use emulated MTD as test mockup 2023-04-12 06:27:12 +02:00
Gunar Schorcht
af5b75a9a1 tests/littlefs: use emulated MTD as test mockup 2023-04-12 06:27:12 +02:00
Gunar Schorcht
0cdcac96bc tests/unittests/test-mtd: use emulated MTD as test mockup 2023-04-12 06:27:12 +02:00
bors[bot]
d769537ad3
Merge #19457
19457: tests/drivers_at24cxxx: make it easier to select other EEPROMS r=fabian18 a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-04-06 12:14:23 +00:00
Fabian Hüßler
b45a3f9ad0 tests/drivers_at24cxxx: make it easier to select other EEPROMS 2023-04-06 12:51:09 +02:00
ca0d0758bf
Revert "tests/usbus_cdc_ecm: blacklist stm32f429i-disco"
This reverts commit 281db4bfa8.
2023-03-31 16:44:03 +02:00
Gunar Schorcht
281db4bfa8 tests/usbus_cdc_ecm: blacklist stm32f429i-disco
The board no longer uses the `periph_usbdev_hs` module. Therefore, the maximum number of EPs used is that of the USB OTG FS peripheral, which is only 4. This is not sufficient for this test application since the board uses `stdio_cdc_acm`.
2023-03-31 12:27:51 +02:00
Gunar Schorcht
be03323977 tests/driver_ws281x: add ESP32x CI boards to test ws281x_esp32_sw
fixup! tests/driver_ws281x: add ESP32x CI boards to test ws281x_esp32_sw
2023-03-29 08:57:36 +02:00
MrKevinWeiss
95c238a974
tests/cpp11_thread: Update BOARD_INSUFFICIENT_MEMORY 2023-03-27 13:48:13 +02:00
MrKevinWeiss
4795965ac2
tests/cpp11_thread: Use ztimer64_usec instead of xtimer 2023-03-24 12:36:57 +01:00
MrKevinWeiss
8e7407e5f6
tests/cpp11_condition_variable: Use ztimer64_usec instead of xtimer 2023-03-24 12:36:57 +01:00
bors[bot]
50cd32fbbf
Merge #19397 #19416 #19418 #19419
19397: drivers/usbdev_synopsys_dwc2: fix and reenable DMA mode r=benpicco a=gschorcht

### Contribution description

This PR fixes the DMA mode for all STM32 USB OTG HS cores (including that for STM32F4xx CID 1.xxx) and reenables it. It fixes remaining problems in issue #19359.

This PR includes also includes some changes that are needed to use the DMA mode:
- EP number is used as defined in CMSIS (if defined) for STM32
- `periph_usbdev_hs` feature is added in Kconfig
- `periph_usbdev_hs` feature is added in board definition of `stm32f429i-disc1`
- largest number of available EPs is used for STM32 instead of the smallest number (to be able to use all EPs of HS peripheral)
- `stm32f429i-disco` is removed from blacklist in `tests/usbus_cdc_ecm` since it uses the HS peripheral

### Testing procedure

The following tests should work
```python
USEMODULE=stdio_cdc_acm BOARD=stm32f429i-disc1 make -j8 -C tests/usbus_cdc_ecm flash
```
<details>
<summary>Test results</summary>

```python
[526755.875691] usb 1-2.2: new full-speed USB device number 106 using xhci_hcd
[526755.977853] usb 1-2.2: config 1 interface 3 altsetting 1 endpoint 0x84 has invalid maxpacket 512, setting to 64
[526755.977856] usb 1-2.2: config 1 interface 3 altsetting 1 endpoint 0x2 has invalid maxpacket 512, setting to 64
[526755.978762] usb 1-2.2: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00
[526755.978764] usb 1-2.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[526755.978766] usb 1-2.2: Product: stm32f429i-disc1
[526755.978768] usb 1-2.2: Manufacturer: RIOT-os.org
[526755.978769] usb 1-2.2: SerialNumber: 7C156425A950A8EB
[526755.991190] cdc_acm 1-2.2:1.0: ttyACM1: USB ACM device
[526755.998131] cdc_ether 1-2.2:1.2 usb0: register 'cdc_ether' at usb-0000:00:14.0-2.2, CDC Ethernet Device, a6:f6:4a:85:1d:c9
[526756.044150] cdc_ether 1-2.2:1.2 enp0s20f0u2u2i2: renamed from usb0
```

</details>

```python
USEMODULE='stdio_cdc_acm periph_usbdev_hs_utmi' BOARD=stm32f723e-disco make -j8 -C tests/usbus_cdc_ecm flash
```
<details>
<summary>Test results</summary>

```python
[528733.480207] usb 1-4.3.4: reset high-speed USB device number 32 using xhci_hcd
[528733.707800] usb 1-4.4: new high-speed USB device number 111 using xhci_hcd
[528733.808257] usb 1-4.4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11
[528733.808260] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
[528733.808263] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
[528733.808642] usb 1-4.4: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00
[528733.808645] usb 1-4.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[528733.808647] usb 1-4.4: Product: stm32f723e-disco
[528733.808649] usb 1-4.4: Manufacturer: RIOT-os.org
[528733.808651] usb 1-4.4: SerialNumber: A6BAC4E1B1E0806B
[528733.811988] cdc_acm 1-4.4:1.0: ttyACM1: USB ACM device
[528733.814456] cdc_ether 1-4.4:1.2 usb0: register 'cdc_ether' at usb-0000:00:14.0-4.4, CDC Ethernet Device, e6:75:97:3a:74:ba
[528733.854371] cdc_ether 1-4.4:1.2 enp0s20f0u4u4i2: renamed from usb0
```

</details>

```python
USEMODULE='stdio_cdc_acm periph_usbdev_hs_ulpi' BOARD=stm32f746g-disco make -j8 -C tests/usbus_cdc_ecm flash
```
<details>
<summary>Test results</summary>

```python
[529000.944482] usb 1-4.3.4: reset high-speed USB device number 32 using xhci_hcd
[529003.728260] usb 1-4.4: new high-speed USB device number 114 using xhci_hcd
[529003.833107] usb 1-4.4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11
[529003.833111] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64
[529003.833113] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64
[529003.833743] usb 1-4.4: New USB device found, idVendor=1209, idProduct=7d00, bcdDevice= 1.00
[529003.833747] usb 1-4.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[529003.833749] usb 1-4.4: Product: stm32f746g-disco
[529003.833751] usb 1-4.4: Manufacturer: RIOT-os.org
[529003.833753] usb 1-4.4: SerialNumber: 66FE8934D1A363E0
[529003.837143] cdc_acm 1-4.4:1.0: ttyACM1: USB ACM device
[529003.839755] cdc_ether 1-4.4:1.2 usb0: register 'cdc_ether' at usb-0000:00:14.0-4.4, CDC Ethernet Device, 6a:88:1f:1f:b1:f0
[529003.879025] cdc_ether 1-4.4:1.2 enp0s20f0u4u4i2: renamed from usb0```
```
</details>

### Issues/PRs references

Fixes #19359


19416: cpu/rpx0xx/cmsis: Update vendor header files r=benpicco a=maribu

### Contribution description

Generated new vendor header files from upstream SVD files using:

    ./SVDConv "$PICO_SDK_DIR"/src/rp2040/hardware_regs/rp2040.svd \
        --generate=header --fields=macro --fields=enum

Note: The missing `--fields=struct` flag resulted in the header no longer containing bit-fields to represent different fields within registers. While this would generally ease writing code, the RP2040 has the unpleasant feature of corrupting the remaining bits of the register when a write access that is not word-sized occurs in the memory mapped I/O area. This could happen e.g. when a bit field is byte-sized and byte-aligned.
### Testing procedure

No binary changes (hopefully).

### Issues/PRs references

This adds a few additional vendor defines, notably for USB. If anyone were to implement USB, this would be a requirement.

19418: cpu/gd32v: fix gpio_read in periph_gpio r=benpicco a=gschorcht

### Contribution description

This PR fixes a bug in `gpio_read` which made `gpio_read` completely unusable!

A small bug with big consequences. In `gpio_read` the combined port | pin_num parameter `pin` was used instead of the pin number `pin_num` for the call of `_pin_is_input`. This caused the problem that for example instead of accessing GPIOA->CTL0 with address 0x40010800, address 0x60018c00 was accessed. As a result, a pin was randomly detected as input or output and thus a result was arbitrarily returned. Approx. 50% of all inputs always returned LOW.

I found this error by coincidence when I tried to find out why the BOOT0 button on a Sipeed Longan Nano is not usable as a button in RIOT.

### Testing procedure

Flash `tests/periph_gpio`
```
BOARD=sipeed-longan-nano make -j8 -C tests/periph_gpio flash
```
and use commands
```
init_in 0 8
read 0 8
```
Without this PR, the pin is always LOW. With the PR, the pin should be HIGH when the BOOT button is pressed.

### Issues/PRs references

19419: boards/sipeed-longan-nano: add BOOT as user button r=benpicco a=gschorcht

### Contribution description

This PR makes the BOOT button usable as a user button.

### Testing procedure

The test requires PR #19418 to work.

Flash and test:
```
BOARD=sipeed-longan-nano make -j8 -C tests/saul flash term
```
The output
```
Dev: BOOT	Type: SENSE_BTN
Data:	              0 
```
should change to
```
Dev: BOOT	Type: SENSE_BTN
Data:	              1 
```
when the BOOT button is pressed.

### Issues/PRs references

Depends on PR #19418 


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-03-24 08:38:06 +00:00
bors[bot]
45c839dc98
Merge #19407
19407: cpu/stm32/periph: Implement GPIO LL for STM32F1 without IRQ support (yet) r=gschorcht a=maribu

### Contribution description

This implements GPIO LL support for the STM32F1 in the first commit. IRQ support is added with https://github.com/RIOT-OS/RIOT/pull/19412.

This sneaks in a second commit replacing the `expect()` calls in `tests/periph_gpio_ll` with a trivial five-liner that doesn't `panic()`, so that stdio output will still be delivered on high level stdio implementations. The tests provides a lot of useful output to aid debugging, so its a great usability improvement if the test makes sure to actually deliver that output.

### Testing procedure

<details><summary><code>make -C tests/periph_gpio_ll BOARD=nucleo-f103rb flash term</code></summary>

```
2023-03-17 18:55:09,188 # Help: Press s to start test, r to print it is ready
s
2023-03-17 18:55:10,299 # START
2023-03-17 18:55:10,307 # main(): This is RIOT! (Version: 2023.04-devel-683-g9c3812-cpu/stm32/periph/gpio_ll)
2023-03-17 18:55:10,309 # Test / Hardware Details:
2023-03-17 18:55:10,310 # ========================
2023-03-17 18:55:10,311 # Cabling:
2023-03-17 18:55:10,313 # (INPUT -- OUTPUT)
2023-03-17 18:55:10,315 #   P2.10 (PC10) -- P2.2 (PC2)
2023-03-17 18:55:10,318 #   P2.12 (PC12) -- P2.3 (PC3)
2023-03-17 18:55:10,322 # Number of pull resistor values supported: 1
2023-03-17 18:55:10,325 # Number of drive strengths supported: 1
2023-03-17 18:55:10,328 # Number of slew rates supported: 3
2023-03-17 18:55:10,330 # Valid GPIO ports:
2023-03-17 18:55:10,332 # - PORT 0 (PORT A)
2023-03-17 18:55:10,333 # - PORT 1 (PORT B)
2023-03-17 18:55:10,335 # - PORT 2 (PORT C)
2023-03-17 18:55:10,336 # - PORT 3 (PORT D)
2023-03-17 18:55:10,338 # - PORT 4 (PORT E)
2023-03-17 18:55:10,338 # 
2023-03-17 18:55:10,341 # Testing gpio_port_pack_addr()
2023-03-17 18:55:10,343 # =============================
2023-03-17 18:55:10,343 # 
2023-03-17 18:55:10,344 # All OK
2023-03-17 18:55:10,344 # 
2023-03-17 18:55:10,346 # Testing gpip_ng_init()
2023-03-17 18:55:10,348 # ======================
2023-03-17 18:55:10,348 # 
2023-03-17 18:55:10,354 # Testing is_gpio_port_num_valid() is true for PORT_OUT and PORT_IN:
2023-03-17 18:55:10,354 # 
2023-03-17 18:55:10,358 # Testing input configurations for PIN_IN_0:
2023-03-17 18:55:10,361 # Support for input with pull up: yes
2023-03-17 18:55:10,366 # state: in, pull: up, schmitt trigger: off, value: on
2023-03-17 18:55:10,369 # Support for input with pull down: yes
2023-03-17 18:55:10,374 # state: in, pull: down, schmitt trigger: off, value: off
2023-03-17 18:55:10,378 # Support for input with pull to bus level: no
2023-03-17 18:55:10,383 # Support for floating input (no pull resistors): yes
2023-03-17 18:55:10,388 # state: in, pull: none, schmitt trigger: off, value: off
2023-03-17 18:55:10,388 # 
2023-03-17 18:55:10,392 # Testing output configurations for PIN_OUT_0:
2023-03-17 18:55:10,397 # Support for output (push-pull) with initial value of LOW: yes
2023-03-17 18:55:10,401 # state: out-pp, slew: slowest, value: off
2023-03-17 18:55:10,404 # Output is indeed LOW: yes
2023-03-17 18:55:10,408 # state: out-pp, slew: slowest, value: on
2023-03-17 18:55:10,411 # Output can be pushed HIGH: yes
2023-03-17 18:55:10,417 # Support for output (push-pull) with initial value of HIGH: yes
2023-03-17 18:55:10,420 # state: out-pp, slew: slowest, value: on
2023-03-17 18:55:10,424 # Output is indeed HIGH: yes
2023-03-17 18:55:10,430 # Support for output (open drain with pull up) with initial value of LOW: no
2023-03-17 18:55:10,437 # Support for output (open drain with pull up) with initial value of HIGH: no
2023-03-17 18:55:10,443 # Support for output (open drain) with initial value of LOW: yes
2023-03-17 18:55:10,449 # state: out-od, slew: slowest, pull: none, schmitt trigger: off, value: off
2023-03-17 18:55:10,452 # Output is indeed LOW: yes
2023-03-17 18:55:10,458 # Support for output (open drain) with initial value of HIGH: yes
2023-03-17 18:55:10,465 # state: out-od, slew: slowest, pull: none, schmitt trigger: off, value: on
2023-03-17 18:55:10,470 # state: in, pull: down, schmitt trigger: off, value: off
2023-03-17 18:55:10,474 # Output can indeed be pulled LOW: yes
2023-03-17 18:55:10,478 # state: in, pull: up, schmitt trigger: off, value: on
2023-03-17 18:55:10,483 # Output can indeed be pulled HIGH: yes
2023-03-17 18:55:10,488 # Support for output (open source) with initial value of LOW: no
2023-03-17 18:55:10,494 # Support for output (open source) with initial value of HIGH: no
2023-03-17 18:55:10,501 # Support for output (open source with pull up) with initial value of HIGH: no
2023-03-17 18:55:10,508 # Support for output (open source with pull up) with initial value of LOW: no
2023-03-17 18:55:10,511 # Support for disconnecting GPIO: yes
2023-03-17 18:55:10,515 # Output can indeed be pulled LOW: yes
2023-03-17 18:55:10,519 # Output can indeed be pulled HIGH: yes
2023-03-17 18:55:10,519 # 
2023-03-17 18:55:10,523 # Testing Reading/Writing GPIO Ports
2023-03-17 18:55:10,526 # ==================================
2023-03-17 18:55:10,526 # 
2023-03-17 18:55:10,529 # testing initial value of 0 after init
2023-03-17 18:55:10,531 # ...OK
2023-03-17 18:55:10,535 # testing setting both outputs_optional simultaneously
2023-03-17 18:55:10,537 # ...OK
2023-03-17 18:55:10,541 # testing clearing both outputs_optional simultaneously
2023-03-17 18:55:10,543 # ...OK
2023-03-17 18:55:10,547 # testing toggling first output (0 --> 1)
2023-03-17 18:55:10,548 # ...OK
2023-03-17 18:55:10,552 # testing toggling first output (1 --> 0)
2023-03-17 18:55:10,553 # ...OK
2023-03-17 18:55:10,557 # testing toggling second output (0 --> 1)
2023-03-17 18:55:10,558 # ...OK
2023-03-17 18:55:10,562 # testing toggling second output (1 --> 0)
2023-03-17 18:55:10,563 # ...OK
2023-03-17 18:55:10,569 # testing setting first output and clearing second with write
2023-03-17 18:55:10,570 # ...OK
2023-03-17 18:55:10,575 # testing setting second output and clearing first with write
2023-03-17 18:55:10,576 # ...OK
2023-03-17 18:55:10,580 # All input/output operations worked as expected
2023-03-17 18:55:10,580 # 
2023-03-17 18:55:10,580 # 
2023-03-17 18:55:10,582 # TEST SUCCEEDED
2023-03-17 18:55:10,588 # { "threads": [{ "name": "main", "stack_size": 1536, "stack_used": 456 }]}
```

</details>

<details><summary><code>make -C tests/bench_periph_gpio_ll BOARD=nucleo-f103rb flash term</code></summary>

```
2023-03-17 18:55:42,192 # Help: Press s to start test, r to print it is ready
s
2023-03-17 18:55:44,616 # START
2023-03-17 18:55:44,624 # main(): This is RIOT! (Version: 2023.04-devel-683-g9c3812-cpu/stm32/periph/gpio_ll)
2023-03-17 18:55:44,624 # 
2023-03-17 18:55:44,626 # Benchmarking GPIO APIs
2023-03-17 18:55:44,628 # ======================
2023-03-17 18:55:44,628 # 
2023-03-17 18:55:44,632 # estimating loop overhead for compensation
2023-03-17 18:55:44,635 # -----------------------------------------
2023-03-17 18:55:44,642 # 4168 us for 50000 iterations
2023-03-17 18:55:44,642 # 
2023-03-17 18:55:44,647 # periph/gpio: Using 2x gpio_set() and 2x gpio_clear()
2023-03-17 18:55:44,651 # ---------------------------------------------------
2023-03-17 18:55:44,706 # 50000 iterations took 45840 us (50008 us uncompensated)
2023-03-17 18:55:44,713 # Two square waves pins at      1090750 Hz (      999840 Hz uncompensated)
2023-03-17 18:55:44,719 # ~66 CPU cycles per square wave period (~72 cycles uncompensated)
2023-03-17 18:55:44,719 # :'-(
2023-03-17 18:55:44,719 # 
2023-03-17 18:55:44,724 # periph/gpio_ll: Using gpio_ll_set() and gpio_ll_clear()
2023-03-17 18:55:44,729 # -------------------------------------------------------
2023-03-17 18:55:44,738 # 50000 iterations took 695 us (4863 us uncompensated)
2023-03-17 18:55:44,745 # Two square waves pins at     71942446 Hz (    10281719 Hz uncompensated)
2023-03-17 18:55:44,750 # ~1 CPU cycles per square wave period (~7 cycles uncompensated)
2023-03-17 18:55:44,751 # :-D
2023-03-17 18:55:44,751 # 
2023-03-17 18:55:44,755 # periph/gpio: Using 4x gpio_toggle()
2023-03-17 18:55:44,757 # -----------------------------------
2023-03-17 18:55:44,965 # 50000 iterations took 198646 us (202814 us uncompensated)
2023-03-17 18:55:44,972 # Two square waves pins at       251704 Hz (      246531 Hz uncompensated)
2023-03-17 18:55:44,977 # ~286 CPU cycles per square wave period (~292 cycles uncompensated)
2023-03-17 18:55:44,978 # :'-(
2023-03-17 18:55:44,978 # 
2023-03-17 18:55:44,982 # periph/gpio_ll: Using 2x gpio_ll_toggle()
2023-03-17 18:55:44,985 # -----------------------------------------
2023-03-17 18:55:45,010 # 50000 iterations took 15972 us (20140 us uncompensated)
2023-03-17 18:55:45,017 # Two square waves pins at      3130478 Hz (     2482621 Hz uncompensated)
2023-03-17 18:55:45,023 # ~23 CPU cycles per square wave period (~29 cycles uncompensated)
2023-03-17 18:55:45,023 # :'-(
2023-03-17 18:55:45,023 # 
2023-03-17 18:55:45,026 # periph/gpio: Using 4x gpio_write()
2023-03-17 18:55:45,029 # ----------------------------------
2023-03-17 18:55:45,097 # 50000 iterations took 58345 us (62513 us uncompensated)
2023-03-17 18:55:45,103 # Two square waves pins at       856971 Hz (      799833 Hz uncompensated)
2023-03-17 18:55:45,109 # ~84 CPU cycles per square wave period (~90 cycles uncompensated)
2023-03-17 18:55:45,109 # :'-(
2023-03-17 18:55:45,110 # 
2023-03-17 18:55:45,113 # periph/gpio_ll: Using 2x gpio_ll_write()
2023-03-17 18:55:45,117 # ----------------------------------------
2023-03-17 18:55:45,128 # 50000 iterations took 2777 us (6945 us uncompensated)
2023-03-17 18:55:45,135 # Two square waves pins at     18005041 Hz (     7199424 Hz uncompensated)
2023-03-17 18:55:45,141 # ~4 CPU cycles per square wave period (~10 cycles uncompensated)
2023-03-17 18:55:45,141 # :-)
2023-03-17 18:55:45,141 # 
2023-03-17 18:55:45,141 # 
2023-03-17 18:55:45,142 # TEST SUCCEEDED
2023-03-17 18:55:45,149 # { "threads": [{ "name": "main", "stack_size": 1536, "stack_used": 448 }]}
```

</details>

### Issues/PRs references

None


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-03-20 15:14:41 +00:00
Marian Buschsieweke
ff727f8f90
tests/periph_gpio_ll: Minor improvement
Use a custom expect() that just spins in an endless loop instead of
panicking. The test isn't run automatically anyway, as it requires
connecting two GPIOs with jumper wires; but when run manually it is
helpful to not kill RIOT to also get the stdio output of the exact
point where the test fails (e.g. USB CDC ACM doesn't like panic()).
2023-03-20 14:14:07 +01:00
bors[bot]
189d1c598c
Merge #19400
19400: sys/bitfield: don't touch unrelated bits in bf_{set, clear}_all() r=kaspar030 a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-03-20 11:30:53 +00:00
bors[bot]
2fcedf923f
Merge #19402 #19404 #19405
19402: sys/net/gnrc/netif: fixing no global address wait r=benpicco a=jan-mo

### Contribution description

The function `gnrc_netif_ipv6_wait_global_address()` will always return true, even if no global address is attached to the interface.
Currently the function only waits for any message and does not check if it was from the bus or not. So in `msg.content.ptr` is no valid address and therefore it returns true.

I added just the check, if the message is from the bus of any interface and then checking the address. We could also first check if the address in `msg.content.ptr` is valid, but this will just hide the bug. Also the timeout was never checked. It was just assuming that no other message will be received during the wait.


### Testing procedure

Use two devices, one works as a border router and supports the global address, the other will wait for the global address. You can call the function `gnrc_netif_ipv6_wait_global_address()` on the waiting node and see whether it returns true and finds the global address in the given time-range.


19404: sys/trickle: cleanup deps r=benpicco a=MrKevinWeiss

### Contribution description

Cleans the dependencies of the `trickle` module. This removes the deprecated xtimer and models kconfig.

### Testing procedure

Green murdock

### Issues/PRs references


19405: cpu/efm32: pwm_init errors are zeros r=benpicco a=chrysn

### Contribution description

pwm_init is documented to return 0 on errors, and has an unsigned return value.

EFM32's initialization function returned negative values, which through implicit casting become 0xffffffff or 0xfffffffe, which are successful by the documentation.

This makes all the EFM32 error paths return 0 as they should.

Also, it fixes a variable name and the corresponding error message that used to talk of "initiation" (which would be the start of a process) rather than "initialization" (which is a process that is completed before something else can happen).

### Testing procedure

* on stk3700, tests/periph_pwm, run `init 0 0 10 1000` / `set 0 0 500`
* The init used to respond with "The pwm frequency is set to 4294967294", and the set does nothing.
* The init now responds with "Error: device is not <del>initiated</del><ins>initialized</ins>". The set still does nothing, but then one doesn't expect it to any more.

(But really, looking at the patch and the docs should suffice).

### Issues/PRs references

By-catch from testing the Rust wrappers provided by `@remmirad` at https://github.com/RIOT-OS/rust-riot-wrappers/pull/38

Co-authored-by: Jan Mohr <jan.mohr@ml-pa.com>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: chrysn <chrysn@fsfe.org>
2023-03-17 13:06:11 +00:00
chrysn
6c8d1ebc98 tests/periph_pwm: wording fix, s/initiate/initialize/ 2023-03-17 13:09:57 +01:00
MrKevinWeiss
bdd8819e7f
tests/trickle: Model kconfig 2023-03-17 12:15:45 +01:00
MrKevinWeiss
3e3dc7698a
tests/trickle: Remove xtimer and use ztimer 2023-03-17 12:11:52 +01:00
Benjamin Valentin
eb9fbfb790 tests/unittests: add test for bf_clear_all() 2023-03-17 00:08:16 +01:00
Gunar Schorcht
735cb2474e tests/usbus_cdc_ecm: remove stm32f429i-disco from blacklist
Since the stm32f429i-disco uses the USB OTG HS instead of USB OTG FS peripheral, the number of available EPs is sufficient for this application. With the change of defining the largest number of available EPs for USBUS instead of the smallest number, the board can use all EPs of the USB OTG HS peripheral.
2023-03-16 07:47:18 +01:00
bors[bot]
6894ee4106
Merge #19394
19394: tests/rmutex: Drop output dump from README.md r=maribu a=maribu

### Contribution description

We use test scripts to automatically classify the output of a test application as passing / failing. Users are not expected to manually compare the output with a dump of the output in a readme.

### Testing procedure

Doesn't apply

### Issues/PRs references

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

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

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-03-15 13:20:51 +00:00
Marian Buschsieweke
e197abb6a3
tests/rmutex: Drop output dump from README.md
Fixes https://github.com/RIOT-OS/RIOT/issues/19140
Fixes https://github.com/RIOT-OS/RIOT/issues/19298

We use test scripts to automatically classify the output of a test
application as passing / failing. Users are not expected to manually
compare the output with a dump of the output in a readme.
2023-03-15 12:58:09 +01:00
bors[bot]
fd38db6b38
Merge #19371 #19382
19371: sys/usbus: check for the number of required and provided EPs in static configurations r=dylad a=gschorcht

### Contribution description

This PR provides a static check at compile time whether the number of EPs required in a static configuration does not exceed the number of EPs provided by the USB device.

#### Background

In issue #19359 the problem was reported that `usbus_cdc_ecm` didn't work together with `stdio_cdc_acm` on some STM32 boards. The reason for some of the boards was simply that the application tried to allocate more EPs than available and simply ignored this and just didn't work.

#### Solution

Since `auto_init_usb` uses a static configuration with exactly one USBUS stack instance and one USB device, at least in case `auto_init` is used a static check can be carried out to make sure that the number of EPs required by the application doesn't exceed the number of EPs provided by the USB device. For this purpose, each `usbus_*` module defines the number of IN and OUT EPs required by that module. Each USB device driver defines the number of EPs provided by USB device if it differs from the default of 8 EPs. During the auto initialization the total number of required IN and OUT EPs is then compared with the number of EPs provided by the USB device using a static assert.

### Testing procedure

1. Green CI
2. Compilation of
   ```python
   USEMODULE='stdio_cdc_acm' BOARD=nucleo-f439zi make -j8 -C tests/usbus_cdc_ecm
   ```
   should lead to compilation error
   ```python
   sys/auto_init/usb/auto_init_usb.c:81:1: error: static assertion failed: "Number of required IN endpoints exceeded"
    _Static_assert(USBUS_EP_IN_REQUIRED_NUMOF <= USBDEV_NUM_ENDPOINTS,
    ^~~~~~~~~~~~~~
   Makefile.base:146: recipe for target 'tests/usbus_cdc_ecm/bin/nucleo-f439zi/auto_init_usbus/auto_init_usb.o' failed
   ```
   while compilation of
   ```
   USEMODULE='stdio_cdc_acm' BOARD=nucleo-f767zi make -j8 -C tests/usbus_cdc_ecm
   ```
   should work.

### Issues/PRs references

Fixes issue #19359 partially.

19382: tests/pkg_nanors: use static allocation r=benpicco a=benpicco



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-03-15 08:41:57 +00:00
Gunar Schorcht
cc2fedb396 tests/usbus_cdc_ecm: add blacklist info 2023-03-15 06:59:24 +01:00
Gunar Schorcht
b4d39db8d5 tests/usbus_cdc_ecm: blacklist boards with insufficient number of EPs 2023-03-15 06:58:04 +01:00
Benjamin Valentin
250c56183d tests/pkg_nanors: use static allocation 2023-03-14 19:43:53 +01:00
bors[bot]
8dc8bf3567
Merge #19302
19302: pkg/wolfssl: Update wolfSSL to 5.5.4 and add DTLS 1.3 support r=benpicco a=Flole998



Co-authored-by: Florian Lentz <flolen@uni-bremen.de>
Co-authored-by: Flole998 <Flole998@users.noreply.github.com>
2023-03-10 02:22:17 +00:00
bors[bot]
bdecf57516
Merge #19356
19356: usbus/msc: add CONFIG_USBUS_MSC_AUTO_MTD option to create LUNs on init r=dylad a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-03-09 19:49:51 +00:00
Benjamin Valentin
73400cb248 tests/usbus_msc: don't use custom usbus 2023-03-09 16:57:17 +01:00
Flole998
ede7302751 tests/pkg_wolfssl: Update boards with insufficient memory 2023-03-08 22:31:41 +00:00
MrKevinWeiss
89f2ae7f24
tests/cpp11_mutex: Cleanup deps 2023-03-07 13:08:58 +01:00
Benjamin Valentin
f3dc90c63a tests/mtd_raw: make use of mtd_default.h 2023-03-07 00:53:05 +01:00
bors[bot]
8c6926d0ef
Merge #19344
19344: test/periph_rtc: reset struct tm time between tests r=benpicco a=kfessel

### Contribution description

while reviewing #19340 i found test/periph_rtc to be insufficient to prove rtc_set_time is working. this changes that and avoids accidental reuse of struct tm time and ms  values by resetting time and ms;

### Testing procedure

run the test

### Issues/PRs references

#19340

Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-03-03 20:34:28 +00:00
Karl Fessel
0cfdd3d679 test/periph_rtc: reset struct tm time between tests 2023-03-03 15:47:09 +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
3671b009d8 tests: add test application for usbus msc
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-03-02 22:17:41 +01:00
bors[bot]
8d800e92b4
Merge #18515
18515: libschc: initial import as package r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-03-02 12:39:31 +00:00
Martine Lenders
9459e29ee3
tests: provide tests for libschc 2023-03-02 11:31:07 +01:00
Martine Lenders
1cff487636 tests: add congure_abe to SFR CongURE test 2023-03-01 20:23:32 +01:00
Martine Lenders
0d4ab778ed
tests: add congure_reno to SFR CongURE test 2023-03-01 16:33:07 +01:00
Martine Lenders
753e0c86c8
tests: add congure_quic to SFR CongURE test 2023-03-01 13:14:55 +01:00
bors[bot]
04ef37274f
Merge #16158
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-03-01 08:32:45 +00:00
Martine Lenders
918d48adc0
tests: add test application for CongURE implementations with SFR 2023-03-01 09:21:09 +01:00
Flole998
abff36ed4d tests/pkg_wolfssl: Mark hifive1b as having insufficient memory 2023-03-01 01:06:53 +00:00
Flole998
997af7afe2 tests/pkg_wolfssl: Increase timeout for bench-test
10 seconds are not enough, each operation takes one second, and we do
more than 10. 20 seems to be a sane value.
2023-03-01 00:24:32 +00:00
Flole998
abf5eddaa6 tests/pkg_wolfcrypt-ed25519-verify: Add missing module 2023-03-01 00:06:16 +00:00
Benjamin Valentin
e45508dab4 tests/nanocoap_cli: define CoAP resources as XFA 2023-02-28 20:13:18 +01:00
bors[bot]
4ccf0af0b1
Merge #19320
19320: sys/vfs: add force option to vfs_umount() r=miri64 a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-02-28 16:55:56 +00:00
Martine Lenders
2658eb151b
tests: test the -EBUSY case for vfs_umount() 2023-02-28 17:36:32 +01:00
Benjamin Valentin
c19c25e078 tests: adapt to vfs_umount() API change 2023-02-28 17:24:03 +01:00
bors[bot]
2c1bd9057f
Merge #17612 #19332
17612: pkg: add FlashDB r=benpicco a=benpicco



19332: sys/tiny_strerror: make use of flash_utils.h r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-28 02:46:35 +00:00
Benjamin Valentin
674e3adb65 tests/pkg_flashdb: add test for FlashDB 2023-02-27 23:49:55 +01:00
Marian Buschsieweke
7e58bea1bd
examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
Marian Buschsieweke
cdcec5b3f9
drivers/saul: use flash_utils 2023-02-27 12:31:04 +01:00
Marian Buschsieweke
29cfeb752e
sys/phydat: use flash_utils 2023-02-27 12:31:03 +01:00
bors[bot]
4809b687b6
Merge #19292 #19307
19292: sys/phydat: Fix unit confusion r=miri64 a=maribu

### Contribution description

Previously, `UNIT_G` was used for g-force with the correct symbol `g`, `UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs` (which is an alternative correct symbol).

To avoid confusion between G-Force, Gauss, and Gram the units have been renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition, gram now uses the correct symbol `g`; which sadly is the same as for g-force. But usually there is enough context to tell them apart.

### Testing procedure

Green CI

### Issues/PRs references

None

19307: nanocoap_link_format: fix off-by-one error r=miri64 a=benpicco



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-23 21:25:12 +00:00
bors[bot]
72a0f1972d
Merge #18746 #19161
18746: sys/clif: Fixing out of bounds read under certain conditions r=maribu a=Teufelchen1

Hi 😈

This fixes a potential out of bounds read in clif_encode_link. There is no code in RIOT that can be exploited.
The fix does not break the current API but alters the behaviour slightly. Before the change, the length attributes of `clif_attr_t` where optional. If missing, the length was deduced using `strlen()`. This fix makes those parameters required and if they are `0` it operates as if the length really is `0`. This might not be ideal but it is the only non api breaking fix I could think off. 
```c
typedef struct {
    char *value;                  
    unsigned value_len;    NO LONGER OPTIONAL
    const char *key;               
    unsigned key_len;       NO LONGER OPTIONAL
} clif_attr_t;
```
Depends on #18744

cc `@leandrolanzieri` 

19161: bors.yaml: re-activate labels check + add block_labels r=miri64 a=miri64



Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-02-23 16:39:44 +00:00
Marian Buschsieweke
3c287c058d
sys/phydat: Fix unit confusion
Previously, `UNIT_G` was used for g-force with the correct symbol `g`,
`UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which
would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs`
(which is an uncommon but correct symbol).

To avoid confusion between G-Force, Gauss, and Gram the units have been
renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition,
gram now uses the correct symbol `g` and Gauss uses `G`.
2023-02-23 16:44:24 +01:00
Teufelchen1
8c295ab7cf sys/clif: Fixing out of bounds read under certain conditions 2023-02-23 15:45:03 +01:00
bors[bot]
7d882cf736
Merge #19297
19297: tests/rmutex: clean up test and reduce stack size r=maribu a=maribu

### Contribution description

As the title says. This results in a few more boards being able to run the test.

Also, the wording in the README.md is improved to not be interpreted as generally threads with lower thread ID being preferred over threads with higher when locking a mutex.

### Testing procedure

```
make -C tests/rmutex BOARD=foo flash test
```

### Issues/PRs references

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

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-02-22 12:19:34 +00:00
bors[bot]
41b54d8594
Merge #18392
18392: drivers/servo: reimplement with high level interface r=benpicco a=maribu

### Contribution description

The previous servo driver didn't provide any benefit over using PWM directly, as users controlled the servo in terms of PWM duty cycles. This changes the interface to provide a high level interface that abstracts the gory PWM details.

In addition, a SAUL layer and auto-initialization is provided.

### Testing procedure

The test application provides access to the servo driver via the `saul` shell command.

```
> saul
2022-08-02 22:12:31,826 # saul
2022-08-02 22:12:31,827 # ID	Class		Name
2022-08-02 22:12:31,830 # #0	ACT_SWITCH	LD1(green)
2022-08-02 22:12:31,832 # #1	ACT_SWITCH	LD2(blue)
2022-08-02 22:12:31,834 # #2	ACT_SWITCH	LD3(red)
2022-08-02 22:12:31,837 # #3	SENSE_BTN	B1(User button)
2022-08-02 22:12:31,838 # #4	ACT_SERVO	servo
> saul write 4 0
2022-08-02 22:12:41,443 # saul write 4 0
2022-08-02 22:12:41,445 # Writing to device #4 - servo
2022-08-02 22:12:41,447 # Data:	             0 
2022-08-02 22:12:41,450 # [servo] setting 0 to 2949 (0 / 255)
2022-08-02 22:12:41,453 # data successfully written to device #4
> saul write 4 256
2022-08-02 22:12:45,343 # saul write 4 256
2022-08-02 22:12:45,346 # Writing to device #4 - servo
2022-08-02 22:12:45,347 # Data:	           256 
2022-08-02 22:12:45,351 # [servo] setting 0 to 6865 (255 / 255)
2022-08-02 22:12:45,354 # data successfully written to device #4
```

Each write resulted in the MG90S servo that I connected to move to the corresponding position.

### Issues/PRs references

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-02-22 09:15:59 +00:00
Marian Buschsieweke
6dc2a60597
drivers/servo: reimplement with high level interface
The previous servo driver didn't provide any benefit over using PWM
directly, as users controlled the servo in terms of PWM duty cycles.
This changes the interface to provide a high level interface that
abstracts the gory PWM details.

In addition, a SAUL layer and auto-initialization is provided.

Co-authored-by: benpicco <benpicco@googlemail.com>
2023-02-22 10:00:04 +01:00
Marian Buschsieweke
0620ac68ff
tests/rmutex: clean up test and reduce stack size
This results in a few more boards being able to run the test.
Also, the wording in the README.md is improved.
2023-02-22 09:39:01 +01:00
bors[bot]
cf540a2648
Merge #19294 #19295
19294: sys/shell: don't include suit command by default r=benpicco a=benpicco



19295: gcoap: Finish the gcoap_get_resource_list_tl -> gcoap_get_resource_list renaming r=benpicco a=chrysn

### Contribution description

In #16688, an argument was added to the `gcoap_get_resource_list` function by creating a new function `gcoap_get_resource_list_tl` with a deprecation and roll-over plan.

This plan has not been acted on so far.

This PR shortens the original plan by just adding the argument to `gcoap_get_resource_list` and removing `gcoap_get_resource_list_tl` in a single go. The rationale for this deviation is that while it's a public API, its only two practical consumers are the (built-in) well-known/core implementation, and the (built-in) CoRE Resource Directory (cord) endpoint. Moreover, a further change to this API (switching over to `coap_block_slicer_t`) is expected to happen within this release cycle, which would take something like 4 total releases to get through otherwise, which is unrealistic for an API that there are no known external users of.

A second commit clean up ToDo items (in the changed function's documentation) that referred to a IETF draft that has long been abandoned by the CoRE WG.

### Testing procedure

Plain inspection and CI passing should suffice.

### AOB

There is a second analogous pair left over from #16688, `gcoap_req_send` / `gcoap_req_send_tl`. As that *is* expected to be used widely, I prefer not to mix these two concerns, and get the present one through without unnecessary hold-up.

Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-21 23:15:06 +00:00
chrysn
5db24d4f51 gcoap: Rename gcoap_get_resource_list_tl to gcoap_get_resource_list
This is an API change in the latter, which would typically now take an
extra argument GCOAP_SOCKET_TYPE_UNDEF.

Follow-Up-For: https://github.com/RIOT-OS/RIOT/pull/16688
2023-02-21 20:22:46 +01:00
bors[bot]
37b64912d4
Merge #19256
19256: pkg/tinyusb: add GD32VF103 support r=gschorcht a=gschorcht

### Contribution description

This PR provides the tinyUSB support for GD32VF103 and enables the `tinyusb_device` feature as well as `stdio_tinyusb_cdc_acm` for GD32VF103 boards.

### Testing procedure

```
BOARD=sipeeed-longan-nano make -C tests/shell flash term
```
should work

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-21 16:53:06 +00:00
Gunar Schorcht
1026cb5c70 tests/xtimer_now64_continuity: blacklist GD32V boards 2023-02-21 16:24:27 +01:00
Gunar Schorcht
dc0a5b0731 tests/xtimer_now32_overflow: blacklist GD32V boards 2023-02-21 16:24:05 +01:00
Gunar Schorcht
8845bee858 tests/pkg_wolfssl: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Gunar Schorcht
560b0675e8 tests/pkg_lz4: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Gunar Schorcht
32cddb6386 tests/pkg_lvgl: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Gunar Schorcht
aac90884c2 tests/pkg_cryptoauthlib_internal-tests: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Gunar Schorcht
0c99859ff7 tests/nanocoap_cli: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Gunar Schorcht
8ab9164890 tests/gcoap_fileserver: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Gunar Schorcht
2808947991 tests/gcoap_dns: blacklist GD32V boards 2023-02-21 15:05:07 +01:00
Benjamin Valentin
d6e2499ab7 tests/sys_crypto: add missing <string.h> include 2023-02-20 18:31:23 +01:00
bors[bot]
523a39acd3
Merge #19288
19288: rust: Update riot-sys and riot-wrappers r=kaspar030 a=chrysn

### Contribution description

rust: Update riot-sys and riot-wrappers

* riot-wrappers:
  * Fix infinite loop when using a Mutex
  * Make ValueInThread Copy/Clone
* riot-sys:
  * Export xxx_DEV (eg. I2C_DEV) C macros as functions
  * Add auto_init_utils.h

### Testing procedure

CI checks should suffice.

### Issues/PRs references

This pulls in fixes from

* https://github.com/RIOT-OS/rust-riot-sys/pull/18
* https://github.com/RIOT-OS/rust-riot-sys/pull/17 / https://github.com/RIOT-OS/rust-riot-wrappers/issues/37
* https://github.com/RIOT-OS/rust-riot-wrappers/pull/42 / https://github.com/RIOT-OS/rust-riot-wrappers/issues/41


Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-20 08:34:11 +00:00
chrysn
bcea914338 rust: Update riot-sys and riot-wrappers
* riot-wrappers:
  * Fix infinite loop when using a Mutex
  * Make ValueInThread Copy/Clone
* riot-sys:
  * Export xxx_DEV (eg. I2C_DEV) C macros as functions
  * Add auto_init_utils.h
2023-02-20 09:06:33 +01:00
bors[bot]
b1be519107
Merge #19284 #19286
19284: boards: support for the LILYGO TTGO T8 ESP32-S2 board r=benpicco a=gschorcht

### Contribution description

This PR provides the support for the LILYGO TTGO T8 ESP32-S2 board which has a OLED display (not yet supported) and a SD-Card slot on board.

The board is equipped with a USB-C connector that connects either to a USB-to-UART bridge or to the USB-OTG/JTAG interface of the ESP32-S2 via some DIP switches.

The PR includes a very small fix of printf format string in `tests/malloc`. I can split it off.

### Testing procedure

t.b.d.

### Issues/PRs references


19286: cpu/esp_common: use generic WIFI_SSID/WIFI_PASS defines r=benpicco a=benpicco



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-17 17:00:56 +00:00
Benjamin Valentin
cebd768c08 cpu/esp_common: rename ESP_WIFI_EAP_* -> WIFI_EAP_* 2023-02-17 16:59:29 +01:00
Benjamin Valentin
50802b841d cpu/esp_common: use generic WIFI_SSID/WIFI_PASS defines 2023-02-17 15:32:03 +01:00
Gunar Schorcht
99e07a6786 tests/malloc: remove 0x prefix for %p in printf 2023-02-17 07:48:08 +01:00
bors[bot]
2221cbfa9b
Merge #19258
19258: drivers/mtd_flashpage: implement pagewise API, don't use raw addresses r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-16 15:02:19 +00:00
Benjamin Valentin
8e902bdf5d tests/mtd_flashpage: test unaligned read/write 2023-02-16 15:50:52 +01:00
Benjamin Valentin
68694a0da2 tests/mtd_flashpage: adapt to mtd_flashpage API change 2023-02-16 15:50:52 +01:00
bors[bot]
ea300c3d15
Merge #18758
18758: sys/event: add event sources r=kaspar030 a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-10 16:03:41 +00:00
bors[bot]
d145a876ae
Merge #19259
19259: boards/stm32f4discovery: default to stdio via CDC ACM r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-10 10:42:56 +00:00
Benjamin Valentin
1cd2c16a75 tests/xtimer_now{32, 64}: blacklist stm32f4discovery 2023-02-10 10:12:18 +01:00
Gunar Schorcht
8512db60a6 tests/sys_fido2_ctap: enable usbus in Makefile
There are boards that select the STDIO backend used depending on whether `usbus` is enabled. Usually the `fido2_ctap_transport_hid` module pulls in `usbus_hid` and thus `usbus`, but since this dependency resolution is done after reading the `Makefile.dep` of the board, it may happen that the wrong STDIO backend is selected. Therefore `usbus` is selected directly in the `Makefile`.
2023-02-08 11:56:18 +01:00
bors[bot]
f341ad6c9c
Merge #17045 #19243
17045: sys/coding: add XOR based coding module r=benpicco a=benpicco



19243: cpu/gd32v: add periph_gpio_ll and periph_gpio_ll_irq support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_gpio_ll` and `periph_gpio_ll_irq` support for GD32VF103. Level triggered interrupts are emulated.

`periph_gpio_ll_irq` could be split off from this PR as a separate PR if necessary.

### Testing procedure

Use any GD32V board and connect PA0 -> PB0 and PA1 -> PB1 where PA is the output port and PB the input port. With these connections `tests/periph_gpio_ll` should work.
```
BOARD=sipeed-longan-nano make -j8 -C tests/periph_gpio_ll flash term
```

If necessary, change the input and output pins by setting the environment variables and connect the corresponding pins, for example for `seeedstudio-gd32` PA1 -> PB8 and PA8 -> PB9:
```
PIN_OUT_0=1 PIN_OUT_1=8  PIN_IN_0=8 PIN_IN_1=9 BOARD=seedstudio-gd32 make -j8 -C tests/periph_gpio_ll flash term
```

### Issues/PRs references


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-07 17:39:20 +00:00
Benjamin Valentin
24cb2dada8 tests/coding: add tests for XOR codding 2023-02-07 14:09:39 +01:00
bors[bot]
af393878d1
Merge #19251 #19254
19251: tests/driver_dac_dds: fix output of sine and saw functions r=benpicco a=benpicco



19254: cpu/gd32v: add periph_rtc_mem support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_rtc_mem` support for GD32VF103.

A modified version of this driver could also be used for STM32F1.

### Testing procedure

`tests/periph_rtt` should work on any GD32V board, for example:
```
BOARD=sipeed-longan-nano make -C tests/periph_rtt flash
```
```
Help: Press s to start test, r to print it is ready
START
main(): This is RIOT! (Version: 2023.04-devel-319-gebc86-cpu/gd32v/periph_rtc_mem)

RIOT RTT low-level driver test
RTT configuration:
RTT_MAX_VALUE: 0xffffffff
RTT_FREQUENCY: 32768

Testing the tick conversion
Trying to convert 1 to seconds and back
Trying to convert 256 to seconds and back
Trying to convert 65536 to seconds and back
Trying to convert 16777216 to seconds and back
Trying to convert 2147483648 to seconds and back
All ok

Initializing the RTT driver
RTC mem OK
This test will now display 'Hello' every 5 seconds

RTT now: 1
Setting initial alarm to now + 5 s (163841)
rtt_get_alarm() PASSED
RTC mem OK
```

### Issues/PRs references

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-07 07:33:48 +00:00
Gunar Schorcht
f0f9a026fc tests/periph_rtt: replace fixed buffer by riot_msg size 2023-02-06 22:21:19 +01:00
Benjamin Valentin
65fccdd55a tests/driver_dac_dds: fix output of sine and saw functions 2023-02-06 14:18:37 +01:00
Benjamin Valentin
f78cdbb095 boards/sipeed-longan-nano: make use of mtd_sdcard_default 2023-02-05 19:05:44 +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
Silke Hofstra
081a69b68e tests: add epd_bw_spi_disp_dev test 2023-02-03 22:55:45 +01:00
Silke Hofstra
d066588db7 tests: add epd_bw_spi test 2023-02-03 22:55:45 +01:00
bors[bot]
0fb6a09598
Merge #18903
18903: pkg/tinyusb: add tinyUSB netdev driver r=dylad a=gschorcht

### Contribution description

This PR adds the tinyUSB netdev driver.

The tinyUSB netdev driver is part of the tinyUSB package and is enabled by module `tinyusb_netdev`. It is available for boards that provide the `tinyusb_device` feature.

**Please note** Since the tinyUSB package is distinct from (and incompatible with) the USB stack provided around USBUS in RIOT (see USB), the tinyUSB netdev driver cannot be used together with with any USBUS device class.

The tinyUSB netdev driver uses Ethernet over USB and supports the following protocols:
- CDC ECM (Ethernet Control Model)
- CDC NCM (Network Control Model)
- RNDIS (Microsoft Remote NDIS)

While Linux and macOS support all these protocols, Microsoft Windows only supports the RNDIS protocol and since Windows version 11 also the CDC NCM protocol. macOS supports the RNDIS protocol since version 10.15 (Catalina).

Which protocol is used is selected by the corresponding pseudomodules `tinyusb_class_net_cdc_ecm`, `tinyusb_class_net_cdc_ncm` and `tinyusb_class_net_rndis`.

The CDC ECM protocol (`tinyusb_class_net_cdc_ecm`) and the RNDIS protocol (`tinyusb_class_net_rndis`) can be used simultaneously to support all operating systems, for example :
```
USEMODULE='tinyusb_netdev tinyusb_class_net_rndis tinyusb_class_net_cdc_ecm' \
BOARD=... make -C ... flash
 ```
In this case, the CDC ECM protocol is the default protocol and the RNDIS protocol the alternative protocol defined as second device configuration. The CDC NCM protocol cannot be used together with the CDC ECM or the RNDIS protocol.

This PR includes PR #18983 for now to be compilable. 

Comparison with USBUS CDC ECM (`nucleo-f767zi` board):
```
   text	   data	    bss	    dec	    hex	filename
  65916	    596	  18728	  85240	  14cf8	tests_pkg_tinyusb_netdev.elf
```
```
   text	   data	    bss	    dec	    hex	filename
  63120	    544	  15444	  79108	  13504	tests_usbus_cdc_ecm.elf

```

### Testing procedure

Use a board that is supported by tinyUSB. Compile and flash the test application for each protocol:

1. RNDIS
    ```
    BOARD=... make -j8 -C tests/pkg_tinyusb_netdev flash
    ```
2. CDC ECM
    ```
    CLASS=tinyusb_class_net_cdc_ecm BOARD=... make -j8 -C tests/pkg_tinyusb_netdev flash
    ```
3. CDC NCM
    ```
    CLASS=tinyusb_class_net_cdc_ncm BOARD=... make -j8 -C tests/pkg_tinyusb_netdev flash
    ```
For each test, a network interface should be added on the host. Use command `ifconfig` on USB device and on the host and check that both have a link local address. In syslog there should be an output like the following:
<details>

```
Nov 13 18:14:46 gunny8 kernel: [4611465.480025] usb 1-2.2: new full-speed USB device number 28 using xhci_hcd
Nov 13 18:14:47 gunny8 kernel: [4611465.581641] usb 1-2.2: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00
Nov 13 18:14:47 gunny8 kernel: [4611465.581646] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 13 18:14:47 gunny8 kernel: [4611465.581650] usb 1-2.2: Product: nucleo-f767zi
Nov 13 18:14:47 gunny8 kernel: [4611465.581653] usb 1-2.2: Manufacturer: RIOT-os.org
Nov 13 18:14:47 gunny8 kernel: [4611465.581654] usb 1-2.2: SerialNumber: 6591620BCB270283
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.1066] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/528)
Nov 13 18:14:47 gunny8 kernel: [4611465.594604] rndis_host 1-2.2:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-2.2, RNDIS device, fa:db:7c:1b:58:80
Nov 13 18:14:47 gunny8 mtp-probe: checking bus 1, device 28: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2"
Nov 13 18:14:47 gunny8 mtp-probe: bus: 1, device: 28 was not an MTP device
Nov 13 18:14:47 gunny8 systemd-udevd[17796]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 kernel: [4611465.643852] rndis_host 1-2.2:1.0 enp0s20f0u2u2: renamed from usb0
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.1833] device (usb0): interface index 508 renamed iface from 'usb0' to 'enp0s20f0u2u2'
Nov 13 18:14:47 gunny8 upowerd[2845]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.1
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2037] device (enp0s20f0u2u2): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnetBridge: Adding interface enp0s20f0u2u2 index:508
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2075] device (enp0s20f0u2u2): carrier: link connected
Nov 13 18:14:47 gunny8 upowerd[2845]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.0
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2129] settings: (enp0s20f0u2u2): created default wired connection 'Kabelgebundene Verbindung 2'
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <warn>  [1668359687.2142] device (enp0s20f0u2u2): connectivity: "/proc/sys/net/ipv4/conf/enp0s20f0u2u2/rp_filter" is set to "1". This might break connectivity checking for IPv4 on this device
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2151] device (enp0s20f0u2u2): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 upowerd[2845]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2
Nov 13 18:14:47 gunny8 systemd-udevd[17796]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2403] policy: auto-activating connection 'Kabelgebundene Verbindung 2' (0b1ae45e-c76e-3efb-a2cd-138ca2b2a59c)
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2414] device (enp0s20f0u2u2): Activation: starting connection 'Kabelgebundene Verbindung 2' (0b1ae45e-c76e-3efb-a2cd-138ca2b2a59c)
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2419] device (enp0s20f0u2u2): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2429] device (enp0s20f0u2u2): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2440] device (enp0s20f0u2u2): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2445] dhcp4 (enp0s20f0u2u2): activation: beginning transaction (timeout in 45 seconds)
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 avahi-daemon[1464]: Joining mDNS multicast group on interface enp0s20f0u2u2.IPv6 with address fe80::dba4:adb8:9ffe:d93e.
Nov 13 18:14:47 gunny8 avahi-daemon[1464]: New relevant interface enp0s20f0u2u2.IPv6 for mDNS.
Nov 13 18:14:47 gunny8 avahi-daemon[1464]: Registering new address record for fe80::dba4:adb8:9ffe:d93e on enp0s20f0u2u2.*.
Nov 13 18:14:47 gunny8 kernel: [4611465.895046] userif-1: sent link down event.
Nov 13 18:14:47 gunny8 kernel: [4611465.895052] userif-1: sent link up event.
```

</details>

Ping from and to the host.

### Issues/PRs references

Depends on PR https://github.com/RIOT-OS/RIOT/pull/18983

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-03 09:32:29 +00:00
bors[bot]
7d1ef9d99b
Merge #18863
18863: boards/esp32s2-mini: add definition for ESP32 S2 Mini r=gschorcht a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-02 14:26:25 +00:00
Benjamin Valentin
bc4c0fb848 tests/xtimer_now64_continuity: blacklist esp32s2-wemos-mini 2023-02-02 14:58:49 +01:00
Benjamin Valentin
17b0f3e41e tests/xtimer_now32_overflow: blacklist esp32s2-wemos-mini 2023-02-02 14:55:08 +01:00
Gunar Schorcht
0bee1ddf55 tests/saul_drivers: add vl6180x driver 2023-02-02 02:04:09 +01:00
Gunar Schorcht
9897dcc5bb Kconfig: integration of VL6180X driver and test app 2023-02-02 02:04:09 +01:00
Gunar Schorcht
add625aa84 tests/drivers_vl6180x: add test app for VL6180X driver 2023-02-02 02:04:09 +01:00
Gunar Schorcht
ee8dcfe664 tests: add pkg_tinyusb_netdev for tinyUSB netdec 2023-02-01 21:58:01 +01:00
bors[bot]
cf2d66ede8
Merge #19193 #19214
19193: rust: Update dependencies, use riot-wrappers from git r=benpicco a=chrysn

### Contribution description

As riot-wrappers has advanced a bit since it was last released, Rust modules are switched to using it from git again. (This is a regular ping-pong between testing the latest release in RIOT master, and using released support crates when they're current).

This primarily updates riot-wrappers, which has accumulated several compatible changes. Several other crates receive updates as well.

### Testing procedure

* Green CI

### Issues/PRs references

Changes on the riot-wrappers side:

* https://github.com/RIOT-OS/rust-riot-wrappers/pull/17
* https://github.com/RIOT-OS/rust-riot-wrappers/pull/22
* https://github.com/RIOT-OS/rust-riot-wrappers/pull/29
* https://github.com/RIOT-OS/rust-riot-wrappers/pull/30

[edit: added:]

This also serves to help preparing a 0.8.1 release of riot-wrappers, which performs some deprecations so that a breaking 0.9 change can be done more effortlessly later on.

19214: cpu/gd32v: add periph_spi support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_spi` 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.

### Testing procedure

`tests/periph_spi` as well as a test with any SPI sensor should work. `tests/driver_sdcard_spi` should work on `sipeed-longan-nano`.

### Issues/PRs references

Depeneds on PR #19216 

Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-01 11:13:05 +00: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
Hendrik van Essen
dcc8edd1e5 tests/driver_mfrc522: add test for mfrc522 driver 2023-01-31 21:05:07 +01:00
Gunar Schorcht
04df8cd387 tests/periph_flashpage_unittest: enable periph_flashpage
Testing the correct calculation of flash page indices without assuming the `periph_flashpage` feature and enabling the `periph_flashpage` module makes no sense. On ESP32x SoCs for example, the space in the flash is only reserved and `FLASHPAGE_NUMOF` is greater than 0 if `periph_flashpage` is used.
2023-01-30 09:26:16 +01:00
chrysn
3779abca36 rust: Update riot-wrappers 2023-01-25 02:07:49 +01:00
chrysn
5981079782 rust: Update dependencies, use riot-wrappers from git
This primarily updates riot-wrappers, which has accumulated several
compatible changes.
2023-01-24 20:12:58 +01:00
Gunar Schorcht
42ec4f04eb tests: add sipeed-longan-nano to Makefile.ci 2023-01-24 00:39:55 +01:00
bors[bot]
4c4cb3a8bb
Merge #19182 #19184
19182: pkg/libfixmath: bump version r=maribu a=benpicco



19184: pkg/tinydtls: bump version r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-01-22 10:05:11 +00:00
bors[bot]
855dc07b20
Merge #19080
19080: sys/phydat: add functions for Unix time conversion to phydat r=benpicco a=silkeh




Co-authored-by: Silke Hofstra <silke@slxh.eu>
2023-01-21 21:45:41 +00:00
Silke Hofstra
26653dd446 sys/phydat: add functions for Unix time conversion to phydat
Add functionality for calculating Unix timestamps to phydat.
This allows one to convert dates received from RTCs and the like
to Unix timestamps.
2023-01-21 11:01:42 +01:00
Benjamin Valentin
d102723bc9 tests/pkg_libfixmath_unittests: adapt test to upstream changes
Let's no longer patch the upstream test but use it directly
2023-01-20 17:42:54 +01:00
bors[bot]
d11a358b1d
Merge #18472 #19175
18472: drivers/mrf24j40: add support for IEEE 802.15.4 Radio HAL r=benpicco a=jia200x



19175: drivers/periph_common/flashpage: fix silent error r=benpicco a=Enoch247

### Contribution description

This patch removes a test that silently hides failed writes to NULL. Instead, assert is used to ensure that the address is not NULL.


### Testing procedure

I am not certain how to update the tests to catch asserts. If this is possible, I will add a test, if someone will point me to a good example to learn from.


### Issues/PRs references

- none


Co-authored-by: Jose Alamos <jose@alamos.cc>
Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
2023-01-19 18:17:13 +00:00
Jose Alamos
ab7922b6f6
tests/ieee802154_submac: add support for MRF24j40 radios 2023-01-19 15:34:16 +01:00
Jose Alamos
62e470d8c9
tests/ieee802154_hal: add support for MRF24j40 radios 2023-01-19 15:34:16 +01:00
Jose Alamos
f75631026b
tests/ieee801254_*: do not use HAL array 2023-01-19 15:33:37 +01:00
Jose Alamos
4d81677afd
tests/ieee802154_hal: use blocking CCA when no IRQ is present 2023-01-19 15:31:06 +01:00
Jose Alamos
91a299cb7d
drivers/mrf24j40: add support for IEEE 802.15.4 Radio HAL 2023-01-19 15:31:06 +01:00
Benjamin Valentin
3b38b29cd6 tests/event_source: add test for event sources 2023-01-19 13:05:15 +01:00
J. David Ibáñez
e176f1d338 tests/periph_spi clearly say when init succeeds
The way it's now it's easy to interpret that there was an error, when
really there was not. As seen in issue #19025 quite some time can be
spent following a wrong clue.
2023-01-19 10:42:50 +01:00
bors[bot]
d4d91492cd
Merge #18100 #19121 #19164 #19169
18100: core/assert: print backtrace on failed assertion r=kaspar030 a=benpicco



19121: socket_zep: only report size of single datagram r=kaspar030 a=benpicco



19164: cpu/sam0_common: move adc_res_t to common code r=dylad a=benpicco



19169: tests/driver_ws281x: don't overwrite board definition r=benpicco a=benpicco





Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-18 23:59:58 +00:00
bors[bot]
e7a68ac6f7
Merge #19166 #19171
19166: boards/seeedstudio-gd32: complete and improve board definition r=kaspar030 a=gschorcht

### Contribution description

This PR completes and improves the board definition for the Seeedstudio GD32 RISC-V Dev board. It
- adds the user LED and Button definitions to `board.h` (bef4209109)
- adds the SAUL support for user LED and Button definitions (7a5b2f1fb43f5e28eec4f65c8e7367510be6eb80)
- changes the OpenOCD configuration (32c0c4b1b5b9705ffcd2bb02a1d868ad35ca3bbc)
   - to be usable with Upstream OpenOCD release version 0.12.0
   - to allow different FTDI configuration and other adapters
- adds a documentation with flashing guide, feature list, support status, pinout, schematic reference (9dcc83b8ceb8a9ce526f0a03053a242e866ebf4a)

These changes is the first PR for a number of follow-up PR I will provide in next days to extend the GD32VF103 support. I have already working
- `periph_adc` support,
- `periph_spi` support,
- `tinyusb_device` support,

and almost finished
- `periph_i2c` support (implemented and working with some errors),
- `pm_layered` support (implemented but not working correctly yet), and
- `periph_usbdev` support (implemented by extending `usbdev_synopsys_dwc2 driver but bot working yet).

I will try to implement
- `periph_gpio_irq` support,
- `periph_rtc` support, and
- `periph_rtt` support.

Since I'm using the Sispeed Longan Nano board for testing, I will add the board definition for this board. I will then move some board definitions to a common folder.

### Testing procedure

Green CI.
Documentation should be generated correctly.
Flashing the `seeedstudio-gd32` should still work.
`tests/leds` should work.

### Issues/PRs references

19171: tests/gnrc_rpl: Disable CI test for native r=benpicco a=maribu

### Contribution description

This disables the `tests/grnc_rpl` test run for `native`. This test is too flaky to be included in the CI.

### Testing procedure

Not needed

### Issues/PRs references

None

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-18 21:42:37 +00:00
Marian Buschsieweke
810653d464
tests/gnrc_rpl: Disable CI test for native 2023-01-18 19:46:27 +01:00
bors[bot]
7855aad7e4
Merge #19079
19079: cpu/esp32: add periph_flashpage support r=kaspar030 a=gschorcht

### Contribution description

This PR provides the `periph_flashpage` support for ESP32x SoCs.

For byte-aligned read access to constant data in the flash, the MMU of all ESP32x SoCs allows to map a certain number of 64 kByte pages of the flash into the data address space of the CPU. This address space is called DROM. Normally the whole DROM address space is assigned to the section `.rodata`. The default flash layout used by all ESP32x SoCs is:
| Address in Flash | Content |
|:-----------------------|:-----------|
| `0x0000` or `0x1000` | bootloader |
| `0x8000` | parition table |
| `0x9000` | `nvs` parition with WiFi data |
| `0xf000`  | `phy_init` partition with RF data |
| `0x10000` | `factory` partition with the app image |

The factory partition consists of a number of 64 kByte pages for the sections `.text`, `.rodata`, `.bss` and others. The `.text` and `rodata` sections are page-aligned and are simply mapped into the instruction address space (IROM) and the data address space (DROM), respectively. All other sections are loaded into RAM.

If the `periph_flashpage` module is used, the `periph_flashpage` driver
- decreases the size of the `.rodata` section in DROM address space by `CONFIG_ESP_FLASHPAGE_CAPACITY`,
- adds a section `.flashpage.writable` of size `CONFIG_ESP_FLASHPAGE_CAPACITY` at the end of DROM address space that is mapped into data address space of the CPU,
- reserves a region of size `CONFIG_ESP_FLASHPAGE_CAPACITY` starting from `0x10000` in front of the image partition `factory` and
- moves the image partition `factory` by  `CONFIG_ESP_FLASHPAGE_CAPACITY` to address `0x10000 + CONFIG_ESP_FLASHPAGE_CAPACITY`. 

The new flash layout is then:
| Address in Flash | Content |
|:-----------------------|:-----------|
| `0x0000` or `0x1000` | bootloader |
| `0x8000` | parition table |
| `0x9000` | `nvs` parition with WiFi data |
| `0xf000`  | `phy_init` partition with RF data |
| `0x10000` | flashpage region |
| `0x10000 + CONFIG_ESP_FLASHPAGE_CAPACITY` | `factory` partition with the app image |

This guarantees that the flash pages are not overwritten if a new app image with changed size is flashed. `CONFIG_ESP_FLASHPAGE_CAPACITY` has to be a multiple of 64 kBytes.

~The PR includes PR #19077 and PR #19078 for the moment to be compilable.~

### Testing procedure

The following tests should pass.
```
USEMODULE='esp_log_startup ps shell_cmds_default' BOARD=esp32-wroom-32 make -j8 -C tests/periph_flashpage flash term
```
```
USEMODULE='esp_log_startup ps shell_cmds_default' BOARD=esp32-wroom-32 make -j8 -C tests/mtd_flashpage flash term
```

### Issues/PRs references

Depends on PR #19077
Depends on PR #19078 


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-18 17:48:29 +00:00
Benjamin Valentin
c8651dd5ac tests/driver_ws281x: don't overwrite board definition
If a board has fixed defines for `WS281X_PARAM_PIN` and `WS281X_PARAM_NUMOF`
the test will overwrite them.
This leads to the LEDs *not* working in with the test, which is very confusing.
2023-01-18 13:52:23 +01:00
Teufelchen1
c17521377d tests/gcoap_dns: Remove duplicate 2023-01-16 10:40:30 +01:00
bors[bot]
1b352d69f7
Merge #17066
17066: sys/irq: Add C++ wrapper using RAII r=maribu a=jenswet

### Contribution description

This adds a C++ wrapper around the `irq.h` API. The wrapper uses RAII to accomplish a convenient and bug resistent use.
 
A little background: I'm currently writing my master thesis on using C++ for embedded development, at the working group that `@maribu` is part of. For that I will try to add better C++ support to several parts of RIOT and then do some benchmarking and metrics to compare it with the C implementation. For example, I also plan to add a wrapper around i2c, a std::cout drop-in replacement and probably some more about networks or threads.

### Testing procedure

I've added a unit test to verify that the IRQ wrapper calls the original `irq` functions as expected. As C++ and wrapper testing isn't done much so far in this project, I've added two additional headers to ease testing:
1.  #17076 - fake functions framework, already merged
2. As there is no framework for C++ unit tests yet, I've added something for this too. Unfortunately the existing frameworks like GoogleTest, CppUTest or CppUnit don't easily compile for embedded or are difficult to integrate in to the RIOT build process. That's why I wrote some (simple) helper functions and macros inspired by the above frameworks. That allows to create C++ tests based on a fixture class with set up and tear down methods. It also allows some simple assertions and is easily extendable for other use cases. It wraps some of the fff functionality too.

Both of this is obviously not required for the initial reason of this PR. But I'd like to provide unit tests for the features that I suggest to introduce where possible. So I'd appreciate some feedback on that too. If you'd prefer a PR without or different tests please let me know.

You can run the test `irq_cpp` locally or on the CI to test the implementation.

Please feel free to give feedback or suggest improvements!

Co-authored-by: Jens Wetterich <jens@wetterich-net.de>
2023-01-15 18:17:00 +00:00
bors[bot]
b8b1a605a9
Merge #17460
17460: pkg/arduino_adafruit_sensor: add Adafruit Unified Sensor Driver as package r=benpicco a=gschorcht

### Contribution description

This PR provides the [Adafruit Unified Sensor Driver](https://github.com/adafruit/Adafruit_Sensor) as package.

There are a number of Adafruit sensor drivers which all use a common base class `Adafruit_Sensor` from the [Adafruit Unified Sensor Driver](https://github.com/adafruit/Adafruit_Sensor). To support such drivers, the Adafruit Unified Sensor Driver is provided as package.

Adafruit sensor driver for ST LSM9DS0 will be provided as separat PR as package for demonstration and testing.

PR #12518 will be rebased for testing to have an Adafruit sensor driver for a sensor for which there is a native driver in RIOT.

### Testing procedure

Use a board that provides the `arduino` feature and flash
```
BOARD=... make -C tests/pkg_arduino_adafruit_sensor flash test
```
PR #12518 can be used as a more complex test for using the package.

### Issues/PRs references

Prerequisite for PR #12518

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-15 10:44:24 +00:00
bors[bot]
c8d60a2d31
Merge #18763
18763: sys/tiny_strerror: add missing error codes r=benpicco a=maribu

### Contribution description

When double-checking the error codes provided by newlib by default (without magic defines, such as `__LINUX_ERRNO_EXTENSIONS__` or `__CYGWIN__`), some where still missing in `tiny_strerror()`. This adds the missing ones.

This in turn showed that three errno codes were missing in the avr-libc compat `errno.h`, which are added as well.

### Testing procedure

Murdock should double check that the added errno codes indeed are defined by default.

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-14 22:41:37 +00: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
Jens Wetterich
a9c5987fa3
core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
Marian Buschsieweke
acbc83b8cc
tests: Update Makefile.ci 2023-01-13 13:08:39 +01:00
Benjamin Valentin
8379bb7d4a tests/nanocoap_cli: add DTLS support 2023-01-13 00:17:33 +01:00
Martine Lenders
64bea31b47
tests/congure_*: wait for serial port after reset if configured 2023-01-12 10:13:21 +01:00
bors[bot]
53176f7b9e
Merge #18134 #18738 #18939 #19118
18134: nanocoap_link_format: add helper function to parse Link Format r=kaspar030 a=benpicco



18738: nanocoap_sock: implement nanocoap_sock_delete() r=maribu a=benpicco



18939: gnrc_ipv6_nib: clean up _resolve_addr() r=maribu a=benpicco



19118: sys/ztimer: ztimer_mock: guard ztimer_ondemand static functions r=kaspar030 a=kaspar030



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
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-10 11:25:32 +00:00
bors[bot]
441b69964c
Merge #19106
19106: core/lib: Add macros/utils.h header r=aabadie a=maribu

### Contribution description

The macros CONCAT(), MIN(), and MAX() are defined over and over again in RIOT's code base. This de-duplicates the code by moving the macros to a common place.

### Testing procedure

Generated binaries don't change, as this only a de-duplication of macros that doesn't change their definition.

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-07 21:16:51 +00:00
Gunar Schorcht
c21eb6b8a8 tests/periph_flashpage: use od_hex_dump for memdump
Replaces the custom `memdump` implementation with `od_hex_dump`, which provides a more common and especially more compact print format.
2023-01-07 14:49:36 +01:00
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
Benjamin Valentin
b44d360e49 tests/periph_uart: only exclude STDIO_UART_DEV if stdio_uart is used 2023-01-06 17:23:53 +01:00
bors[bot]
9a45f4bc49
Merge #18632
18632: tests/thread_float: do not overload slow MCUs with IRQs r=kaspar030 a=maribu

### Contribution description

If the regular context switches are triggered too fast, slow MCUs will be able to spent little time on actually progressing in the test. This will scale the IRQ rate with the CPU clock as a crude way too keep load within limits.

### Testing procedure

The unit test should now pass on the Microduino CoreRF

```
$ make BOARD=microduino-corerf AVRDUDE_PROGRAMMER=dragon_jtag -C tests/thread_float flash test
make: Entering directory '/home/maribu/Repos/software/RIOT/tests/thread_float'
Building application "tests_thread_float" for "microduino-corerf" with MCU "atmega128rfa1".
[...]
   text	  data	   bss	   dec	   hex	filename
  12834	   520	  3003	 16357	  3fe5	/home/maribu/Repos/software/RIOT/tests/thread_float/bin/microduino-corerf/tests_thread_float.elf
avrdude -c dragon_jtag -p m128rfa1  -U flash:w:/home/maribu/Repos/software/RIOT/tests/thread_float/bin/microduino-corerf/tests_thread_float.hex
[...]
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: 2022.10-devel-858-g18566-tests/thread_float)
THREADS CREATED

Context switch every 3125 µs
{ "threads": [{ "name": "idle", "stack_size": 192, "stack_used": 88 }]}
{ "threads": [{ "name": "main", "stack_size": 640, "stack_used": 220 }]}
THREAD t1 start
THREAD t2 start
THREAD t3 start
t1: 141.443770
t3: 141.466810
t1: 141.443770
t3: 141.466810
t1: 141.443770
t3: 141.466810
t1: 141.443770
t3: 141.466810
t1: 141.443770
t3: 141.466810
t1: 141.443770
t3: 141.466810
t1: 141.443770

make: Leaving directory '/home/maribu/Repos/software/RIOT/tests/thread_float'
```

(~~Note: The idle thread exiting is something that should never occur. I guess the culprit may be `cpu_switch_context_exit()` messing things up when the main thread exits. But that is not directly related to what this PR aims to fix. Adding a `thread_sleep()` at the end of `main()` does indeed prevent the idle thread from exiting.~~
Update: That's expected. The idle thread stats are printed on exit of the main thread, the idle thread does not actually exit.)

### Issues/PRs references

Fixes https://github.com/RIOT-OS/RIOT/issues/16908 maybe?

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-04 16:25:23 +00:00
bors[bot]
21af24729e
Merge #19030 #19085
19030: tests/periph_timer_short_relative_set: improve test r=benpicco a=maribu

### Contribution description

Reduce the number lines to output by only testing for intervals 0..15 to speed up the test.

In addition, run each test case 128 repetitions (it is still faster than before) to give some confidence the short relative set actually succeeded.

### Testing procedure

The test application should consistently fail or succeed, rather than occasionally passing.

### Issues/PRs references

None

19085: makefiles/tests/tests.inc.mk: fix test/available target r=benpicco a=maribu

### Contribution description

`dist/tools/compile_and_test_for_board/compile_and_test_for_board.py` relies on `make test/available` to check if a test if available. However, this so far did not take `TEST_ON_CI_BLACKLIST` and `TEST_ON_CI_WHITELIST` into account, resulting in tests being executed for boards which they are not available. This should fix the issue.

### Testing procedure


#### Expected to fail

```
$ make BOARD=nrf52840dk -C tests/gcoap_fileserver test/available
$ make BOARD=microbit -C tests/log_color test/available
```

(On `master`, they succeed, but fail in this PR.)

#### Expected to succeed

```
$ make BOARD=native -C tests/gcoap_fileserver test/available
$ make BOARD=nrf52840dk -C tests/pkg_edhoc_c test/available
$ make BOARD=nrf52840dk -C tests/log_color test/available
```

(Succeed in both `master` and this PR.)

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-04 01:20:19 +00:00
bors[bot]
096ed0048a
Merge #18950
18950: tests/unittests: add unit tests for core_mbox r=benpicco a=maribu

### Contribution description

As the title says

### Testing procedure

The test cases are run on `native` by Murdock anyway.

### Issues/PRs references

Split out of https://github.com/RIOT-OS/RIOT/pull/18949

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-03 22:19:39 +00:00
Marian Buschsieweke
0835466498
tests/thread_float: do not overload slow MCUs with IRQs
If the regular context switches are triggered too fast, slow MCUs
will be able to spent little time on actually progressing in the
test. This will scale the IRQ rate with the CPU clock as a crude way
too keep load within limits.
2023-01-03 22:17:51 +01:00
bors[bot]
e51d8285f3
Merge #19037
19037: sys/usb, pkg/tinyusb: move USB board reset from highlevel STDIO to CDC ACM r=dylad a=gschorcht

### Contribution description

The USB board reset function `usb_board_reset_coding_cb` can be used on any CDC-ACM interface, even if the CDC ACM interface is not used as high-level STDIO. Therefore, this PR provides the following changes:

- The call of the board reset function `usb_board_reset_coding_cb` from USBUS stack has been moved from the STDIO CDC ACM implementation to the CDC ACM implementation and is thus a feature of any USBUS CDC ACM interface which does not necessarily have to be used as highlevel STDIO.

- The call of the board reset function `usb_board_reset_coding_cb` from tinyUSB stack been moved from module `tinyusb_stdio_cdc_acm` to module `tinyusb_contrib` and is compiled in if the `tinyusb_class_cdc` module is used together the `tinyusb_device` module. Thus, it is now a feature of the tinyUSB CDC ACM interface, which does not necessarily have to be used as highlevel STDIO.
 
- The `usb_board_reset` module defines the `usb_board_reset_in_bootloader` function as a weak symbol to be used when reset in bootloader if no real implementation of this function is compiled in and the `riotboot_reset` module is not used. It only prints an error message that the reset in bootloader is not supported. This is necessary if the module `usb_board_reset` is used to be able to restart the board with an application via a USB CDC ACM interface, but the board's bootloader does not support the reset in bootloader feature.

- A test application has been added that either uses the highlevel STDIO `stdio_acm_cdc` or creates a CDC-ACM interface to enable board resets via USB. If the `usbus_dfu` module is used, it also initializes the DFU interface to be able to work together with the `riotboot_dfu` bootloader.

### Testing procedure

1. Use a board with a bootloader that supports the reset in bootloader via USB, but don't use the highlevel STDIO to check that it works with `usbus_cdc_acm`, for example:
   ```python
   USEMODULE=stdio_uart BOARD=arduino-mkr1000 make -C tests/usb_board_reset flash
   ```
   After reset in application with command
   ```python
   stty -F /dev/ttyACM0 raw ispeed 600 ospeed 600 cs8 -cstopb ignpar eol 255 eof 255
   ```
   command `dmesg` should give an output like the following with RIOT's test VID/PID:
   ```python
   dmesg
   [1745182.057403] usb 1-4.1.2: new full-speed USB device number 69 using xhci_hcd
   [1745182.160386] usb 1-4.1.2: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00
   [1745182.160390] usb 1-4.1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
   [1745182.160392] usb 1-4.1.2: Product: arduino-mkr1000
   [1745182.160393] usb 1-4.1.2: Manufacturer: RIOT-os.org
   [1745182.160395] usb 1-4.1.2: SerialNumber: 6B6C2CA5229020D8
   [1745182.170982] cdc_acm 1-4.1.2:1.0: ttyACM0: USB ACM device
   ```
   After reset in bootloader with command
   ```python
   stty -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
   ```
   command `dmesg` should give an output like the following with vendor VID/PID:
   ```python
   [1746220.443792] usb 1-4.1.2: new full-speed USB device number 70 using xhci_hcd
   [1746220.544705] usb 1-4.1.2: New USB device found, idVendor=2341, idProduct=024e, bcdDevice= 2.00
   [1746220.544708] usb 1-4.1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
   [1746220.553471] cdc_acm 1-4.1.2:1.0: ttyACM0: USB ACM device
   ```
   
2. Test the same as in 1., but this time use the highlevel STDIO to check that there is no regression and it still works with `stdio_cdc_acm`, for example:
   ```python
   BOARD=arduino-mkr1000 make -C tests/usb_board_reset flash
   ```
   
3. Use a board that supports `riotboot_dfu` but doesn't use the highlevel STDIO and flash the `riotboot_dfu` bootloader, for example:
   ```python
   BOARD=stm32f429i-disc1 make -C bootloaders/riotboot_dfu flash term
   ```
   Once the bootloader is flashed, command `dfu-util --list` should give something like the following:
   ```python
   Found DFU: [1209:7d02] ver=0100, devnum=14, cfg=1, intf=0, path="1-2", alt=1, name="RIOT-OS Slot 1", serial="6591620BCB270283"
   Found DFU: [1209:7d02] ver=0100, devnum=14, cfg=1, intf=0, path="1-2", alt=0, name="RIOT-OS Slot 0", serial="6591620BCB270283"
   ```
   If the output gives only
   ```python
   Found Runtime: [1209:7d00] ver=0100, devnum=123, cfg=1, intf=0, path="1-2", alt=0, name="RIOT-OS bootloader", serial="6591620BCB270283"
   ```
   an application is already running in DFU Runtime mode. Use `dfu-util -e` to restart it in bootloader DFU mode.
   Then flash the test application, for example:
   ```python
   FEATURES_REQUIRED=riotboot USEMODULE='usbus_dfu riotboot_reset' \
   BOARD=stm32f429i-disc1 make -C tests/usbus_board_reset PROGRAMMER=dfu-util riotboot/flash-slot0
   ```
   Once the test application is flashed, command `dfu-util --list` should give:
   ```python
   Found Runtime: [1209:7d00] ver=0100, devnum=123, cfg=1, intf=0, path="1-2", alt=0, name="RIOT-OS bootloader", serial="6591620BCB270283"
   ```
   Now, use command
   ```python
   stty -F /dev/ttyACM1 raw ispeed 600 ospeed 600 cs8 -cstopb ignpar eol 255 eof 255
   ``` 
   to restart the board in application. Command `dfu-util --list` should give again the following:
   ```python
   Found Runtime: [1209:7d00] ver=0100, devnum=123, cfg=1, intf=0, path="1-2", alt=0, name="RIOT-OS bootloader", serial="6591620BCB270283"
   ```
   That is, the application is running in DFU Runtime mode. Then use command
   ```python
   stty -F /dev/ttyACM1 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
   ```
   to restart the board in bootloader DFU mode. Command  `dfu-util --list` should now give the following:
   ```python
   Found DFU: [1209:7d02] ver=0100, devnum=50, cfg=1, intf=0, path="1-2", alt=1, name="RIOT-OS Slot 1", serial="7D156425A950A8EB"
   Found DFU: [1209:7d02] ver=0100, devnum=50, cfg=1, intf=0, path="1-2", alt=0, name="RIOT-OS Slot 0", serial="7D156425A950A8EB"
   ```
   That is, the bootloader is in DFU mode and another application can be flash.
   
4. After a hard reset of the board under 3., try the commands `reboot` and `bootloader`. 

5. To check the same for tinyUSB, use the existing tinyUSB application with a CDC ACM interface and add module `usb_board_reset`, for example:
   ```python
   USEMODULE=usb_board_reset BOARD=stm32f429i-disc1 make -C tests/pkg_tinyusb_cdc_msc flash term
   ```
   After flashing, it should be possible to restart the application with command:
   ```python
   stty -F /dev/ttyACM1 raw ispeed 600 ospeed 600 cs8 -cstopb ignpar eol 255 eof 255
   ```
   When using command
   ```python
   stty -F /dev/ttyACM1 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
   ```
   the following error message should be shown in terminal
   ```python
   [cdc-acm] reset in bootloader is not supported
   ```
   
### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-03 19:36:16 +00:00
Gunar Schorcht
709667a58b tests/usbus_board_reset: test application
The test application either uses the USBUS highlevel STDIO module `stdio_acm_cdc` or it creates a CDC ACM interface to enable board reset via USBUS CDC ACM. If the `usbus_dfu` module is used together with the `riotboot_dfu` bootloader, it also initializes the USBUS DFU Runtime interface.
2023-01-03 10:05:54 +01:00
Marian Buschsieweke
d2a3ff3d83
boards/{bluepill*,blackpill*}: rename and improve doc
- renamed:
    - `bluepill` --> `bluepill-stm32f103c8`
    - `bluepill-128kib` --> `bluepill-stm32f103cb`
    - `blackpill` --> `blackpill-stm32f103c8`
    - `blackpill-128kib` --> `blackpill-stm32f103cb`
- doc:
    - added link to corresponding hardware page on the STM32-base
      project
    - added picture
2023-01-02 16:23:10 +01:00
Gunar Schorcht
6b9690cdb7 tests/pkg_arduino_adafruit_sensor: add test app 2022-12-15 18:36:05 +01:00
Gunar Schorcht
e152159a35 tests/driver_sht2x: migration to ztimer 2022-12-14 21:47:32 +01:00
Marian Buschsieweke
05bb4bb4fd
tests/periph_timer_short_relative_set: improve test
Reduce the number lines to output by only testing for intervals 0..15
to speed up the test.

In addition, run each test case 128 repetitions (it is still faster
than before) to give some confidence the short relative set actually
succeeded.
2022-12-09 22:10:18 +01:00
Marian Buschsieweke
9b3df5b4ff
tests/unittests: add unit tests for core_mbox 2022-12-09 14:47:11 +01:00
Marian Buschsieweke
88d840f796
Merge pull request #18963 from maribu/tests/periph_timer
tests/periph_timer: also test for spurious IRQs
2022-12-08 11:11:47 +01:00
Juergen Fitschen
71a606a1db
Merge pull request #17607 from jue89/feature/ztimer-ondemand
ztimer: add ztimer_ondemand module for implicit power management
2022-12-06 18:30:16 +01:00
benpicco
0d64cc2fa5
Merge pull request #19006 from gschorcht/pkg/tinyusb_board_reset
pkg/tinyusb: add usb_board_reset support
2022-12-06 17:16:18 +01:00
Gunar Schorcht
9fd2d6b6e0 tests/pkg_tinyusb_cdc_acm_stdio: add Kconfig support 2022-12-03 12:59:49 +01:00
Gunar Schorcht
4b328203d2 tests/pkg_tinyusb_cdc_msc: cleanup app.config.test
Modules `tinyusb_common` and `tinyusb_device` are enabled automatically when package `tinyusb` is used. There is no need to enable them manually.
2022-12-03 12:11:47 +01:00
Gunar Schorcht
7d7c8b1f32 tests/riotboot_flashwrite: blacklist blxxxpill boards 2022-11-30 19:28:14 +01:00
Kevin "Tristate Tom" Weiss
16b616218c
Merge pull request #18734 from Teufelchen1/tests/uri_parser
unittests/uri_parser: Rework tests to be more verbose
2022-11-29 19:43:34 +01:00
Teufelchen1
49efb727da unittests/uri_parser: Rework tests to be more verbose 2022-11-29 16:47:07 +01:00
benpicco
388f9a2015
Merge pull request #18887 from kfessel/p-clean-header-kerneldef
sys/include: remove kernel_defines.h where not needed
2022-11-29 10:14:52 +01:00
Marian Buschsieweke
496abf0a4e
tests/periph_timer: also test for spurious IRQs
Previously the test only checked if IRQs fired when expected. This
extends the test to also check that IRQs do not fire when not expected.
2022-11-25 12:33:54 +01:00
Marian Buschsieweke
e7ee53e6ed
tests/periph_timer: fix style and use of volatile
To synchronize communication via shared memory between ISR context and
thread context it is a common misconception that `volatile` is
sufficient. This is however is not the cause and the cause of many
subtle data race bugs. This fixes the issue.
2022-11-25 12:33:54 +01:00
Juergen Fitschen
d9cde14669 treewide: fix typos found by recent codespell 2022-11-24 14:53:48 +01:00
benpicco
e6284ec244
Merge pull request #18816 from benpicco/nanocoap_handle_req-ctx
nanocoap: add request context to coap_handle_req()
2022-11-23 20:36:50 +01:00
a87a066762
Merge pull request #18952 from maribu/tests/pkg_utensor
tests/pkg_utensor: increase main threads stack size
2022-11-23 14:54:34 +01:00
Marian Buschsieweke
22f882d335
tests/pkg_utensor: increase main threads stack size
The MPU based stack guard is very unpleased by the stack overflow
happening during the test. The increase in stack size makes the MPU
stack guard happy again.
2022-11-22 18:55:19 +01:00
Karl Fessel
54ada3685a tests: add missing includes 2022-11-22 13:39:35 +01:00
Benjamin Valentin
fd42f72b20 tests/nanocoap_cli: provide coap_request_ctx_t 2022-11-22 10:41:32 +01:00
Jue
8d6d6f2bbc ztimer: add benchmarking tool 2022-11-22 00:25:34 +01:00
Jue
9fbb4d3391 ztimer/convert: only extend the clocks if ztimer_ondemand isn't used 2022-11-22 00:25:34 +01:00
Jue
4013dff1fd ztimer: acquire and release clock for running timers 2022-11-22 00:25:34 +01:00
Jue
a228ca7548 ztimer: introduce ztimer_acquire() and ztimer_release() 2022-11-22 00:25:34 +01:00
Marian Buschsieweke
b1da8168b5
tests/pbkdf2: remove unused #include 2022-11-21 16:42:00 +01:00
3cd9f0d8fb
Merge pull request #18918 from benpicco/print_bytes_hex
sys/fmt: add print_bytes_hex()
2022-11-19 09:35:26 +01:00
Marian Buschsieweke
176cb9a7b0
tests/pbkdf2: de-flanky-fy test
Previously, the test vectors were encoded into the python test scripts,
converted to base64, and send over to the device under test via stdio.
The application sent back the output after converting it to base64
first, which was read back in by the test script and decoded. Finally,
the test script compared the result with the expected result.

This made the test complex, slow and, flanky, as stdio on interfaces
such as UART has a high bit error rate and some quirks (e.g. the EDBG
UART bridge e.g. in the samr21-xpro dropping bytes when bursts of more
than 64 bytes at a time are send).

This basically rewrites the test to embed the test vectors in the
firmware and do the comparison on the devices. This fixes test failures
on the samr21-xpro, the nRF52840-DK and likely many others. Also, it
is now fast.
2022-11-18 13:55:26 +01:00
Benjamin Valentin
9dc63f583a tests/fmt_print: add test for print_bytes_hex() 2022-11-18 13:40:59 +01:00
Gunar Schorcht
600421dc75 tests/pkg_tflite-micro: fix the out of ROM problem for stm32fdiscovery 2022-11-18 07:33:28 +01:00
benpicco
e710b6f07c
Merge pull request #18854 from benpicco/gnrc_sock_udp-_remote_mismatch
gnrc_sock_udp: accept response from any address if remote is multicast
2022-11-15 20:33:58 +01:00
Benjamin Valentin
920d690694 test/gnrc_udp: add test multicast sock 2022-11-15 11:26:31 +01:00
benpicco
29128759ee
Merge pull request #18891 from maribu/tests/shell
tests/shell: fix failure on samr21-xpro
2022-11-15 00:46:42 +01:00
Marian Buschsieweke
eb6addeba5
tests/pkg_emlearn: fix compilation
It turns out that the fix for the missing terminating newline is not
robust. This hopefully fixes the issue and resolves the following
error message:

    In file included from /home/maribu/Repos/software/RIOT/tests/pkg_emlearn/main.c:25:
    /home/maribu/Repos/software/RIOT/tests/pkg_emlearn/model.h:7221:36: error: stray '\' in program
     7221 |     /* fix for no newline at eof */\n
          |                                    ^
    /home/maribu/Repos/software/RIOT/tests/pkg_emlearn/model.h:7221:38: error: expected ';' before '_Alignas'
     7221 |     /* fix for no newline at eof */\n
          |                                      ^
          |                                      ;
2022-11-13 00:20:10 +01:00
Marian Buschsieweke
4e00c0e360
Merge pull request #18894 from kaspar030/shorten_bitarithm_timings_runtime
tests/bitarithm_timings: shorten timeout from 5s to 200ms
2022-11-12 12:26:40 +01:00
benpicco
2801107570
Merge pull request #18888 from kfessel/p-fix-tinyusb-defaultbuild
tests/pkg_tinyusb*: add a BOARD to make make build
2022-11-12 03:55:54 +01:00
317e05b869 tests/bitarithm_timings: shorten timeout from 5s to 200ms 2022-11-11 23:49:03 +01:00
Marian Buschsieweke
e95f7551eb
tests/shell: fix failure on samr21-xpro
The test (at least locally) fails on the long shell line detection in
`master`, as the EDBG UART adapter drops chars when more than 64 bytes
are send at a time. This works around the issue:

- The line buffer in the test is reduced to 60 bytes, so that
  overflowing it becomes possible with sending less than 64 bytes.
- The test script is adapted to exceed the shell buffer size by one
  byte only (due to linefeed char), rather than significantly.
    - Sending more than 64 bytes would result in the linefeed being
      dropped by the EDBG adapter and the test failing

Finally, the shell buffer is no longer allocated on the stack and,
hence, the main stack size could be reduced a bit. The test still
passes on the Nucleo-F767ZI which is notorious in failing on tight
stacks due to the MPU stack guard - so the stack size reduction is
expected to work for all boards.
2022-11-11 23:00:58 +01:00
Karl Fessel
edeed17e1b tests/pkg_tinyusb*: add a BOARD to make make build 2022-11-11 20:41:57 +01:00
Juergen Fitschen
f840fd0730
Merge pull request #18878 from maribu/tests/pkg_tinyvcdiff
tests/pkg_tinyvcdiff: fix stack overflow
2022-11-11 16:15:09 +01:00
Marian Buschsieweke
bec46c55bd
Merge pull request #18879 from benpicco/bf_popcnt
sys/bitfield: add bf_popcnt()
2022-11-11 11:35:14 +01:00
Marian Buschsieweke
2fbde4af19
tests/pkg_tinyvcdiff: fix stack overflow
Move some variables from stack to `.bss` / `.data` to avoid stack
overflows, which are detected by the MPU stack guard (e.g. on the
Nucleo-F767ZI that I used) and results in the test failing.
2022-11-11 08:46:09 +01:00
Benjamin Valentin
867ba0666a tests/unittests: add tests for bf_popcnt() 2022-11-10 23:52:35 +01:00
Karl Fessel
19021d618e
Merge pull request #18858 from kfessel/p-fix-DIV2
core/marco: fix DIV_ROUND
2022-11-10 16:26:20 +01:00
Marian Buschsieweke
fdc3f6a56b
tests/mpu_stack_guard: Fix compilation on modern GCC (>= 12.x)
The `mpu_stack_guard` test intentionally overflows the stack with a
stupid infinite recursion. Newer versions of GCC started to dislike
this, so this disables the corresponding diagnostics to get the
intentional stack overflow still compiled.
2022-11-10 12:49:18 +01:00
Karl Fessel
aa31dd7d66 core/macros: rewrite DIV_ROUND, DIV_ROUND_UP; add DIV_ROUND_INF 2022-11-09 17:59:18 +01:00
Karl Fessel
228d8e72c0 unittest/core-macros: add negtive cases for DIV_ROUND and DIV_ROUND_UP 2022-11-09 17:59:18 +01:00
Marian Buschsieweke
e402e3f57a
Merge pull request #18849 from benpicco/core-SIGNOF
core/macros: fix SIGNOF() macro when applied to size_t
2022-11-09 17:54:00 +01:00
Benjamin Valentin
8f8bb6ce84 tests/unittests: core: add test for SIGNOF(size_t) 2022-11-09 14:23:51 +01:00
Benjamin Valentin
ea0cf85d73 tests/pkg_tinyusb_cdc_acm_stdio: add test for stdio via CDC ACM 2022-11-09 12:06:36 +01:00
Benjamin Valentin
5938bd815a pkg/tinyusb: provide common tusb_config.h 2022-11-09 12:06:36 +01:00
benpicco
e38e0b937c
Merge pull request #18835 from gschorcht/pkg/tinyusb_descriptors
pkg/tinyusb: add common USB descriptors implementation
2022-11-09 10:42:15 +01:00
Gunar Schorcht
579370fd75 tests/pkg_tinyusb_cdc_msc: use common descriptors implementation 2022-11-09 06:57:55 +01:00
benpicco
f8964c0149
Merge pull request #18827 from benpicco/nanocoap_block-fix
nanocoap_sock: don't store entire sock in coap_block_request_t
2022-11-08 10:49:39 +01:00
Marian Buschsieweke
7e0af3cd22
Merge pull request #18833 from benpicco/bitfield-ops
sys/bitfield: add bf_find_first_{set, unset}()
2022-11-07 20:27:48 +01:00
Benjamin Valentin
4fe202db1e examples: check return value of coap_build_reply()
`coap_build_reply()` may return negative values on error or
0 in the no-response case.

Don't use it to calculate a payload offset without checking first.
2022-11-04 20:00:51 +01:00
Benjamin Valentin
17374301c9 tests/unittests: add tests for bf_set_all() 2022-11-04 16:48:49 +01:00
Benjamin Valentin
6185715aea tests/unittests: add tests for new bitfield functions 2022-11-02 13:06:06 +01:00
benpicco
7a2c665d70
Merge pull request #18762 from benpicco/tests/thread_msg_bus-enhance
tests/thread_msg_bus: enhance test with non-bus message
2022-11-01 12:56:25 +01:00
Benjamin Valentin
63c9dde3a4 nanocoap_sock: don't store entire sock in coap_block_request_t 2022-11-01 00:17:11 +01:00
Marian Buschsieweke
d704a1a805
Merge pull request #18822 from jue89/feature/at86rf2xx_ztimer
drivers/at86rf2xx: migrate to ztimer
2022-10-31 15:44:53 +01:00
Jue
782409eb05 tests/driver_at86rf2xx_aes: remove unnessesary xtimer.h import 2022-10-29 23:47:59 +02:00
Martine Lenders
3c7c9fefd6
tests/unittests: fix get_frame_hdr_len tests for hardened parsing 2022-10-29 00:58:35 +02:00
benpicco
2a934c9434
Merge pull request #18733 from bergzand/pr/driver/matrix_keypad
matrix_keypad: Add matrix-style keypad module
2022-10-28 20:46:13 +02:00
Karl Fessel
754e272d74
Merge pull request #18807 from kfessel/p-cleanup-vera-unittest
test/unittest: cleanup most vera++ complains
2022-10-28 14:40:05 +02:00
1d33455116
matrix_keypad: add test application 2022-10-28 10:03:37 +02:00
benpicco
ed1d8e0a3d
Merge pull request #18785 from maribu/boards/blxxxpill/periph_conf
boards/common/blxxxpill: Fix pin conflicts in periph_conf
2022-10-27 21:22:10 +02:00
Karl Fessel
c29d2f1afb test/unittest: cleanup most vera++ complains 2022-10-27 16:31:59 +02:00
Martine Lenders
9ae66beedf
Merge pull request #16156 from miri64/gnrc_sixlowpan_frag_sfr/feat/congure
gnrc_sixlowpan_frag_sfr: provide CongURE support
2022-10-27 15:01:07 +02:00
Marian Buschsieweke
16df27c51d
makefiles/cflags.inc.mk: Add -Wno-missing-field-initializers to CXXFLAGS
This allows including C headers from C++. It sadly reduced the
diagnostics on C++ code as well, were there warning may make sense as
unintended side effect. We may be able to drop that later on, when more
C APIs are properly wrapped in native C++ APIs, so that C headers do no
longer need to be compatible with C++ compilers.
2022-10-27 14:28:06 +02:00
Martine Lenders
d485598b3a
Merge pull request #18744 from Teufelchen1/fix/clif_0
sys/clif: Fixing out of bounds read under certain conditions
2022-10-26 23:38:43 +02:00
Teufelchen1
499b635ae9 sys/clif: Fixing out of bounds read under certain conditions 2022-10-26 13:44:01 +02:00
Martine Lenders
bc24f9af96
tests: add test for 6LoWPAN SFR using CongURE 2022-10-26 09:12:36 +02:00
Martine Lenders
d759d2d18b
Merge pull request #18772 from namib-project/accept-helper
sys/net/nanocoap: introduce Accept option helper
2022-10-20 04:13:33 +02:00
benpicco
10296605e0
Merge pull request #18761 from krzysztof-cabaj/sys-shell
sys/shell: fix deprecated shell_command in examples and tests
2022-10-19 23:02:36 +02:00
Jan Romann
61d1516c6f tests/nanocoap: add unit test for Accept option helper 2022-10-19 16:44:13 +02:00
Martine Lenders
8cf4844d0e
tests/congure_abe: reset node before starting terminal
Fixes synchronization issues on stdio_uart. Copied from the setup
function in tests/congure_reno/tests/01-run.py
2022-10-19 09:48:45 +02:00
Martine Lenders
07c04bc0e3
Merge pull request #15968 from miri64/congure/feat/congure_abe
congure_abe: initial import of TCP Alternative Backoff with ECN for CongURE
2022-10-18 15:50:06 +02:00
Benjamin Valentin
0b4129ae8b tests/thread_msg_bus: enhance test with non-bus message 2022-10-18 13:25:09 +02:00
krzysztof-cabaj
7035c2c5da tests/nimble_esp_wifi_coexists: fix deprecated shell_commands 2022-10-18 04:58:37 -04:00
Martine Lenders
a4e7c93d8f
tests: Initial import of congure_abe tests 2022-10-18 09:23:06 +02:00
benpicco
0b2fbce906
Merge pull request #18299 from fabian18/preprocessor_successor
sys: preprocessor successor module
2022-10-17 22:42:27 +02:00
krzysztof-cabaj
76b71c8e56 tests/gcoap_fileserver: fix deprecated shell_commands and md5sum 2022-10-17 16:17:24 -04:00
Martine Lenders
68b9637295
Merge pull request #15952 from miri64/congure/feat/congure_quic
congure_quic: initial import of QUIC congestion control
2022-10-17 14:35:18 +02:00
Fabian Hüßler
bded32d7b2 tests/external_modules: use AUTO_INIT_PRIORITY_AFTER 2022-10-17 10:38:14 +02:00
Martine Lenders
1bf241e7c3
tests: Initial import of congure_quic tests 2022-10-17 10:27:44 +02:00
Marian Buschsieweke
fb318c0e9f
Merge pull request #18722 from miri64/test-on-iotlab/fix/several
test-on-iotlab: several fixes to make it runnable again
2022-10-17 09:23:11 +02:00
Marian Buschsieweke
e26d1a085e
Merge pull request #18743 from benpicco/boards/blxxxpill-128kib_cdc-acm
boards/blxxxpill-128kib: default to CDC ACM for stdio
2022-10-15 23:40:58 +02:00
Benjamin Valentin
2fd6cf7ee7 tests: update Makefile.ci for blxxxpill-128kib with CDC ACM 2022-10-15 23:33:41 +02:00
benpicco
4d0c533260
Merge pull request #18154 from benpicco/nanocoap_no-response
nanocoap: add support for no-response option
2022-10-15 21:16:00 +02:00
Jose Alamos
ca9461834f
tests/socket_zep: set event_callback before init 2022-10-14 16:07:19 +02:00
Jose Alamos
cfe8149c35
tests/sx12xx: set event_callback before init 2022-10-14 16:07:02 +02:00
Jose Alamos
209f64ccb2
tests/nrf802154: set event_callback before init 2022-10-14 16:06:43 +02:00
Jose Alamos
f259292df9
tests/cc2538_rf: set event_callback before init 2022-10-14 16:06:29 +02:00
chrysn
982ec4dcda
gnrc_netreg: Use locks around netreg
This eliminates race conditions around unregistering netdevs.

gnrc_netreg_lookup-style functions perform a DEVELHELP check on whether
that lock is held.
2022-10-14 03:35:15 +02:00
Marian Buschsieweke
ea0a53521f
Merge pull request #17812 from benpicco/boards/blxxxpill-usb
boards/blxxxpill: configure usbdev_fs
2022-10-14 01:10:23 +02:00
Benjamin Valentin
d3d89aaec8
boards/blxxxpill: configure usbdev_fs 2022-10-13 21:59:47 +02:00
Benjamin Valentin
29cb2d05a3 tests/nanocoap_cli: add test for no-response 2022-10-13 19:04:09 +02:00
Benjamin Valentin
794fa433ce tests/nanocoap_cli: add DELETE to test 2022-10-13 18:56:28 +02:00
Marian Buschsieweke
b539d7ad6d
Merge pull request #17905 from benpicco/GNRC_NETIF_STACKSIZE_DEFAULT
gnrc_netif: don't allocate message queue on the stack
2022-10-13 17:10:43 +02:00
Benjamin Valentin
27b5bae5b6 tests/netutils: reduce mock netif queue size 2022-10-13 00:24:29 +02:00
Marian Buschsieweke
0253c478ec
tests/thread_stack_alignment: new test application 2022-10-12 21:56:08 +02:00
benpicco
913bf3748c
Merge pull request #18699 from miri64/gnrc_netif_lorawan/enh/up-down-support
gnrc_netif_lorawan: add support for LINK_UP/_DOWN events
2022-10-12 17:11:51 +02:00
Benjamin Valentin
7e0aeb3186 tests/gcoap_fileserver: add test for PUT 2022-10-12 11:37:28 +02:00
Martine Lenders
7f146b6712
tests/gnrc_ipv6_nib: up interface on initial initialization
Since SLAAC now happens on the up event, the tests needs to ensure, that
`gnrc_ipv6_nib_iface_up()` is called before assuming SLAAC happened. For
the mock interface, this is done by gnrc_ipv6_nib_iface_up().
2022-10-12 09:37:26 +02:00
Benjamin Valentin
c46d9d7360 tests/unittests: sock_util: test with schema of uneven length 2022-10-10 19:04:15 +02:00
Martine Lenders
2c3a44ca53
tests/gnrc_rpl: mark the test as only for native in build system 2022-10-10 15:22:04 +02:00
Marian Buschsieweke
f02bc5791a
Merge pull request #18571 from maribu/sys/tiny_strerror
sys/tiny_strerror: add tiny `strerror()` implementation
2022-10-05 09:24:40 +02:00
Marian Buschsieweke
6ced6dfde7
Merge pull request #18686 from benpicco/checksum/crc32
sys/checksum: add CRC-32 checksum
2022-10-04 23:06:04 +02:00
benpicco
161172c678
Merge pull request #18656 from benpicco/event_periodic_callback_get_arg
event_periodic_callback: add getter for user context, one-shot event
2022-10-04 20:47:26 +02:00
Benjamin Valentin
eb527d3481 tests/unittests: add test for CRC-32 checksum 2022-10-04 15:40:53 +02:00
Dylan Laduranty
11aebb6003
Merge pull request #18592 from gschorcht/pkg/tinyusb
pkg/tinyusb: add tinyUSB as package
2022-10-04 13:08:36 +02:00
Gunar Schorcht
bb337cde8e pkg/tinyusb: use auto_init for tinyusb stack and thread setup 2022-10-04 07:40:18 +02:00
chrysn
69cb6b12fc rust: Update dependencies
The change in 399e25cc was did not have the intended effect: As the
local crates still all defined 0.7 as the riot-wrappers version, that
dependency was actually down- rather than upgraded, and thus did not
effect the stabilizations.
2022-10-04 00:28:46 +02:00
Marian Buschsieweke
3227fb3b17
Merge pull request #18619 from maribu/core/mutex/cleanup
core/mutex: clean up
2022-10-03 10:58:07 +02:00
chrysn
b31eb6b15c
Merge pull request #18678 from chrysn-pull-requests/rust-update-20221001
rust: Update dependencies, build and test more on stable
2022-10-02 18:09:31 +02:00
chrysn
22e46eb700 rust: Run all tests on stable
Closes: https://github.com/RIOT-OS/RIOT/issues/18500
2022-10-01 21:31:16 +02:00
chrysn
399e25cce3 rust: Update dependencies
This pulls in versions of previously nightly-only crates that can be
built on 1.65 beta.

The Cargo overrides that direct the resolver to the git repositories are
disabled while the version used in tree also happens to be a released
version of the crates, as it should be the case as per [251].

[251]: https://github.com/RIOT-OS/Release-Specs/issues/251
2022-10-01 21:29:20 +02:00
Gunar Schorcht
3367b106bb tests: add tinyUSB CDC and MSC device test application 2022-09-30 19:05:51 +02:00
benpicco
1935b626d5
Merge pull request #18672 from benpicco/vfs-abs_path
vfs: drop unused abs_path parameter
2022-09-30 16:42:57 +02:00
José Alamos
f022ac3e23
Merge pull request #17884 from Ollrogge/gnrc_lorawan1.1
gnrc/lorawan: add basic LoRaWAN 1.1 features
2022-09-30 11:29:55 +02:00
3ee3d1b9ac
Merge pull request #18562 from MrKevinWeiss/pr/removemips
cpu/mips: Remove all mips
2022-09-30 10:47:09 +02:00
benpicco
d0ac322a11
Merge pull request #18199 from benpicco/tests/gcoap_fileserver
tests/gcoap_fileserver: add integration test for GCoAP fileserver
2022-09-29 22:44:14 +02:00
Benjamin Valentin
85dd564f87 vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
Ollrogge
32cef708a7 gnrc/lorawan: uncrustify files 2022-09-29 11:26:04 +02:00
Ollrogge
5053e3ecae tests/gnrc_lorawan: Adjust 1.0 tests && add 1.1 tests 2022-09-29 11:26:04 +02:00
Ollrogge
12a4e1c1ec gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
benpicco
c35a4ba577
Merge pull request #18621 from benpicco/strscpy
sys/string_utils: add strscpy()
2022-09-28 19:11:42 +02:00
Marian Buschsieweke
96d982faec
tests/periph_gpio_ll: add missing include 2022-09-28 17:59:04 +02:00
Benjamin Valentin
b2edca1611 tests/event_periodic_callback: add one-shot test 2022-09-27 15:46:59 +02:00
MrKevinWeiss
6cad5d2477
cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
Benjamin Valentin
3fc4d9d98c tests/unittests: add tests for libc module 2022-09-26 19:06:46 +02:00