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

6641 Commits

Author SHA1 Message Date
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
Marian Buschsieweke
9add97fe0e
tests: remove bogus files 2022-09-25 21:23:54 +02:00
chrysn
976de15da6
Merge pull request #18642 from chrysn-pull-requests/rust-20220924
rust: Update dependencies
2022-09-25 14:52:16 +02:00
benpicco
857fe7d8ad
Merge pull request #18635 from benpicco/tests/gnrc_ipv6_nib_iface_up
tests: call gnrc_ipv6_nib_iface_up() after gnrc_ipv6_nib_init_iface()
2022-09-25 14:19:40 +02:00
chrysn
168ec76a17 rust: Update dependencies
This will allow more components to build on 1.64 stable, and contains a
fix relevant for https://github.com/RIOT-OS/RIOT/pull/18619.

CoAP modules are held back as they appear to need an even newer nightly
than in the current riotdocker to build without feature declarations.
2022-09-25 10:16:27 +02:00
Marian Buschsieweke
77731c5f7b
treewide: s/gnrc_pktbuf_cmd/shell_cmd_gnrc_pktbuf/
Replace the deprecated module gnrc_pktbuf_cmd with the new
shell_cmd_gnrc_pktbuf module.
2022-09-24 14:50:43 +02:00
Benjamin Valentin
d2e57ac941 tests: call gnrc_ipv6_nib_iface_up() after gnrc_ipv6_nib_init_iface() 2022-09-23 17:17:42 +02:00
Marian Buschsieweke
466af0400d
tests/heap_cmd: fix test script
In c95e8553ef the shell output of the
heap command was changed and no longer matched the expectation of the
test script. This adapts the test to again match the output.
2022-09-23 14:47:31 +02:00
benpicco
4737d8148a
Merge pull request #17702 from benpicco/core/macros/math
core/macros: add math helper macros
2022-09-22 14:14:24 +02:00
Benjamin Valentin
27b3c115d2 tests/unittests: add tests core math macros 2022-09-21 16:00:26 +02:00
Marian Buschsieweke
8cf19e63da
tests/driver_hsc: clean up use of strerror
strerror() now is provided on AVR as well, so no need to be extra
careful in its use.
2022-09-20 15:51:12 +02:00
Martine Lenders
0079b0c52f
event_periodic_callback: remove unnecessary dependency 2022-09-20 09:49:30 +02:00
benpicco
f03f5384c1
Merge pull request #18355 from maribu/sys/shell/cmds
sys/shell: make cmds submodules and add KConfig modeling
2022-09-19 21:07:23 +02:00
Marian Buschsieweke
4b87a300c0
Merge pull request #18598 from benpicco/event_periodic_callback
event_periodic_callback: add convenience wrapper for periodic callbacks
2022-09-19 20:45:52 +02:00
Martine Lenders
d5e63a5e46
Merge pull request #18096 from Teufelchen1/feat/port_parsing
sys/uri_parser: Adding the port as uint16_t
2022-09-19 13:40:53 +02:00
Benjamin Valentin
ba1de182e5 tests/event_periodic_callback: add test for periodic callback 2022-09-17 13:47:35 +02:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
Marian Buschsieweke
c95e8553ef
tests/heap_cmd: fix -Wuse-after-free
Strictly speaking, this is not actually a use after free, as only the
address of the freed memory chunk is printed. The freed memory is not
accesses. However, this is more idiomatic this way.
2022-09-16 13:15:46 +02:00
Marian Buschsieweke
a04b0a01a2
examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
Marian Buschsieweke
c06335b71b
sys/shell: make cmds submodules
Previously `shell_commands` was a "catch-all" module that included
shell commands for each and every used module that has a shell
companion. Instead, the new `shell_cmds` module is now used to provide
shell commands as individually selectable submodules, e.g.
`cmd_gnrc_icmpv6_echo` now provides the ICMPv6 echo command (a.k.a.
ping).

To still have a "catch all" module to pull in shell commands of modules
already used, `shell_cmds_default` was introduced. `shell_commands`
depends now on `shell_cmds_default` for backward compatibility, but
has been deprecated. New apps should use `shell_cmds_default`
instead.

For a handful of shell commands individual selection was already
possible. Those modules now depend on the corresponding `cmd_%` module
and they have been deprecated.
2022-09-16 13:15:45 +02:00
Karl Fessel
da51932737 boards: add some missing whitespaces for static tests 2022-09-14 15:11:14 +02:00
Benjamin Valentin
c5282bb2ad tests/gcoap_fileserver: add integration test for GCoAP fileserver 2022-09-14 13:05:56 +02:00
benpicco
0022e0d3cb
Merge pull request #18585 from maribu/tests/thread_priority_inversion
tests/thread_priority_inversion: improve output for debugging
2022-09-13 13:49:34 +02:00
Marian Buschsieweke
e6cc508d8d
tests/thread_priority_inversion: improve output for debugging 2022-09-12 21:42:29 +02:00
benpicco
b117171fcf
Merge pull request #18519 from benpicco/coap_request_ctx_get_remote
gcoap: add remote sock_udp_ep_t to coap_request_ctx_t
2022-09-12 20:30:19 +02:00
Benjamin Valentin
5070ca98d5 tests: don't directly select gnrc_sock_udp 2022-09-12 17:53:16 +02:00
Marian Buschsieweke
0991702707
tests/vfs_default: increase stack size for AVR
This avoids an stack overflow when using `vfs ls`.
2022-09-11 10:27:40 +02:00
Teufelchen1
df8fe4476d sys/uri_parser: Adding the port as uint16 2022-09-08 11:32:49 +02:00
Gunar Schorcht
a0a0b64f40
Merge pull request #18544 from gschorcht/cpu/esp/improve_thread_safety_of_malloc
cpu/esp: improve thread safety in newlib locking functions
2022-09-05 13:29:03 +02:00
Gunar Schorcht
1ab0b77543 tests/thread_priority_inversion: revert blacklisting ESP32
This reverts commit 2210721d5c.
2022-09-01 15:08:16 +02:00
benpicco
bcdf539c6e
Merge pull request #18541 from maribu/core_dumps
tests/periph_gpio_ll: drop core dump merged by accident
2022-09-01 10:18:29 +02:00
Marian Buschsieweke
754ad23de5
Merge pull request #18539 from miri64/hashes_cmac/cleanup/rename
hashes_cmac: rename to hashes_aes128_cmac
2022-08-31 19:06:21 +02:00
Marian Buschsieweke
089d8aba43
examples,tests: ignore core dumps via .gitignore
This will ignore files named `core` and `core.*` (except `core.c`,
`core.h`, `core.md`, `core.txt`) placed directly in the application
folder. This is where `make` is typically called and core dump due to
a crashing native application, flashing tool, or GDB would be placed.
The pattern is intentionally quite narrow, as there is e.g. a core
source folder that should still be monitored.
2022-08-31 15:05:14 +02:00
benpicco
b024458b43
Merge pull request #18507 from gschorcht/tests/external_board_dirs/add_esp32s2_ci_board
tests/external_boards: add esp32s2-ci board for optional modules
2022-08-31 14:33:55 +02:00
Marian Buschsieweke
f59e1c63e9
tests/periph_gpio_ll: drop core dump merged by accident 2022-08-31 13:16:58 +02:00