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

10781 Commits

Author SHA1 Message Date
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
86e6898fa5 doc/gcoap: Update ToDo item referencing abandoned document 2023-02-21 20:22:46 +01: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
Benjamin Valentin
e2cb3d13ea sys/shell: don't include suit command by default 2023-02-21 17:34:00 +01:00
bors[bot]
be29a00d74
Merge #19278 #19290
19278: gnrc_dhcpv6_client_simple_pd: select upstream based on type/index r=benpicco a=benpicco



19290: sys/crypto: make AES_KEY struct private & rename it 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-02-20 19:09:03 +00:00
Benjamin Valentin
2285961810 sys/crypto: make AES_KEY struct private 2023-02-20 18:22:00 +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]
96a7d0d466
Merge #19142
19142: sock_dtls: move common code into sock_dtls_establish_session() r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-19 22:11:05 +00:00
Benjamin Valentin
df4ef80790 sock_dodtls: make use of sock_dtls_establish_session() 2023-02-19 15:10:46 +01:00
Benjamin Valentin
28289a13cb gnrc_dhcpv6_client_simple_pd: check result of _find_upstream_netif() 2023-02-18 23:59:42 +01:00
bors[bot]
8c2a4b43b3
Merge #19027
19027: sys/fmt: optimize scn_u32_dec scn_u32_hex r=benpicco a=kfessel

### Contribution description

Improves the compilation result for `scn_u32_dec` `scn_u32_hex` especially on `cortex-m` reducing either stack usage and or code size.

This makes use of unsigned int overflow (slightly less better without doing that `hexn`).

See godbolt (original versions got an `o` attached, modified versions got `k`s) all functions are  marked `_S_` defined to `static`

by assigning the global at end the compiled function can be changed (`deco deck  hexo hexk hexkk hexn`)

this PR is `hexkk` and `deck` 

### Testing procedure

run unit-test/test-fmt

```
<RIOT>/tests/unittests$ make tests-fmt
<RIOT>/tests/unittests$ make term
```

### Issues/PRs references

[godbolt](https://godbolt.org/z/MzT1zh4q1)

Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-02-17 20:09:53 +00:00
Karl Fessel
18a783d21c sys/fmt: optimize scn_u32_dec scn_u32_hex 2023-02-17 16:20:19 +01:00
Benjamin Valentin
3173150ef7 gnrc_dhcpv6_client_simple_pd: select upstream based on type/index 2023-02-14 17:45:19 +01:00
bors[bot]
f78c3751b9
Merge #19272
19272: gcoap: Do not send responses from multicast addresses r=benpicco a=chrysn

### Contribution description

Since https://github.com/RIOT-OS/RIOT/pull/18026, CoAP requests to multicast addresses (eg. `ff02::1`) came back from that exact address, which Linux rightfully just drops.

The fix uses the existing multicast check from https://github.com/RIOT-OS/RIOT/pull/17978 (thanks `@benpicco` for making me write this as dedicated function, I just had to generalize it removing one struct layer), and foregoes setting the source address when responding to multicasts.

### Testing procedure

* Run the gcoap example
* Send a CoAP request to a multicast address RIOT listens to, eg. `./aiocoap-client coap://'[ff02::1%tapbr0]'/.well-known/core --non`

Before, this got no response (while you see it arrive on wireshark). After, you get a correct response with two lines of note:

```
WARNING:coap:Sending request to multicast via unicast request method
Response arrived from different address; base URI is coap://[fe80::3c63:beff:fe85:ca96%tapbr0]/.well-known/core
```

(The former is aiocoap telling us that we're not using the nonexistent multicast API so it's really more of an anycast, the latter is useful factual information).

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-14 00:28:46 +00:00
bors[bot]
1c55118bd8
Merge #18257
18257: drivers/wdt: add periph_wdt_auto_start for early watchdog r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-13 21:09:07 +00:00
chrysn
ac3a9cdf83 gcoap: Do not send responses from multicast addresses 2023-02-13 21:46:12 +01:00
chrysn
54037f5c2d gcoap: Alter indirection level of _memo_ep_is_multicast 2023-02-13 20:32:29 +01:00
Benjamin Valentin
80fe4e5f26 sys/auto_init: add auto_init_wdt_{event, thread} modules 2023-02-13 15:06:24 +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
Benjamin Valentin
5134b5c7d5 nanocoap_sock: make use of sock_dtls_establish_session() 2023-02-08 15:57:28 +01:00
Benjamin Valentin
46764727ab sys/net/sock_util: add sock_dtls_establish_session() 2023-02-08 15:57:22 +01:00
c77b104c2d sys/test_utils/print_stack_usage: reduce MIN_SIZE for fmt 2023-02-07 22:42:43 +01:00
f31d5a93b5 sys/fmt: print(): use fflush(); stdio_write() vs. fwrite() 2023-02-07 22:42:43 +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
bors[bot]
fcc07a5248
Merge #19088
19088: boards: add esp32s3-pros3 support r=benpicco a=gschorcht

### Contribution description

This PR provides the support for [ESP32 ProS3](https://esp32s3.com/pros3.html#home) board from Unexpected Maker.

This board doesn't have a USB-to-Serial chip on board. Therefore, USB Serial/JTAG is used for STDIO and the board is flashed via the USB Seral/JTAG interface by default.

### Testing procedure

Flashing `tests/shell` should work.

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-06 15:30:15 +00:00
Benjamin Valentin
d18a304267 sys/coding: add XOR based coding module
This implements the XOR based error-correction code described by
Jürgen Fitschen (@jue89) at the RIOT Summit.

A parity byte is generated for each 3 payload bytes, then the payload array
is transposed by interpreting it as a 2D matrix with height of 3.

This is to reduce the chance of consecutive bytes ending up in the same
packet.

This allows to recover one in 3 lost data packets (if parity packets are received).

[0] https://summit.riot-os.org/2021/wp-content/uploads/sites/16/2021/09/s02-01.pdf
2023-02-06 16:21:57 +01:00
Gunar Schorcht
e3b1c81603 sys/usb_board_reset: allow to enable it also for stdio_usb_serial_jtag
Even if only `stdio_usb_serial_jtag` is enabled as STDIO, `usb_board_reset` is enabled since there should be a CDC ACM interface in any case. This is necessary, for example, to reset the board into bootloader if `stdio_cdc_acm` or `stdio_tinyusb_cdc_acm` was previously used.
2023-02-06 16:19:11 +01:00
bors[bot]
ebc869a83f
Merge #19216
19216: drivers/mtd_sdcard: add mtd_sdcard_default module r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-05 20:30:12 +00:00
bb878f64da
sys/stdio_rtt: move documentation in doc.txt 2023-02-05 15:49:20 +01:00
Benjamin Valentin
4e3151406c sys/vfs_default: make include save with !vfs module
This allows to remove #ifdefs on the board level.
2023-02-04 15:35:05 +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]
247b8d0a47
Merge #19235 #19236 #19237 #19238
19235: pkg/nimble/autoadv: fix flag comparisons r=benpicco a=kaspar030



19236: sys/vfs: vfs.c missing includes r=benpicco a=kaspar030



19237: sys/net/crosslayer/inet_csum: add missing "modules.h" include r=benpicco a=kaspar030



19238: sys/net/grnc/netreg: avoid creating an infinite loop r=benpicco a=benpicco



Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-02 17:52:10 +00:00
Benjamin Valentin
b7a5261508 sys/net/grnc/netreg: avoid creating an infinite loop 2023-02-02 17:56:19 +01:00
1db6c4a9de sys/net/crosslayer/inet_csum: add missing "modules.h" include 2023-02-02 16:37:21 +01:00
177b50dfc2 sys/vfs: vfs.c: add missing "container.h" include 2023-02-02 16:34:28 +01:00
47a610e732 sys/vfs: vfs.c: add missing modules.h include 2023-02-02 16:34:28 +01:00
bors[bot]
a9dbf8bc36
Merge #19055 #19188 #19225
19055: shell/gnrc_icmpv6_echo: acquire ZTIMER_USEC clock for time measurement r=benpicco a=jue89



19188: cpu/gd32v: add periph_adc support r=benpicco a=gschorcht

### Contribution description

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

This PR depends on PR #19170 and includes this PR to be compilable since includes the ADC configuration also for Sipeed Longan Nano board.

### Testing procedure

`tests/periph_adc` should work on any GD32VF103 board.

### Issues/PRs references

Depends on PR #19170 

19225: sys/net/dhcpv6: include IA Prefix Option in SOLICIT r=benpicco a=benpicco





Co-authored-by: Jue <me@jue.yt>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-02 00:04:14 +00:00
Benjamin Valentin
0a453ae679 sys/net/dhcpv6: let dhcpv6_client_req_ia_pd() return error 2023-02-01 23:25:22 +01:00
Benjamin Valentin
54fe031705 sys/net/dhcpv6: add IA Prefix Option in SOLICIT
Add the IA Prefix Option when soliciting a prefix so we can tell the
server what prefix length we want.
2023-02-01 23:25:22 +01:00
Gunar Schorcht
e7d0fbbc71 sys/net/gnrc/netif: add tinyUSB netdev to auto_init 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
2a960f95ba test_utils/print_stack_usage: use thread.h API 2023-01-31 15:48:32 +01:00
Benjamin Valentin
349b8b8367 shell/rtc: use rtc_tm_normalize() to sanitize input 2023-01-29 22:28:45 +01:00
bors[bot]
c6c84cccc9
Merge #19199 #19205 #19207
19199: sys/suit: Ensure previous thread is stopped before reusing its stack r=benpicco a=chrysn

### Contribution description

Closes: https://github.com/RIOT-OS/RIOT/issues/19195

If the thread has released the mutex but the thread has not terminated (which happens in the situation that would previously have overwritten a still active thread's state), then a warning is shown and the trigger is ignored.

### Testing procedure

This should work before and after:

* `make -C examples/suit_update BOARD=native all term`
* `aiocoap-client coap://'[fe80::3c63:beff:fe85:ca96%tapbr0]'/suit/trigger -m POST --payload 'coap://[2001:db8::]/foo'`
* In parallel, on the RIOT shell, run `suit fetch coap://[2001:db8::]/foo`
* After the first download fails, the second one starts right away ("suit_worker: update failed, hdr invalid" / "suit_worker: started").

Run again with the worker thread on low priority:

```patch
diff --git a/sys/suit/transport/worker.c b/sys/suit/transport/worker.c
index a54022fb28..e26701a64c 100644
--- a/sys/suit/transport/worker.c
+++ b/sys/suit/transport/worker.c
`@@` -70 +70 `@@`
-#define SUIT_COAP_WORKER_PRIO THREAD_PRIORITY_MAIN - 1
+#define SUIT_COAP_WORKER_PRIO THREAD_PRIORITY_MAIN + 1
```

Before, this runs the download once silently (no clue why it doesn't run it twice, but then again, I claim there's concurrent memory access from two thread, so who knows what happens). After, it runs a single download and shows an error message for the second one once the first is complete ("Ignoring SUIT trigger: worker is still busy.").

### Issues/PRs references

This may be made incrementally easier by https://github.com/RIOT-OS/RIOT/pull/19197 -- that PR as it is now would spare us the zombification (because returning would do that), and having a `wait` function would allow us to turn the new error case into a success.

19205: boards/common: add common timer config for GD32VF103 boards r=benpicco a=benpicco



19207: examples/gnrc_border_router: static: use router from advertisements by default r=benpicco a=benpicco




Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-01-27 21:01:39 +00:00
Benjamin Valentin
ff52d35584 gnrc_ipv6_nib: use static DNS server from auto_init_sock_dns if present 2023-01-27 19:15:13 +01:00
Benjamin Valentin
acf2074369 examples/gnrc_border_router: static: use router from advertisements by default 2023-01-27 18:01:00 +01:00
chrysn
2c716d3ede sys/suit: Ensure previous thread is stopped before reusing its stack
Closes: https://github.com/RIOT-OS/RIOT/issues/19195
2023-01-25 18:04:28 +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
bors[bot]
7157ff3ffc
Merge #19178 #19186
19178: nanocoap_sock: store message ID in nanocoap_sock_t r=benpicco a=benpicco



19186: cpu/gd32v: add periph_rtc support r=benpicco a=gschorcht

### Contribution description

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

### Testing procedure

`tests/periph_rtc` should work and should give the following output:
```
Help: Press s to start test, r to print it is ready
START
main(): This is RIOT! (Version: 2023.04-devel-144-gc17695-cpu/gd32v/periph_rtc)

RIOT RTC low-level driver test
This test will display 'Alarm!' every 2 seconds for 4 times
  Setting clock to   2020-02-28 23:59:57
Clock value is now   2020-02-28 23:59:57
  Setting alarm to   2020-02-28 23:59:59
   Alarm is set to   2020-02-28 23:59:59
  Alarm cleared at   2020-02-28 23:59:57
       No alarm at   2020-02-28 23:59:59
  Setting alarm to   2020-02-29 00:00:01

Alarm!
Alarm!
Alarm!
Alarm!
```

### Issues/PRs references


Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-23 01:25:37 +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
Martine Lenders
914ca26bc7
gnrc_sixlowpan_frag_sfr_congure_sfr: initial import 2023-01-20 08:25:11 +01:00
Benjamin Valentin
d041a5fb1a nanocoap_sock: store message ID in nanocoap_sock_t 2023-01-20 01:50:10 +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
bors[bot]
71f783f1c8
Merge #19156 #19174
19156: core/compiler_hints: add likely() / unlikely() hints r=kfessel a=benpicco



19174: tests/periph_spi clearly say when init succeeds r=benpicco a=jdavid

When the `tests/periph_spi` program succeeds the output can be interpreted as an error happened.
This PR makes it clearer when it does succeed.

### Contribution description

In `tests/periph_spi`:

- Explicitely say that the init operation was successful
- Rephrase the note to avoid misinterpretations 


### Testing procedure

Run the `tests/periph_spi` program.
There is not much to test, just to verify the output, should be like this:

```
2023-01-19 10:42:33,768 # Trying to initialize SPI_DEV(1): mode: 0, clk: 0, cs_port: 0, cs_pin: 0
2023-01-19 10:42:33,777 # (if below the program crashes with a failed assertion, then it means the configuration is not supported)
2023-01-19 10:42:33,779 # Success.
```


### Issues/PRs references

Issue https://github.com/RIOT-OS/RIOT/issues/19025

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: J. David Ibáñez <jdavid.ibp@gmail.com>
2023-01-19 15:38:47 +00:00
Jose Alamos
fc0e59cac3
ieee802154/submac/Kconfig: select ZTIMER 2023-01-19 15:34:20 +01:00
Jose Alamos
f897e4586b
sys/test_utils/netdev_ieee802154_minimal: model in Kconfig 2023-01-19 15:34:18 +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
49646e1dc3 sys/event: add event sources
This adds an event bus where multiple events can be triggered at once.
2023-01-19 13:05:15 +01:00
Benjamin Valentin
b6de4d1ce7 shell/gnrc_icmpv6_echo: make use of gnrc_icmpv6_echo helper functions 2023-01-18 14:47:24 +01:00
Benjamin Valentin
f6c1ab35a3 gnrc_icmpv6_echo: implement gnrc_icmpv6_echo_{send, req_handle}() 2023-01-18 14:47:24 +01:00
Benjamin Valentin
d59819e641 sys/test_utils: mark expect() condition as likely true 2023-01-18 01:17:31 +01:00
bors[bot]
1c7300bb41
Merge #19157
19157: sys/shell_lock: do not call strlen, less jumpy r=benpicco a=kfessel

### Contribution description

the current `_safe_strcmp` depends on not being optimized and not being inlined (implicitly given by the -O0), this new one does less (would say not since even O3 had compile results that should not return early or show different runtimes for different secrets).

the runtime of strlen depend on the length of the string (password) therefor it is removed. `ifs` are very jumpy and depend on the contend of password, this avoids `ifs` sadly clang still compiles some boolean statements to if.  

with this PR the `__attribute__((optimize("O0")))` should be removable. 

### Testing procedure

see https://godbolt.org/z/x35b85cEx
and run the `<RIOT>/tests/shell_lock` 

### Issues/PRs references
#19155 made me aware of this function 

Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-01-17 16:15:45 +00:00
Jose Alamos
dacc4ff124
ieee802154/radio: fix blocking cca function 2023-01-17 11:30:59 +01:00
bors[bot]
d6f44f6206
Merge #18414
18414: gcoap/fileserver: add event callbacks r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-01-16 22:23:46 +00:00
Karl Fessel
8f167ba140 sys/shell_lock: do not call strlen, less jumpy 2023-01-16 21:11:58 +01:00
bors[bot]
211db05401
Merge #18477 #19101 #19155
18477: gnrc_static: add static network configuration r=miri64 a=benpicco



19101: CI: update check-labels-action r=miri64 a=kaspar030



19155: Revert "sys/pm_layered: pm_(un)block add attribute optimize(3)" r=maribu a=Teufelchen1

Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath"

This reverts commit 5447203921.

### Contribution description

Compiling `examples/gnrc_networking_mac` using `TOOLCHAIN=llvm` yields the following error:
```
RIOT/sys/pm_layered/pm.c:77:16: error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes]
__attribute__((optimize(3)))
```
As indicated, this is because the attribute `optimize` is GCC only and not present in LLVM.
Compare the manpages of [GCC](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html) and [LLVM](https://clang.llvm.org/docs/AttributeReference.html).


### Testing procedure

Since this should only affect performance and not behavior, no special testing is needed. I am not aware of any tests in RIOT which could verify that assumption.

### Issues/PRs references

Introduced in #18846

There is another instance of this attribute being used in[ shell_lock.c](6fb340d654/sys/shell_lock/shell_lock.c (L80)). Since the usage is security related, I omit it from this PR.


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
2023-01-16 14:03:15 +00:00
Teufelchen1
571026d394 Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath"
This reverts commit 5447203921.
2023-01-16 11:28:30 +01:00
Benjamin Valentin
47295cc929 gcoap/fileserver: add event callbacks 2023-01-16 10:25:00 +01:00
bors[bot]
6fb340d654
Merge #19057 #19151
19057: fuzzing: Add uri_parser setup r=benpicco a=Teufelchen1

Hello!

### Contribution description

This PR is a replacement for PR #18802

In this contribution:

* The variable `AFL_FLAGS` is renamed to `FLAGS_FOR_AFL` because AFL is always complaining that `AFL_FLAGS` is not a valid env var for it. While this is not a bug nor an issue, I found it to be annoying.
*  A generic input reader is added to simplify building a test harness
*  The usage of this reader is demonstrated by adding a harness for fuzzing the uri_parser


(needs squashing after review)

### Testing procedure

Go to `fuzzing/uri_parser` and run `make all-asan` and `make fuzz` to get some action going.
Also mildly interesting: `./dist/tools/compile_test/compile_like_murdock.py -b native -a fuzzing/uri_parser`

### Issues/PRs references

The original PR #18802 is replaced because the generic input reader is present in both PRs but this PoC harness is much simpler.


19151: examples/gcoap: Fix shell parameter validation r=benpicco a=maribu

### Contribution description

Executing the shell command with an URI-Path that doesn't start with a slash results in an assertion error while composing the client side message. This is suboptimal user experience, so add an explicit check for a valid URI-Path and a dedicated error message.

### Testing procedure

#### In `master`

```
 $ make BOARD=microbit-v2 -C examples/gcoap flash term
[...]
2023-01-15 22:23:32,512 #  coap get [::1] /.well-known/core
2023-01-15 22:23:32,516 # gcoap_cli: sending msg ID 52272, 23 bytes
2023-01-15 22:23:32,520 # gcoap: response Success, code 2.05, 46 bytes
2023-01-15 22:23:32,524 # </cli/stats>;ct=0;rt="count";obs,</riot/board>
> coap get [::1] foo
2023-01-15 22:23:34,763 # coap get [::1] foo
2023-01-15 22:23:34,763 # 2329
2023-01-15 22:23:34,765 # *** RIOT kernel panic:
2023-01-15 22:23:34,767 # FAILED ASSERTION.
2023-01-15 22:23:34,767 # 
2023-01-15 22:23:34,775 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2023-01-15 22:23:34,784 # 	 - | isr_stack            | -        - |   - |    512 (  200) (  312) | 0x20000000 | 0x200001c8
2023-01-15 22:23:34,793 # 	 1 | main                 | running  Q |   7 |   1536 ( 1072) (  464) | 0x200006c0 | 0x2000095c 
2023-01-15 22:23:34,802 # 	 2 | 6lo                  | bl rx    _ |   3 |   1024 (  328) (  696) | 0x200036c0 | 0x200039c4 
2023-01-15 22:23:34,810 # 	 3 | ipv6                 | bl rx    _ |   4 |   1024 (  460) (  564) | 0x20001294 | 0x20001574 
2023-01-15 22:23:34,819 # 	 4 | udp                  | bl rx    _ |   5 |    512 (  300) (  212) | 0x20003e98 | 0x20003f9c 
2023-01-15 22:23:34,828 # 	 5 | coap                 | bl anyfl _ |   6 |   1112 (  704) (  408) | 0x20000e38 | 0x200011c4 
2023-01-15 22:23:34,837 # 	 6 | nrf802154            | bl anyfl _ |   2 |    896 (  288) (  608) | 0x20001a90 | 0x20001d54 
2023-01-15 22:23:34,843 # 	   | SUM                  |            |     |   6616 ( 3352) ( 3264)
2023-01-15 22:23:34,843 # 
2023-01-15 22:23:34,844 # *** halted.
2023-01-15 22:23:34,844 # 
```

#### This PR

```
 $ make BOARD=microbit-v2 -C examples/gcoap flash term
[...]
make: Entering directory '/home/maribu/Repos/software/RIOT/examples/gcoap'
/home/maribu/Repos/software/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
2023-01-15 22:22:27,842 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
coap get [::1] /.well-known/core
2023-01-15 22:22:40,042 #  coap get [::1] /.well-known/core
2023-01-15 22:22:40,046 # gcoap_cli: sending msg ID 25182, 23 bytes
2023-01-15 22:22:40,050 # gcoap: response Success, code 2.05, 46 bytes
2023-01-15 22:22:40,054 # </cli/stats>;ct=0;rt="count";obs,</riot/board>
> coap get [::1] foo
2023-01-15 22:22:43,858 # coap get [::1] foo
2023-01-15 22:22:43,862 # ERROR: URI-Path must start with a "/"
2023-01-15 22:22:43,866 # usage: coap <get|post|put|ping|proxy|info>
```

### Issues/PRs references

None

Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-16 02:34:21 +00:00
bors[bot]
9ff9704fe5
Merge #19010 #19149
19010: bootloaders/riotboot: add tinyUSB DFU support r=benpicco a=gschorcht

### Contribution description

This PR provides
- the tinyUSB DFU and DFU Runtime support and
- the `riotboot_tinyusb_dfu` bootloader that uses the tinyUSB DFU mode to flash new application images.

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

### Testing procedure

1. Use any board that supports the `riotboot´ and `tinyusb_device` features and flash the bootloader first, for example
   ```
   BOARD=nucleo-f767zi make -C bootloaders/riotboot_tinyusb_dfu flash
   ```
   and check that the `riotboot_tinyusb_dfu` bootloader is in DFU mode:
   ```
   dfu-util --list
   ```
3. Flash a first application using the following command:
    ```
   FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
   make -C tests/saul PROGRAMMER=dfu-util riotboot/flash-slot0
   ```
   and check that the application starts and is seen as upgradable:
   ```
   dfu-util --list
   ```
4. Restart the node in bootloader DFU mode by:
   ```
   dfu-util -e
   ```
   Flash a second application, for example
   ```
   FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
   make -C tests/shell PROGRAMMER=dfu-util riotboot/flash-slot1
   ```
   and check that the second application starts and is seen as upgradable:
   ```
   dfu-util --list
   ```
   
### Issues/PRs references

~Depends on PR #18983~

19149: SECURITY: Describe that declassification is an option r=benpicco a=chrysn

### Contribution description

Our security policy does not contain provisions for the case when what is reported is not what we consider an actual security issue. As it is described now, everything reported through security@ would go through the full treatment, including a point release.

I'm not sure it belongs into the text itself (as it's more about how security reporters interact with the project than internals), but declassification should IMO be backed at least by 3 maintainers, and no strong NACK.

### Issues/PRs references

#19141 followed that procedure after some chat on it on the maintainers channel. (In the discussion, I proposed declassification, with 2.5 people supporting it and one "I was about to, but can we be sure nobody is using it?" voice).

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: chrysn <chrysn@fsfe.org>
2023-01-15 23:31:00 +00: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
Gunar Schorcht
fe0bea73b2 sys: add tinyusb_dfu and riotboot_tinyusb_dfu to makefiles 2023-01-15 18:09:55 +01:00
Gunar Schorcht
152213692b sys/riotboot: add tinyUSB DFU support 2023-01-15 18:09:55 +01: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]
d89379eca6
Merge #19141
19141: shell/rtc: Fix out of bounds access; document error behavior r=maribu a=chrysn

### Contribution description



### Testing procedure

Should be trivial enough, especially as the difference is hard to spot interactively.

On native, run the default example (and wait for the traffic to settle).

Then, run

```
> rtc poweron
> rtc settime 2022-01-01 00:00:00
> rtc settime 2022-99-01 00:00:00
```

Both still work, but the latter doesn't access unassigned memory any more

### Issues/PRs references

This fixes an issue that was submitted anonymously.

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-01-13 17:40:16 +00:00
chrysn
cd62aea0ac shell/rtc: Fix out of bounds access; document error behavior 2023-01-13 16:14:48 +01:00
bors[bot]
fb603f2660
Merge #18459 #18724 #19081 #19082 #19136
18459: makefiles/suit: make it possible to accept multiple SUIT keys r=miri64 a=benpicco



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



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



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



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



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-13 13:50:55 +00:00
Jens Wetterich
a9c5987fa3
core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
Benjamin Valentin
81625fd5f2 doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
Benjamin Valentin
6d3562bd0d sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
Benjamin Valentin
4f576285bb sys/suit: accept coaps:// URLs 2023-01-13 00:17:33 +01:00
Benjamin Valentin
d660e3ebbd nanocoap_sock: implement DTLS socket 2023-01-13 00:17:32 +01:00
Benjamin Valentin
ad5b27df8e nanocoap_sock: make nanocoap_sock_t a proper struct 2023-01-13 00:08:55 +01:00
Benjamin Valentin
94f9f11596 ztimer: introduce ztimer_mutex_unlock_after() 2023-01-13 00:08:55 +01:00
Marian Buschsieweke
8ec277c9eb
sys/tiny_strerror: add missing error codes
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.
2023-01-12 08:39:30 +01:00
bors[bot]
385569c7bf
Merge #17810 #18348 #19120
17810: drivers/slipdev: implement sleep states r=benpicco a=benpicco



18348: sys/net/gnrc/pktbuf_static: make use of alignas() r=maribu a=maribu

### Contribution description

Since we are now using C11, we can make use of `alignas()` provided by `<stdalign.h>` to make the alignment code easier to read.

### Testing procedure

I didn't expect this to change binaries, but is safes 4 bytes. `elf_diff` shows that the compiler (at least GCC 11.3.0) was not able to detect that `gnrc_pktbuf_static_buf` was just an alias for `_pktbuf_buf`. That makes sense since it would be hard without LTO to rule out external writes to `gnrc_pktbuf_static_buf`, unless one would have added a `const` (to the pointer, not to the data the pointer points to).

The [output of `elf_diff`](https://mari-bu.de/pr_18348_gnrc_pktbuf_static_elf_diff.html) looks otherwise quite unscary.

Also:

```
$ make BOARD=nucleo-f767zi -C tests/unittests/ tests-pktbuf flash test
make: Entering directory '/home/maribu/Repos/software/RIOT/tests/unittests'
Building application "tests_unittests" for "nucleo-f767zi" with MCU "stm32".
[...]
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
.............................................
OK (45 tests)

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

### Issues/PRs references

None

19120: CI: seperate check-labels and check-commits workflows r=maribu a=kaspar030



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-10 15:44:57 +00: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
ccc3c936c4 sys/ztimer: ztimer_mock: guard ztimer_ondemand static functions 2023-01-10 09:11:17 +01:00
bors[bot]
e2538a898a
Merge #19076
19076: boards/hip-badge: add HiP Badge board definition r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-01-09 13:33:40 +00:00
Benjamin Valentin
64a2fbcebd gnrc_ipv6_nib: clean up _resolve_addr() 2023-01-09 14:04:47 +01:00
Benjamin Valentin
55b5c47bc8 cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
Benjamin Valentin
59f067171f core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01: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
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
bors[bot]
4f1bb12720
Merge #18752 #19100 #19104
18752: nanocoap_sock: deprecate nanocoap_get() r=benpicco a=benpicco





19100: cpu/esp_common: allow configuration of UART0 r=benpicco a=gschorcht

### Contribution description

This PR
- fixes the issue for ESP32 SoCs that UART0 signals can't be routed to arbitrary GPIOs and
- allows the configuration of the UART device used by the bootloader.

The UART interface and its configuration used by the STDIO are defined in RIOT using the define `STDIO_UART_DEV` and the configuration of the corresponding UART device in `periph_conf.h`. 

However, the bootloader compiled directly in ESP-IDF uses its own definitions `CONFIG_ESP_CONSOLE_UART_*` for the UART configuration. To be able to use a consistent UART configuration in RIOT and the bootloader, e.g. to see the output of the 2nd stage bootloader, these `CONFIG_ESP_CONSOLE_UART_*` can be defined via a set of KConfig variables in RIOT (not yet implemented in Kconfig):
- `CONSOLE_CONFIG_UART_NUM` defines the UART device to be used by the bootloader and by `STDIO_UART_DEV`
- `CONSOLE_CONFIG_UART_RX` and `CONSOLE_CONFIG_UART_TX` define the GPIOs to be used by the bootloader and should be the GPIOs as defined in `periph_conf.h` for the corresponding UART device.

### Testing procedure

Any ESP32 node should still work with `stdio_uart` and the default configuration. To test an alternative configuration, use
```
CFLAGS='-DUART1_TXD=5 -DUART1_RXD=4 -DCONFIG_CONSOLE_UART_NUM=1 -DCONFIG_CONSOLE_UART_TX=5 -DCONFIG_CONSOLE_UART_RX=4' USEMODULE=esp_log_startup BOARD=esp32-wroom-32 make -C tests/shell flash
```
The bootloader output and the STDIO should be routed to UART1 at GPIO4 and GPIO5.

### Issues/PRs references

Prerequisite for PR ##18863

19104: tests/periph_uart: only exclude STDIO_UART_DEV if stdio_uart is used r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-06 21:15:36 +00:00
bors[bot]
6cf2116ae8
Merge #18773
18773: nanocoap_sock: fix handling empty ACKs with separate response r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-06 01:07:57 +00: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
c0d027156a pkg/tinyusb: board reset feature moved
The board reset function can be used on any CDC ACM interface. It is not necessary that the tinyUSB CDC ACM STDIO is used. Therefore, the board reset function is now a feature of the CDC ACM interface that don't require any other functionality.
2023-01-03 10:05:54 +01:00
Gunar Schorcht
cdbc9e01e7 sys/usb_board_reset: add dummy reset in bootloader function
Definition of a function as weak symbol for reset in bootloader which prints an error message if no real implementation is compiled in and
the module `riotboot_reset` is not used. This is required if the module `usb_board_reset` is used to restart the board with an application via an USB CDC ACM interface, but the board's bootloader does not support a reset in the bootloader.
2023-01-03 10:05:54 +01:00
bors[bot]
ca3b259add
Merge #18637
18637: Fido2 follow up r=benpicco a=Ollrogge



Co-authored-by: Ollrogge <nils-ollrogge@outlook.de>
2022-12-19 18:02:20 +00:00
Teufelchen1
82f44c5b1f fuzzing: Add uri_parser fuzzer setup 2022-12-19 13:03:45 +01:00
Teufelchen1
5c51686178 fuzzing: Add generic input reader 2022-12-15 15:13:18 +01:00
bors[bot]
2ea6a2af1e
Merge #19053
19053: net/ieee802154: make default ack request configurable r=jia200x a=jue89



Co-authored-by: Jue <me@jue.yt>
2022-12-15 10:15:31 +00:00
bors[bot]
481ab25e69
Merge #19054
19054: ieee802154_submac: migrate to ztimer r=benpicco a=jue89



Co-authored-by: Jue <me@jue.yt>
2022-12-14 19:09:53 +00:00
bors[bot]
10c1909f2d
Merge #19046
19046: gnrc & coap: misc minor changes r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2022-12-14 17:18:05 +00:00
Jue
da41955761 shell/gnrc_icmpv6_echo: acquire ZTIMER_USEC clock for time measurement 2022-12-14 17:15:50 +01:00
Jue
8f174bbef2 ieee802154_submac: migrate to ztimer 2022-12-14 16:41:27 +01:00
Jue
6ff38347b3 net/ieee802154: add option for default ack request 2022-12-14 16:29:01 +01:00
Benjamin Valentin
b2c5c16a08 sys/bitfield: don't use ambiguous 'size of the bitfield'
It's otherwise unclear if those are bits or bytes.
2022-12-13 13:09:31 +01:00
Benjamin Valentin
7ed0f7355f sys/bitfield: add bf_clear_all() 2022-12-13 13:09:31 +01:00
Benjamin Valentin
9b09f673fd sys/bitfield: add atomic variants of write functions 2022-12-13 00:32:01 +01:00
Benjamin Valentin
1a4c21fb97 nanocoap: turn coap_szx2size() into a macro 2022-12-13 00:27:45 +01:00
Benjamin Valentin
2002e169dd net/coap: add COAP_CODE_TOO_MANY_REQUESTS 2022-12-13 00:27:45 +01:00
Benjamin Valentin
ba857582a3 gnrc_netif: constify group parameter 2022-12-13 00:24:44 +01:00
Benjamin Valentin
f06c76348a sys/shell: ncget: make use of nanocoap_link_format_get() 2022-12-11 23:40:03 +01:00
Benjamin Valentin
7b7c63b638 nanocoap_link_format: add helper function to parse link format 2022-12-11 23:39:47 +01:00
Benjamin Valentin
249901bc96 gnrc_static: add static network configuration 2022-12-11 23:34:09 +01:00
Benjamin Valentin
15c8ad2e8e sys/net/ipv6: add ipv6_prefix_from_str() 2022-12-11 23:34:09 +01:00
Gunar Schorcht
5f0d9ff3a6 sys/usb/ubsus/cdc/acm: move board reset function
The  board reset function `usb_board_reset_coding_cb` can be used on any CDC ACM interface. It is not necessary that the highlevel STDIO is used. Therefore, the call of the board reset function `usb_board_reset_coding_cb` has been moved from the USBUS STDIO CDC ACM implementation to USBUS CDC ACM implementation and is thus a feature of the USBUS CDC ACM interface that don't require any other functionality.
2022-12-11 11:17:15 +01:00
Joshua DeWeese
86d751d4d3 sys/analog_util/dac_util: fix truncation bug
In `dac_util_map(...)` the expression `((value - min) * UINT16_MAX)` was
cast to a 16 bit unsigned, then divided by `(max - min)`. This means
that anytime `(value - min) != 0` the numerator was truncated prior to
being divided and then returned.

This patch modifies the expression so that the downcast to 16 bits is
performed as the last operation.
2022-12-09 13:58:12 -05:00
Benjamin Valentin
5986d8f371 sys/dns: select appropriate address family if AF_UNSPEC 2022-12-07 22:26:51 +01:00
Marian Buschsieweke
eea954cc22
Merge pull request #18995 from kfessel/p-cleanup-pufsram
sys/puf_sram: cleanup header
2022-12-07 20:39:17 +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
benpicco
b0da17b4ef
Merge pull request #19007 from gschorcht/pkg/tinyusb_stdio_kconfig
pkg/tinyusb: add Kconfig support for stdio_tinyusb_cdc_acm
2022-12-06 17:16:09 +01:00
Karl Fessel
4753ae382c sys/puf_sram: cleanup header 2022-12-05 16:13:21 +01:00
Teufelchen1
cc6327bf1b sys/uri_parser: fixing potential out of bounds read when consuming ports 2022-12-05 15:41:33 +01:00
Gunar Schorcht
d390b6c7f6 sys/usb_board_reset: add stdio_tinyusb_cdc_acm support 2022-12-04 16:56:19 +01:00
Gunar Schorcht
93215df868 sys/usb/usbus: enable USBUS stdio_cdc_acm only if tinyUSB is not used 2022-12-03 12:52:45 +01:00
Gunar Schorcht
1d9e2cc4f6 sys/riotboot: use BTN0_MODE for default value of BTN_BOOTLOADER_INVERTED 2022-11-30 19:28:14 +01:00
Gunar Schorcht
09e94b3e15 sys/usb/usbus/dfu: check min sector size for STM32 F2/F4/F7
STM32F2/4/7 MCUs use sectors instead of pages, where the minimum sector size is defined by FLASHPAGE_MIN_SECTOR_SIZE, which is 16KB or 32KB (the first sector) depending on the CPU_MODEL. In this case SLOT0_OFFSET must be a multiple of the minimum sector size to cover a whole sector.
2022-11-30 19:28:14 +01:00
benpicco
e18bc193fc
Merge pull request #18551 from benpicco/suit_worker_cleanup
suit: start worker thread on demand, make suit_handle_url() public
2022-11-30 11:42:25 +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
benpicco
1a73fb0593
Merge pull request #18795 from benpicco/irq-track
debug_irq_disable: add module to debug time spent in irq_disable
2022-11-25 19:10:10 +01:00
Benjamin Valentin
59a3e613fe cpu/cortexm_common: measure time spent with IRQ disabled 2022-11-24 21:27:20 +01:00
Benjamin Valentin
8145c42955 debug_irq_disable: add module to debug time spent in irq_disable 2022-11-24 21:27:20 +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
Marian Buschsieweke
747ee9d56f
sys/net/grnc/netreg: avoid freeing wild pointers
When freeing any stale pktsnips from stale messages in the mbox, make
sure that the messages actually contains a pktsnip before freeing.
2022-11-22 17:57:44 +01:00
Karl Fessel
d301de4365 shell/cmds: add missing includes for ARRAY_SIZE 2022-11-22 13:39:35 +01:00
Karl Fessel
af8589059e sys/includes: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
Karl Fessel
dd9c3ba362 includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
Karl Fessel
b70d6c7fd7 gnrc/include: replace kernel_defines.h 2022-11-22 13:39:35 +01:00
Karl Fessel
768451bf09 sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
Benjamin Valentin
8a11ca2f87 nanocoap: don't hide coap_request_ctx_t content 2022-11-22 10:41:32 +01:00
Jue
2b53f35a28 ztimer: warn users when calling ztimer_now() on inactive clocks 2022-11-22 00:25:34 +01:00
Jue
96b7988511 ztimer/periodic: acquire resp. release used ztimer clock 2022-11-22 00:25:34 +01:00
Jue
bf5dd34deb ztimer/overhead: acquire and release clocks
The start/stop overhead that might by introduced by ztimer_acquire() and ztimer_release() called during ztimer_set() resp. ztimer_handler() should not be mesured here. It has its own adjustment field.

Furthermore, the overhead mesaurement uses ztimer_now(). It is allowed to called it only after the clock has been acquired.
2022-11-22 00:25:34 +01:00
Juergen Fitschen
88a9f4b8f9 ztimer: add on_demand_strict
Enforce ztimer_clock_t to be active (i.e. clock->users > 0) before ztimer_now() can be called.
2022-11-22 00:25:34 +01:00
Juergen Fitschen
a1ee7a5e05 ztimer/periph_rtt: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Juergen Fitschen
d22e078118 ztimer/periph_rtc: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Jue
5818e5e452 ztimer/periph_timer: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Juergen Fitschen
90b2f3158c ztimer/convert: pass-thru start/stop ops to lower timer 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
Benjamin Valentin
2e2414cef6 gnrc_ipv6_nib: factor out enqueue on resolve 2022-11-20 21:00:40 +01:00
Benjamin Valentin
0886ad4840 gnrc_ipv6_nib: factor out resolve from nc 2022-11-20 20:46:31 +01:00
Martine Lenders
2a0dad0982
Merge pull request #18936 from benpicco/RIOT_FILE_RELATIVE-purge
treewide: replace RIOT_FILE_RELATIVE with __FILE__
2022-11-19 19:37:30 +01:00
Martine Lenders
3e689237a0
Merge pull request #18931 from benpicco/ping6-purge
sys/shell: drop ping6 alias
2022-11-19 14:51:14 +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
Benjamin Valentin
7e91d91cea gnrc_tcp: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
Benjamin Valentin
74a8911597 sys/embUnit: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
Benjamin Valentin
7bc115e326 sys/test_utils: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
Marian Buschsieweke
e92a7164e3
sys/hash/pbkdf2: Accept passwd as void * instead of uint8_t *
Having to cast a password provided as `const char *` to
`const uint8_t *` is a needless pain in the ass when using the API.
Hence, fix it by accepting passwords and salts as `const void *`
instead.
2022-11-18 13:51:32 +01:00
Benjamin Valentin
b5339c61ce sys/shell: drop ping6 alias
We don't need two names for the same command, ping is enough.
2022-11-18 12:54:12 +01:00
Marian Buschsieweke
f60141a5be
Merge pull request #18917 from maribu/sys/test_utils/print_stack_usage
sys/print_stack_usage: update MIN_SIZE
2022-11-17 13:45:08 +01:00
Marian Buschsieweke
095217516e
Merge pull request #18912 from maribu/sys/malloc_tracing
sys/malloc_tracing: add module to trace dyn memory management
2022-11-17 13:36:47 +01:00
Benjamin Valentin
95e654f232 sys/fmt: add print_bytes_hex() 2022-11-15 22:05:42 +01:00
Marian Buschsieweke
5b86848d77
sys/print_stack_usage: update MIN_SIZE
Since fmt no longer has a significant advantage in stack consumption,
we need to bump the `MIN_SIZE` guard that prevents causing stack
overflows due to the printing of the stack consumption.
2022-11-15 21:41:58 +01:00
Benjamin Valentin
442644ba93 gnrc_sock_udp: style fix in sock_udp_recv_buf_aux() 2022-11-15 20:35:20 +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
Marian Buschsieweke
7ce641f110
sys/malloc_tracing: add module to trace dyn memory management
Hooking into the existing wrappers for `malloc()`, `calloc()`,
`realloc()`, and `free()`, the new (pseudo) module `malloc_tracing`
prints out the calls to the given functions, the program counter of
the caller, as well as the return result.

The intent is to aid debugging double-frees, invalid frees, or memory
leaks.
2022-11-15 12:59:46 +01:00
Benjamin Valentin
2b92e9ec59 gnrc_sock_udp: accept response from any address if remote is multicast 2022-11-15 11:26:31 +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
4166e044b3
Merge pull request #18874 from maribu/sys/net/gnrc/pkt
sys/net/gnrc/pkt: fix gnrc_pkt_delete()
2022-11-11 09:21:25 +01:00
Benjamin Valentin
4dd0594d09 sys/bitfield: add bf_popcnt() 2022-11-10 23:44:50 +01:00
Ollrogge
0f9577df60 usbus/hid: fix buffer overflow in hid_io 2022-11-10 20:33:29 +01:00
Marian Buschsieweke
0d5bde0ce2
sys/net/gnrc/pkt: fix gnrc_pkt_delete()
The previous implementation used creative construct for impedance
mismatching between the core list API (which returns a ptr to the
removed element if found) and the GNRC pkt list API (which returns a
ptr to the new list head) that creates a temporary list head on the
stack.

I'm not entirely sure if the previous implementation is containing
undefined behavior that is used against us with GCC >= 12.x, or if this
is a compiler bug. In either case, not reusing the core list API here
and just having a textbook linked list delete function here is not much
less readable and fixes the issue for our users.
2022-11-10 17:25:34 +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
5685718bcf sys/usb: enable common USB Kconfig for tinyUSB 2022-11-09 06:57:55 +01:00
Karl Fessel
c354ab6285
Merge pull request #18846 from kfessel/p-pm-layerd-speedup1
sys/pm_layered: align pm_blocker_t for speed
2022-11-08 10:50:16 +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
5a3045117e gnrc_sock_udp: make 'remote match' condition more readable 2022-11-07 16:35:57 +01:00
Teufelchen1
64b4d433b9 gnrc: Fix unused function error when using LLVM 2022-11-06 15:39:39 +00:00
Karl Fessel
72a1e93eed sys/pm_layered: pm_get_blocker = instead of memcopy -ease readability 2022-11-04 16:59:48 +01:00
Karl Fessel
5447203921 sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath 2022-11-04 16:59:02 +01:00
Karl Fessel
21973963c0 sys/pm_layered: align pm_blocker_t for speed 2022-11-04 16:50:52 +01:00
Benjamin Valentin
60ab2dbc95 sys/bitfield: add bf_set_all() 2022-11-04 16:48:48 +01:00
benpicco
f954a8bac7
Merge pull request #18842 from kfessel/p-pm-layerd-speedup
sys/pm_layered: move (un)block assert for minor speedup
2022-11-04 02:36:57 +01:00
Benjamin Valentin
bd8b6e454d nanocoap_sock: send ACK with empty code instead of 2.03 2022-11-03 23:33:57 +01:00
Benjamin Valentin
084f0287a3 nanocoap_sock: support handling empty ACKs with separate response 2022-11-03 23:26:51 +01:00
benpicco
0284aa5146
Merge pull request #18819 from benpicco/nanocoap_sock-non-retrans
nanocoap_sock: only re-transmit CON messages
2022-11-03 23:10:25 +01:00
Karl Fessel
f3ed268ec6 sys/pm_layered: move (un)block assert for minor speedup 2022-11-03 16:20:56 +01:00
Jue
904dc0131f ztimer: don't interact with pm_layered if ztimer_ondemand is used 2022-11-02 22:36:54 +01:00
Juergen Fitschen
84c89f9dd7
Merge pull request #18783 from jue89/fix/ztimer_lptimer_kconfig
sys/ztimer: model ztimer_periph_lptimer for Kconfig
2022-11-02 13:56:05 +01:00
Benjamin Valentin
8da267de72 sys/bitfield: add bf_find_first_{set, unset}()
At functions to get the first (un)set bit in a bitfield.
2022-11-02 13:06:06 +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
Benjamin Valentin
3877a92ca4 nanocoap_vfs: don't close socket in nanocoap_vfs_put() 2022-10-31 23:51:08 +01:00
Jue
4b802ad12e sys/pm_layered: add debugging outputs 2022-10-31 22:18:00 +01:00
Benjamin Valentin
782910ade4 nanocoap_sock: only re-transmit CON messages
If a NON confirmable message is sent with a callback function,
not receiving a response in time would lead to a retransmission.

This is of course an error, as only CON messages are to be retransmitted.
2022-10-31 17:18:19 +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
0dc054cbda sys/net/gnrc_lwmac: add missing xtimer dependency 2022-10-29 21:04:28 +02:00
Martine Lenders
36a099e1ec
gnrc_sixlowpan_iphc.c: dereference ipv6_hdr in DEBUG() after assignment 2022-10-29 00:58:35 +02:00
Felix
aa27ed71fa
gnrc_sixlowpan_frag_vrb: Assert no usage of a vrb with src_len == 0 2022-10-29 00:58:35 +02:00
Felix
17c70f7ee0
gnrc_netif_ieee802154: Ignore packets without source address 2022-10-29 00:58:35 +02:00
Felix
0bec3e245e
ieee802154: Adjust parsing of IEEE 802.15.4 frame header 2022-10-29 00:58:35 +02:00
Martine Lenders
4a081f8661
gnrc_sixlowpan_iphc: fix packet type confusion in _iphc_encode() 2022-10-29 00:58:34 +02:00
Felix
639c04325d
gnrc_sixlowpan_iphc: fix null pointer dereference in _iphc_encode() 2022-10-29 00:58:34 +02:00
Martine Lenders
9728f727e7
gnrc_sixlowpan_frag_rb: fix integer underflow in _6lo_frag_size() 2022-10-29 00:58:34 +02:00
Martine Lenders
2709fbd827
gnrc_sixlowpan_iphc: fix integer underflow in gnrc_sixlowpan_iphc_recv() 2022-10-29 00:58:33 +02:00
Martine Lenders
73615161c0
gnrc_sixlowpan_iphc: fix buffer overflow in gnrc_sixlowpan_iphc_recv() 2022-10-29 00:58:14 +02:00
Benjamin Valentin
55e13a9d61 nanocoap: add coap_request_ctx_init() 2022-10-28 15:24:23 +02:00
Benjamin Valentin
c6f9654461 nanocoap: request context to coap_handle_req() 2022-10-28 14:21:52 +02:00
Martine Lenders
85cce1ec0d
Merge pull request #18709 from miri64/gnrc_udp/enh/use-smaller-stack
gnrc_udp: use small stack-size
2022-10-28 11:51:23 +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
Jue
bd603249a5 sys/ztimer: build ztimer_periph_timer if ztimer_periph_lptimer is used
ztimer_periph_lptimer is uses the implementation of ztimer_periph_timer
2022-10-27 19:44:57 +02:00
Jue
159749e1f0 sys/ztimer: add defaults for ztimer_periph_lptimer 2022-10-27 19:44:57 +02:00
benpicco
1481df8a31
Merge pull request #18805 from MrKevinWeiss/pr/fix/nightlybpfail
Fix kconfig mismatch breaking nightlies
2022-10-27 18:18:17 +02:00
Martine Lenders
7b28794ee6
gnrc_udp: use small stack-size 2022-10-27 17:28:01 +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
MrKevinWeiss
6b5c75cad4
boards/blxxpill-128kib: Fix kconfig mismatch
Nightlies are failing due to kconfig mismatch.
It would seem this is a result of bringing in the USB stuff.
I assume that this uses ztimer periph_timer as a backend as periph_timer is already selected.
However, kconfig only resolves one and not recursively making it hard to match.
For not a hack is added to override for these boards.
2022-10-27 14:07:32 +02:00
benpicco
4ebece5d34
Merge pull request #18801 from benpicco/gnrc_nib_full-debug
gnrc_ipv6_nib: add debug output when nib is full on address resolution
2022-10-27 12:49:29 +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
Juergen Fitschen
b8a4aa9ce1 sys/ztimer: model ztimer_periph_lptimer 2022-10-26 20:53:48 +02:00
Martine Lenders
ff884dd45f
Merge pull request #17429 from benpicco/gnrc/ipv6_auto_subnets-static
gnrc/ipv6_auto_subnets: add CONFIG_GNRC_IPV6_AUTO_SUBNETS_STATIC option
2022-10-26 14:57:40 +02:00
Teufelchen1
499b635ae9 sys/clif: Fixing out of bounds read under certain conditions 2022-10-26 13:44:01 +02:00
benpicco
aa11a9a0d7
Merge pull request #18799 from JKRhb/coap-opt-numbers
sys/net: add Size1 and Size2 option numbers
2022-10-25 23:27:26 +02:00
Benjamin Valentin
b068bd31c2 gnrc/ipv6_auto_subnets: add CONFIG_GNRC_IPV6_AUTO_SUBNETS_STATIC option
In situations with high packet loss, if all sync packets are lost, conflicting
subnets will be configured.

If the network is static, this can be prevented by always using the highest number
of subnets that has been observed.

This assumes no nodes are physically added / removed from the network.
2022-10-25 19:46:42 +02:00
Martine Lenders
b92e90f7b5
gnrc_sixlowpan_frag_sfr: make ARQ timer mockable 2022-10-25 18:38:37 +02:00
Martine Lenders
30f990f789
gnrc_sixlowpan_frag_sfr: provide CongURE support 2022-10-25 18:38:36 +02:00
Benjamin Valentin
fa4fb8e3bf gnrc_ipv6_nib: add debug output when nib is full on address resolution 2022-10-25 18:21:57 +02:00
Jan Romann
7c3c466bd4
sys/coap: add Size1 option number 2022-10-25 14:09:26 +02:00
Jan Romann
4ea42c0a3c
sys/coap: add Size2 option number 2022-10-25 14:07:39 +02:00
Martine Lenders
149aadc841
shell_cmd_gnrc_udp: add missing netutils dependency
The `gnrc_udp` shell command uses the function `netutils_get_ipv6()` but
does not include the corresponding module `netutils`. The only reason
most applications that use `shell_cmd_gnrc_udp` link is because they
also include the `shell_cmd_gnrc_icmpv6_echo` module (e.g. implicit via
`gnrc_ipcmpv6_echo`), which includes this dependency.
2022-10-25 12:37:33 +02:00
benpicco
af84b09dce
Merge pull request #18774 from maribu/sys/stdio_uart/undef_behavior
sys/stdio_uart: fix undefined behavior
2022-10-24 23:38:10 +02:00
Marian Buschsieweke
82e3d1d1f3
sys/stdio_uart: fix undefined behavior
Also drop the `-Wno-cast-function-type` hack that allowed the bug to
sneak past Murdock.
2022-10-24 09:06:11 +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
Jan Romann
d916b33bc6 sys/net/nanocoap: introduce Accept option helper 2022-10-19 16:44:13 +02:00
benpicco
49d6604bc3
Merge pull request #17763 from HendrikVE/pr/examples_gcoap_ipv4_support
examples/gcoap: add IPv4 support
2022-10-19 16:05:30 +02:00
Benjamin Valentin
8553c8ff55 sys/tiny_strerror: add tiny_strerror_minimal 2022-10-18 23:30:15 +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
Hendrik van Essen
226dce01bf examples/gcoap: add IPv4 support 2022-10-18 10:59:43 +02:00
Hendrik van Essen
e77aa7b65e net/ipv4/addr.h: add ipv4_addr_is_multicast 2022-10-18 10:57:50 +02:00
benpicco
0b2fbce906
Merge pull request #18299 from fabian18/preprocessor_successor
sys: preprocessor successor module
2022-10-17 22:42:27 +02:00
Martine Lenders
463317391b
congure_abe: initial import of TCP ABE congestion control 2022-10-17 16:44:39 +02: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
fefd8baef6 sys/preprocessor: add Kconfig file 2022-10-17 10:38:14 +02:00
Fabian Hüßler
77bce9d758 sys: define AUTO_INIT_PRIORITY_AFTER using preprocessor successor 2022-10-17 10:38:14 +02:00
Francisco Molina
faa0e05f4b sys: add auto_init includes treewide 2022-10-17 10:38:14 +02:00
Fabian Hüßler
b4dcbba26d sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
Martine Lenders
fc57bfb511
congure_quic: initial import of QUIC congestion control 2022-10-17 10:27:44 +02:00
benpicco
72d16e152a
Merge pull request #17983 from kfessel/p-remove-coap_pkt-token
net/nanocoap: remove coap_pkt token ptr
2022-10-16 04:21:47 +02:00
Benjamin Valentin
1ec834f870 nanocoap_sock: deprecate nanocoap_get()
This is an old holdover, all in-tree users have been converted to use
nanocoap_sock_get() or similar functions.
2022-10-15 23:56:00 +02:00
benpicco
5c9715ae74
Merge pull request #18731 from maribu/sys/stdio_uart/onlcr
sys/stdio_uart: add stdio_uart_onlcr (pseudo-) module
2022-10-15 23:36:48 +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
Martine Lenders
53ed211fc9
Merge pull request #16175 from miri64/gnrc_sixlowpan_frag_sfr/enh/mark-ecn
gnrc_sixlowpan_frag_sfr: add support for queue-based ECN
2022-10-15 14:01:44 +02:00
Martine Lenders
c94c32dce4
Merge pull request #18727 from miri64/gnrc/enh/explicit-pseudomodules
gnrc: make pseudo-modules explicit + documentation improvements
2022-10-14 17:39:39 +02:00
Marian Buschsieweke
5d5e8d6163
Merge pull request #18740 from maribu/chrysn-pull-requests/gnrc-netreg-lock
gnrc_netreg: Use locks around netreg
2022-10-14 15:10:35 +02:00
Leandro Lanzieri
70acefaa55
Merge pull request #18386 from miri64/gcoap_forward_proxy/enh/empty-ack
gcoap_forward_proxy: send empty ACK when response takes too long
2022-10-14 11:23:48 +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
Benjamin Valentin
1cfcb307f2 nanocoap_sock: add nanocoap_sock_{put, post}_non() 2022-10-13 19:04:09 +02:00
Benjamin Valentin
56f36c09a0 nanocoap: add support for no-response option
See https://datatracker.ietf.org/doc/rfc7967/
2022-10-13 19:04:09 +02:00
Benjamin Valentin
c656df9c3a nanocoap_sock: implement nanocoap_sock_delete() 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
Jim Paris
d797c990d6
sys/stdio_uart: add stdio_uart_onlcr (pseudo-) module
Add USE_MODULE += "stdio_uart_onlcr" to enable it.
This is named after the "onlcr" stty flag, which does the same thing.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2022-10-13 12:08:34 +02:00
Leandro Lanzieri
fa96d469da
Merge pull request #18425 from kfessel/p-modular-log
sys/log_*: modularize log into log_color and log_printfnoformat
2022-10-13 09:47:03 +02:00
Martine Lenders
8dcc5d07ba
gnrc_sixlowpan_config: resolve ECN at the earliest convenience 2022-10-12 18:02:18 +02:00
Martine Lenders
653d08281b
gnrc_sixlowpan_frag_sfr: add support for queue-based ECN 2022-10-12 18:02:18 +02:00
Martine Lenders
63c4fe5770
gcoap: fix "line is longer than 100 characters" pointed out by Vera++ 2022-10-12 17:33:55 +02:00
chrysn
798dedd4d1
gcoap_forward_proxy: send empty ACK when response takes too long
Co-Authored-By: Martine S. Lenders <m.lenders@fu-berlin.de>
Signed-off-by: Martine Lenders <m.lenders@fu-berlin.de>
2022-10-12 17:33:55 +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
Karl Fessel
e89063e1cf sys/log_color: guard from compiling for esp 2022-10-12 13:45:29 +02:00
Karl Fessel
bac70c5e47 sys/test_utils/print_stack_usage: include stdio if printf is used 2022-10-12 12:21:33 +02:00
Karl Fessel
514325b8b3 sys/log: modularize log into log_color and log_printfnoformat
- log_color: make log_write nonstatic
 - log_printfnoformat
 - apply module split to Kconfig
2022-10-12 12:21:29 +02:00
Martine Lenders
f7510cfb9d
gnrc_nettype: improve documentation on modules made explicit 2022-10-12 11:27:27 +02:00
Martine Lenders
153f42d524
gnrc_dhcpv6: improve documentation on modules made explicit 2022-10-12 11:27:15 +02:00
Martine Lenders
a1794c0cb3
gnrc_nettype: various doc enhancements and fixes 2022-10-12 11:23:56 +02:00
Martine Lenders
774ca13563
gnrc_nettype: reorder gnrc_nettype_t to fit the grouping again 2022-10-12 11:23:16 +02:00
Benjamin Valentin
be1c46ef27 gcoap_fileserver: don't abort on duplicate packet 2022-10-12 00:45:28 +02:00
Martine Lenders
5f504ad70d
gnrc_netif_lorawan: add debug message for failed send 2022-10-11 22:57:00 +02:00
Martine Lenders
ab32ad5030
gnrc_ipv6_nib: auto-configure link-local address on UP event 2022-10-11 22:57:00 +02:00
Martine Lenders
f34f296242
gnrc_netif_lorawan: add support for LINK_UP/_DOWN events 2022-10-11 12:29:11 +02:00
Marian Buschsieweke
2476a3b3a7
Merge pull request #18723 from benpicco/sock_util-find_hoststart
sys/net/sock_util: fix _find_hoststart()
2022-10-11 03:53:45 +02:00
Benjamin Valentin
c47407892a sys/net/sock_util: style fixes 2022-10-10 20:31:15 +02:00
benpicco
988039b351
Merge pull request #18708 from miri64/gnrc_ipv6_nib/enh/handle-up-down-in-gnrc_ipv6
gnrc_ipv6_nib: handle iface_up/iface_down in IPv6 thread
2022-10-10 20:26:42 +02:00
Benjamin Valentin
6f2bbdd3b1 sys/net/sock_util: fix _find_hoststart() 2022-10-10 19:02:18 +02:00
Martine Lenders
47aaa94157
gnrc_ipv6_nib: handle iface_up/iface_down in IPv6 thread 2022-10-07 14:12:00 +02:00
Benjamin Valentin
f78fa2c632 sys/checksum: update CRC-16 documentation 2022-10-07 13:01:38 +02:00
benpicco
24f7d2011a
Merge pull request #18701 from benpicco/sys/checksum-crc16_fast
sys/checksum: add CRC-16 implementation without lookup table
2022-10-07 12:31:23 +02:00
Marian Buschsieweke
213c35bb71
Merge pull request #18649 from maribu/sys/shell/cmds
sys/shell/cmds: fix shell_cmd_netif LoRaWAN integration
2022-10-07 12:19:57 +02:00
Martine Lenders
a49863e95c
Merge pull request #18698 from miri64/doc/enh/deprecated-modules
doc: add deprecation notice on deprecated pseudo-modules
2022-10-07 01:56:49 +02:00
chrysn
edfa255733
Merge pull request #18053 from Teufelchen1/fix/cord_ep
shell/cord_ep: Add user guidance & prevent accidental crash
2022-10-06 22:37:42 +02:00
Benjamin Valentin
e313c56e94 sys/checksum: add CRC-16 implementation without lookup table 2022-10-06 17:43:20 +02:00
benpicco
4493afb582
Merge pull request #18639 from benpicco/nanocoap_sock_put_url
sys/shell: ncput: add option to read from stdin
2022-10-06 12:05:39 +02:00
Martine Lenders
bb92b2b281
doc: add deprecation notice on deprecated pseudo-modules 2022-10-06 10:53:10 +02:00
Karl Fessel
b575f0cdf8 net/nanocoap: remove coap_pkt token ptr 2022-10-06 00:20:10 +02:00
Karl Fessel
14096a935f sys/net: cleanup coap_pkt_t.token uses 2022-10-06 00:20:10 +02:00
Hendrik van Essen
6c98a5b3b7 sys/net/network_layer/ipv4/addr: add ipv4_addr_print function 2022-10-05 15:16:37 +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
Marian Buschsieweke
fd80c53a35
sys/shell/cmds: fix shell_cmd_netif LoRaWAN integration
Model the LoRaWAN integration to GNRC's netif command (ifconfig) as
submodule of it, namely `shell_cmd_gnrc_netif_lorawan`.

This should fix a regression introduced by
https://github.com/RIOT-OS/RIOT/pull/18355
2022-10-04 23:06:03 +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
49a85f4633 sys/checksum: add CRC-32 checksum
based on https://github.com/aeldidi/crc32
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
Benjamin Valentin
49e1720d5c vfs: allow filesystem to request absolute paths 2022-10-02 00:16:01 +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
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
Benjamin Valentin
85dd564f87 vfs: drop unused abs_path parameter 2022-09-29 22:01:37 +02:00
benpicco
0e181e9ec3
Merge pull request #18668 from miri64/coap/enh/coap_v1
coap: provide definition for version field value
2022-09-29 20:41:53 +02:00
benpicco
6257e328c0
Merge pull request #18661 from fabian18/nib-6ln_correct_abr_timeout
nib/_nib-6ln: correct ABR timeout in ABRO
2022-09-29 17:25:06 +02:00
Ollrogge
32cef708a7 gnrc/lorawan: uncrustify files 2022-09-29 11:26:04 +02:00
Martine Lenders
b9d7028a8f
coap: provide definition for version field value 2022-09-29 11:26:03 +02:00
Ollrogge
12a4e1c1ec gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
Fabian Hüßler
23fa33774f nib/_nib-6ln: correct ABR timeout in ABRO 2022-09-29 10:48:49 +02:00
benpicco
c35a4ba577
Merge pull request #18621 from benpicco/strscpy
sys/string_utils: add strscpy()
2022-09-28 19:11:42 +02:00
benpicco
e9b5bd712c
Merge pull request #18651 from benpicco/gcoap-footgun
gcoap: accept resources in any order
2022-09-28 10:48:51 +02:00
Benjamin Valentin
16491eaca7 sys/string_utils: fix check for native 2022-09-28 09:58:43 +02:00
Martine Lenders
b297b2bd14
Merge pull request #18471 from miri64/gcoap_forward_proxy/fix/copy-max_age
gcoap_forward_proxy: copy Max-Age from forwarded Valid if it exists
2022-09-28 04:36:16 +02:00
Teufelchen1
3dc3110bab shell/cord_ep: Take full URIs instead of IP and path
This fixes a crash when the path was not entered with a leading slash.
2022-09-27 16:28:04 +02:00
Benjamin Valentin
6563ce2fb7 event_callback: add event_callback_oneshot() 2022-09-27 15:45:19 +02:00
MrKevinWeiss
6cad5d2477
cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
Benjamin Valentin
e20b966109 event_periodic_callback: add getter for user context 2022-09-27 13:15:26 +02:00
7344e14e1b sys/shell/cmds/dfplayer.c: initialize mode 2022-09-27 09:29:23 +02:00
Benjamin Valentin
a37b283ebe nanocoap: coap_tree_handler(): accept resources in any order 2022-09-26 20:32:30 +02:00
Benjamin Valentin
da1f161c3c gcoap: accept resources in any order 2022-09-26 20:20:14 +02:00
Benjamin Valentin
cdaf715a84 sys/string_utils: add strscpy() 2022-09-26 19:06:46 +02:00
Marian Buschsieweke
caa30b83d5
sys/riotboot: add missing include 2022-09-26 18:54:39 +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
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
52cd8fe4a1 sys/shell: ncput: add option to read from stdin 2022-09-23 19:47:42 +02:00
Benjamin Valentin
42a8a587c4 nanocoap_sock: add nanocoap_sock_{put, post}_url() 2022-09-23 19:47:02 +02:00
Ollrogge
aa22771bd9 fido2/ctap: uncrustify files 2022-09-23 16:42:52 +02:00
Ollrogge
37c35112e2 fido2/ctap: simplify flash handling 2022-09-23 16:40:30 +02:00
Sören Tempel
498e531e2f dhcpv6: don't treat zero option as an end-of-payload marker
As far as I can tell, no DHCPv6 RFC specifies this option. The handling
for the zero option was added in #17736 by @benpicco to fix issues
encountered while trying to retrieve a DHCHPv6 lease. However, I
strongly suspect that the zero option was encountered in this case due
to an out-of-bounds read performed in RIOT's DHCPv6 client
implementation (i.e. the option parsing loop read beyond the packet
bounds). This issue was fixed in #18307 and I strongly suspect that it
should also fix the issue @benpicco originally encountered in #17736. As
such, I propose that we remove the if statement which treats the zero
option as an end-of-payload marker.

Fixes #18309
2022-09-22 20:08:00 +02:00
Marian Buschsieweke
a00fb233dc
sys/net/credman: fix insecure memory wiping 2022-09-20 17:44:24 +02:00
Marian Buschsieweke
0f27ce4ad8
sys/fido2: fix insecure memory wiping 2022-09-20 17:44:24 +02:00
Marian Buschsieweke
34c61b58a6
sys/string_utils : new (header-only) module for string utilities
This header-only module provides a `string_utils.h` that currently
only provides the non-standard function `explicit_bzero()` to securely
wipe memory. It may be extended with other utility functions in the
future.
2022-09-20 17:44:24 +02:00
Marian Buschsieweke
eaa245f5de
sys/shell/commands/sc_vfs.c: use tiny_strerror 2022-09-20 15:51:11 +02:00
Marian Buschsieweke
1bdc1a5967
sys/tiny_strerror: add tiny strerror() implementation
`tiny_strerror()` is a drop-in replacement for `strerror()`, but
instead of a long help message it returns the much shorter macro name
matching the given number.

The (pseudo-)module `tiny_strerror_as_strerror` can be used to
replace all calls to `strerror()` with calls to `tiny_strerror()`.
2022-09-20 15:51:11 +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
ff648985c0
Merge pull request #18443 from miri64/gcoap_dns/enh/implement-max_age-ttl-algorithm
gcoap_dns: implement Max-Age-based TTL calculation
2022-09-19 16:03:46 +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
Karl Fessel
e43a75d293
Merge pull request #18431 from kfessel/p-doccheck-fix
doccheck: make the file pattern more match riot.doxyfile
2022-09-19 11:07:57 +02:00
Benjamin Valentin
b1ea963df4 gnrc_netif: introduce GNRC_NETIF_STACKSIZE_DEFAULT 2022-09-18 18:35:21 +02:00
Marian Buschsieweke
8457f09dde
Merge pull request #18139 from maribu/sys/net/gnrc/netif/confirm_send
sys/net/gnrc_netif: Make use of confirm send
2022-09-17 19:40:24 +02:00
Benjamin Valentin
838a5e4bd3 netdev_drivers: make sure to signal LINK_UP at least once 2022-09-16 22:57:28 +02:00
Benjamin Valentin
4b0bfae4ca gnrc_netif: handle NETDEV_EVENT_LINK_UP/DOWN events 2022-09-16 22:57:06 +02:00
Benjamin Valentin
7211aa11af ipv6/nib: add gnrc_ipv6_nib_iface_{up, down}() 2022-09-16 22:57:06 +02:00
benpicco
8d824bca02
Merge pull request #18604 from benpicco/codespell2
codespell: fix remaining issues
2022-09-16 22:50:00 +02:00
Benjamin Valentin
6e7d5ae2d3 codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
Benjamin Valentin
aef967fdef USBUS/cdc_ecm: register with netdev 2022-09-16 13:22:42 +02:00
Marian Buschsieweke
fe7f75f78c
sys/shell/cmds: improve wording in shell help text
My spell checker says "receival" should be "reception". Also, the
terms allow list and deny list are preferred over whitelist and
blacklist. But since scripts may depend on the shell command name,
only the help description is changed, not the cmd 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
Marian Buschsieweke
6e68744d76
sys/shell: port random shell command to ztimer
This fixed compilation, as the use of the interal `_xtimer_now()`
function is not compatible with `ztimer_xtimer_compat`. However, this
bug never triggered due to a bug in the build system preventing the
compilation of the shell command. We are about to fix this, so let's
fix the source first.
2022-09-16 12:49:16 +02:00
benpicco
1be4da53c5
Merge pull request #17654 from kfessel/p-ztimer-lptimer
sys/ztimer: add LPTIMER auto init
2022-09-15 22:50:00 +02:00
Marian Buschsieweke
6790167a18
Merge pull request #18226 from benpicco/cpu_get_last_instruction
cpu: cpu_print_last_instruction() -> cpu_get_caller_pc()
2022-09-15 20:06:10 +02:00
Benjamin Valentin
00c11c3f9d event_periodic_callback: add convenience wrapper for periodic callbacks 2022-09-15 18:36:41 +02:00
Marian Buschsieweke
2dd185448f
Merge pull request #18587 from Ziesie1/master
sys/net: include misplacement inside linkage-specification
2022-09-15 14:06:06 +02:00
Marian Buschsieweke
581f35e577
sys/net/gnrc/netif: adapt to new API
For Ethernet, raw netifs, and IEEE 802.15.4 netifs only release outgoing
frame with legacy drivers, as gnrc_netif does so with new non-blocking
API.
2022-09-15 13:23:26 +02:00
Marian Buschsieweke
1cb6f9e11a
sys/net/gnrc/netif: provide support for confirm_send()
This adds support for netdevs implementing the new API that provides
`netdev_driver_t::confirm_send()`. This allows implementing netdevs
in an event based non-blocking fashion, making live of driver
developers a bit easier. In addition, `gnrc_tx_sync` will now throttle
users of `sock_udp_send()` so that they can only send datagrams as
fast as the network stack and hardware is able to send out.

Finally, this lays the groundwork to fetch TX statistics (such as
TX timestamps, reception of layer 2 ACKs/NACKs, etc.) from the network
devices.
2022-09-15 13:23:25 +02:00
Karl Fessel
81d06c819c sys/ztimer: add LPTIMER auto init 2022-09-15 11:26:22 +02:00
Karl Fessel
594fe83843 sys/ztimer: auto_init react to possibly missing ztimer_periph_timer 2022-09-15 11:26:22 +02:00
benpicco
b5bf5da38d
Merge pull request #18444 from kfessel/p-fix-doc-grp
doc: fix unbalaced grouping
2022-09-14 22:19:28 +02:00
Karl Fessel
05f114d0af doc: fix unbalaced grouping
- most were trivial
    - missing group close or open
    - extra space
    - no doxygen comment
- name commad might open an implicit group
    this hould also be implicit cosed but does not happen somtimes
- crazy: internal declared groups have to be closed internal
2022-09-14 15:05:25 +02:00
Ziesie
be10ffe74e sys/net: include misplacement inside linkage-specification
An include should be outside of the linkage-specification.
2022-09-14 10:47:18 +02:00
Benjamin Valentin
b6fac2b2c7 nanocoap_sock: consitfy remote 2022-09-14 10:29:57 +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
02aeab750a gcoap_forward_proxy: const arg to gcoap_forward_proxy_request_process() 2022-09-12 17:52:54 +02:00
Benjamin Valentin
1552267d19 gcoap: drop duplicate context field from coap_request_ctx_t 2022-09-12 17:51:26 +02:00
Benjamin Valentin
f068fbccb6 gcoap_forward_proxy: make use of coap_request_ctx_get_remote_udp() 2022-09-12 17:51:26 +02:00
Benjamin Valentin
2376343547 gcoap: add remote sock_udp_ep_t to coap_request_ctx_t 2022-09-12 17:51:26 +02:00
Marian Buschsieweke
1066195fe9
Merge pull request #18550 from benpicco/sc_vfs-human
sys/shell/vfs: make output of vfs df human readable
2022-09-08 20:13:08 +02:00
Benjamin Valentin
2d45fcaf76 sys/shell/vfs: make output of vfs df human readable 2022-09-08 12:35:27 +02:00
Teufelchen1
df8fe4476d sys/uri_parser: Adding the port as uint16 2022-09-08 11:32:49 +02:00
Marian Buschsieweke
2eb440b05c
Merge pull request #18556 from benpicco/shell_suit_revert
sys/shell/commands: add suit revert sub-command
2022-09-07 19:08:22 +02:00
benpicco
d43318f90d
Merge pull request #18558 from benpicco/_sbrk_r-comment
sys/syscalls: drop outdated comment on _sbrk_r()
2022-09-06 14:23:02 +02:00
Benjamin Valentin
d635004a62 sys/syscalls: fix coding style 2022-09-05 14:56:51 +02:00
Benjamin Valentin
fb387ca83a sys/syscalls: drop outdated comment on _sbrk_r() 2022-09-05 14:23:10 +02:00
Benjamin Valentin
15a43f28f2 suit: start worker thread on demand 2022-09-05 07:46:56 +02:00
Benjamin Valentin
db701de094 suit: clean up worker thread, make suit_handle_url() public 2022-09-05 07:46:56 +02:00
Benjamin Valentin
37dceb6c80 nanocoap_sock: use correct error code in nanocoap_get_blockwise_url_to_buf()
It should return -ENOBUFS like the other nanocoap_…() functions, not -1
2022-09-05 07:40:59 +02:00
Benjamin Valentin
6ed2394dde sys/shell/commands: add suit revert sub-command 2022-09-05 07:36:28 +02:00
Benjamin Valentin
f95d577245 suit: make use of worker functions 2022-09-03 23:25:01 +02:00
Benjamin Valentin
0b6e344d4f suit: rename worker thread functions (they are not CoAP only) 2022-09-03 23:25:01 +02:00
fcf3e01eb7
Merge pull request #18315 from miri64/fmt/doc/wording
fmt: unify and align wording regarding characters, digits, and bytes
2022-09-01 21:46:22 +02:00
chrysn
7f64521c10
Merge pull request #18424 from benpicco/ncget-convenience
sys/shell: ncget: convenience improvements
2022-08-31 23:40:35 +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
Benjamin Valentin
51804679e6 sys/shell: ncget: make use of vfs_is_dir() 2022-08-31 17:23:20 +02:00
Martine Lenders
803ff1f69e
Merge pull request #18516 from Teufelchen1/feat/crc_fixup
sys/checksum: Adding three new crc16 variations
2022-08-31 12:58:04 +02:00
Martine Lenders
84e3ace6e3
gnrc_lorawan_crypto: fix Vera++ errors 2022-08-31 10:43:25 +02:00
Martine Lenders
aead6d2010
gnrc_lorawan: use aes128_cmac_.* instead of cmac_.* 2022-08-31 10:43:25 +02:00
Martine Lenders
5e59649fda
hashes_cmac: rename to hashes_aes128_cmac 2022-08-31 10:43:25 +02:00
benpicco
0e2eb919a4
Merge pull request #18536 from fabian18/bugfix_gcoap_fileserver_recursive_delete
gcoap_fileserver: bugfix recursive delete
2022-08-31 08:35:27 +02:00
Fabian Hüßler
7ba45bbd19 sys/vfs_util: bugfix rec. delete, rel. components 2022-08-30 17:53:36 +02:00
Fabian Hüßler
43caeb8cb5 gcoap_fileserver: bugfix add missing return 2022-08-30 17:47:51 +02:00
Teufelchen1
a25934ca16 sys/checksum: Adding four crc16 variations: ccitt-aug/false/kermit/mcrf4xx 2022-08-30 15:37:04 +02:00
benpicco
346c7336eb
Merge pull request #18514 from benpicco/nanocoap_sock_put
nanocoap_sock: add nanocoap_sock_put()
2022-08-30 14:00:42 +02:00
Marian Buschsieweke
eaace28804
sys/usb: Set USB model to $(BOARD) by default 2022-08-29 16:39:05 +02:00
Benjamin Valentin
514f039c30 nanocoap_sock: add nanocoap_sock_{put, post}() 2022-08-25 17:52:43 +02:00
Gunar Schorcht
56e59eb036 cpu/esp32: add NimBLE support for ESP32 2022-08-24 09:05:25 +02:00
Martine Lenders
f15fbb3c15
Merge pull request #18441 from miri64/dns_cache/fix/ttl0
dns_cache: handle TTL=0 properly
2022-08-23 02:58:13 +02:00
José Alamos
39987817ce
Merge pull request #18496 from jia200x/pr/gnrc_netif_multi_queue
net/gnrc_netif: add support for priority queues
2022-08-22 22:54:55 +02:00
Jose Alamos
5fd601ae97
gnrc/init_devs/kw2xrf: use high priority queue for drivers 2022-08-22 18:00:15 +02:00
Jose Alamos
2c9f3072fb
net/gnrc_netif: add support for priority queues 2022-08-22 18:00:14 +02:00
benpicco
ed3d680aa2
Merge pull request #18482 from benpicco/coap_timeout_avr
nanocoap: fix type of CONFIG_COAP_ACK_TIMEOUT_MS (for AVR)
2022-08-20 18:37:15 +02:00
benpicco
a4564df7a5
Merge pull request #18474 from gschorcht/pkg/nimble/fix_statconn_peer_type
pkg/nimble:derive peer address type from peer address
2022-08-20 17:17:27 +02:00
Benjamin Valentin
071ae2ccc0 nanocoap: fix type of CONFIG_COAP_ACK_TIMEOUT_MS 2022-08-20 16:32:20 +02:00
chrysn
0a4bd3d68f
Merge pull request #18389 from chrysn-pull-requests/rust-cstr-update
rust: Update cstr dependency
2022-08-20 15:43:44 +02:00
benpicco
0b5f270b15
Merge pull request #18464 from jia200x/pr/bhp_msg
sys/bhp_msg: add IPC based implementation of Bottom Half Processor
2022-08-19 14:28:15 +02:00
Jose Alamos
8cf53fc8ab
sys/bhp_msg: add IPC based Bottom Half Processor 2022-08-19 12:01:30 +02:00
Marian Buschsieweke
ca4afc4053
pkg/littlefs2: fix unaligned memory access
Previously `tests/pkg_littlefs2` crashed on the `samr21-xpro`. This
now aligns the buffers in `littlefs2_desc_t` to the alignment
requirement of `uint32_t`.

Specifically the issue causing the crash at hand was that
`struct lfs_free::buffer` is of type `uint32_t *`, so access are
expected to be aligned to `uint32_t`. After this commit, this
assumption is fulfilled.
2022-08-18 18:54:37 +02:00
Marian Buschsieweke
f87a401c87
pkg/littlefs: fix unaligned memory access
Previously `tests/pkg_littlefs` crashed on the `samr21-xpro`. This
now aligns the buffers in `littlefs_desc_t` to the alignment
requirement of `uint32_t`.

Specifically the issue causing the crash at hand was that
`lfs_free_t::buffer` is of type `uint32_t *`, so access are expected
to be aligned to `uint32_t`. After this commit, this assumption is
fulfilled.
2022-08-18 18:53:59 +02:00
Gunar Schorcht
8a5ff74dfc sys/shell: print address type in ble info command 2022-08-18 18:45:13 +02:00
Jose Alamos
2d4f239d18
sys/bhp: add missing event dependency 2022-08-18 17:04:46 +02:00
Martine Lenders
1135cc0f7e
gcoap: fix swap-out of option length for ETag 2022-08-18 14:38:37 +02:00
Martine Lenders
9bc0454d99
gcoap_forward_proxy: copy Max-Age from forwarded Valid if it exists 2022-08-18 12:19:31 +02:00
Leandro Lanzieri
2dd59236c8
Merge pull request #18423 from MrKevinWeiss/pr/disable/hashchecks
.murdock: disable hash checks of kconfig/make
2022-08-17 18:30:36 +02:00
benpicco
0713e0d9a1
Merge pull request #18313 from benpicco/coap_request_ctx_get_tl_type
gcoap: move tl_type to coap_request_ctx_t
2022-08-17 16:51:50 +02:00
benpicco
2321841ccc
Merge pull request #18426 from maribu/sys/net/gnrc/netif/api_check
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
2022-08-17 16:50:16 +02:00
Marian Buschsieweke
276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
benpicco
dffac04069
Merge pull request #18447 from benpicco/vfs_formaat_by_path
vfs: introduce vfs_format_by_path()
2022-08-17 12:04:09 +02:00
Benjamin Valentin
abb5d0fab6 suit: try multiple keys 2022-08-16 22:30:27 +02:00
benpicco
d1ce899188
Merge pull request #18398 from benpicco/gnrc_ipv6_auto_subnets-doc
gnrc/ipv6_auto_subnets: improve documentation about subnet generation and RIO
2022-08-16 17:00:52 +02:00
benpicco
0aff42c682
Merge pull request #18383 from jia200x/pr/kw2xrf_radio_hal
drivers/kw2xrf: add support for IEEE 802.15.4 Radio HAL
2022-08-16 11:42:03 +02:00
Benjamin Valentin
28ff28aee0 gnrc/ipv6_auto_subnets: document the role of the RIO 2022-08-16 11:31:23 +02:00
Benjamin Valentin
18e74ae8c0 gnrc/ipv6_auto_subnets: document subnet generation better 2022-08-16 11:31:23 +02:00
MrKevinWeiss
54c4bd56ca
sys/cpp11-compat: Fix kconfig model 2022-08-16 10:57:26 +02:00
Jose Alamos
4ebcd7c055
drivers/kw2xrf: add IEEE 802.15.4 Radio HAL support
Co-authored-by: Michel Rottleuthner <michel.rottleuthner@haw-hamburg.de>
2022-08-15 12:11:03 +02:00
Benjamin Valentin
9057b2c6ad sys/shell/vfs: introduce format sub-command 2022-08-12 15:36:29 +02:00
Benjamin Valentin
7c19ea95b7 sys/shell/vfs: fix error message printing 2022-08-12 15:36:29 +02:00
Benjamin Valentin
855a359058 vfs: introduce vfs_format_by_path() 2022-08-12 15:36:29 +02:00
Jose Alamos
4ace2ed778
net/gnrc: add support for event based Bottom Half Processor 2022-08-12 11:12:13 +02:00
Jose Alamos
ef80302cca
ieee802154: add ACK timeout in symbols to header 2022-08-12 10:17:33 +02:00
José Alamos
50e4498c84
Merge pull request #18435 from jia200x/pr/bhp
sys/bhp_*: add initial support for generic Bottom Half Processor
2022-08-12 09:58:18 +02:00
Martine Lenders
6f18132e98
gcoap_dns: implement Max-Age-based TTL calculation 2022-08-11 15:00:19 +02:00