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

4743 Commits

Author SHA1 Message Date
benpicco
81b5cf2e94
Merge pull request #20139 from benpicco/gnrc_sixloenc-fix
net/gnrc/netif: set 6LN flag for ethernet if gnrc_sixloenc is used
2023-12-07 20:06:13 +00:00
Marian Buschsieweke
d160a78ecc
sys/net/gnrc_sock: assume timeout is feasible
When not implementing the timeout feature, add an `assume()` that there
is no timeout. Otherwise things break at runtime and are hard to debug.
2023-12-06 13:48:27 +01:00
Benjamin Valentin
bc2c95c833 net/gnrc/netif: set 6LN flag for ethernet if gnrc_sixloenc is used 2023-12-04 22:56:28 +01:00
Marian Buschsieweke
d252eb7395
Merge pull request #19998 from fabian18/gnrc_static_messge_queues
gnrc: make message queues static
2023-12-04 11:21:08 +00:00
benpicco
6eed92b1b7
Merge pull request #20114 from benpicco/gnrc_netif-error
sys/net/gnrc/netif: print which netif failed to init
2023-11-29 00:14:45 +00:00
Benjamin Valentin
c5b6a49b21 sys/net/gnrc/netif: print which netif failed to init 2023-11-28 23:01:21 +01:00
benpicco
db6d918c46
Merge pull request #19965 from benpicco/sock_udp_recv-ealry
sock/udp: work around gnrc_sock_recv() returning early timeout
2023-11-28 12:31:39 +00:00
Benjamin Valentin
e2e5e03439 nanocoap_sock: use coap_get_code_raw() 2023-11-28 13:11:11 +01:00
Benjamin Valentin
e3d00682bc sock/udp: work around gnrc_sock_recv() returning early timeout
sock_udp_recv_buf_aux() sometimes will return -ETIMEDOUT before
the given timeout has expired (e.g. 28798µs instead of 160000µs).

This messes with many assumptions and breaks protocols that rely
on the timeout.

Until we have a proper fix, add this workaround.
2023-11-14 13:33:16 +01:00
benpicco
81fd126d3e
Merge pull request #20076 from bergzand/pr/gcoap_msec
gcoap: Use millisecond timer for observe option values
2023-11-14 10:26:18 +00:00
a6a8f6e1cd
gcoap: Separate out observe option generation in own function 2023-11-10 16:01:57 +01:00
6425fda812
gcoap: Use millisecond timer for observe option values 2023-11-10 16:00:00 +01:00
Benjamin Valentin
75f10a5725 gnrc/ipv6/nib: don't do multicast neighbor solicitation on 6LoWPAN 2023-11-10 12:11:49 +01:00
Benjamin Valentin
a8fc0a25ed gcoap_fileserver: use coap_get_code_raw() 2023-10-27 19:18:37 +02:00
Benjamin Valentin
a5cc48ad45 nanocoap_sock: use coap_get_code_raw() 2023-10-27 19:18:37 +02:00
Benjamin Valentin
54362e2c2a nanocoap/cache: use coap_get_code_raw() 2023-10-27 19:18:00 +02:00
bors[bot]
647a13c392
Merge #19999
19999: nib/_nib-6ln: bail out early if address is no longer assigned r=miri64 a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-10-24 16:01:53 +00:00
Benjamin Valentin
8779b5edde nib/_nib-6ln: don't check twice if address is assigned 2023-10-24 16:47:47 +02:00
Benjamin Valentin
7c6b367035 nib/_nib-6ln: bail out early if address is no longer assigned 2023-10-24 16:44:25 +02:00
bors[bot]
61ae692ae9
Merge #19994
19994: nanocoap: prevent integer underflow in coap_opt_put_uri_pathquery() r=miri64 a=benpicco





Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-10-24 09:20:51 +00:00
Benjamin Valentin
0fa04a3d57 nanocoap: prevent integer underflow in coap_opt_put_uri_pathquery()
If uri contains no path but only a query "?foo=bar" `len` would underflow.
Fix this by detecting if there is no path.

Reported by @Yu3H0
2023-10-20 12:59:42 +02:00
Fabian Hüßler
5aa3baac8c gnrc/udp: make message queue static 2023-10-19 17:52:30 +02:00
Fabian Hüßler
c741fa5fbe gnrc/pktdump: make message queue static 2023-10-19 17:49:25 +02:00
Fabian Hüßler
662f1be5d5 gnrc/sixlowpan: make message queue static 2023-10-19 17:47:24 +02:00
Fabian Hüßler
975f8959ce gnrc/ipv6: make message queue static 2023-10-19 17:45:08 +02:00
bors[bot]
b6772c85fd
Merge #19968
19968: gcoap: fix underflow when correcting ETag from cache r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-10-17 14:20:41 +00:00
bors[bot]
910e0e28ed
Merge #19963 #19971 #19974 #19975 #19976
19963: sys/event/timeout: add event_timeout_is_pending() r=benpicco a=benpicco



19971: sys/shell/gnrc_netif: Fix a few blockers for sharing ifconfig shell r=benpicco a=yarrick



19974: gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked for NULL pointer dereference r=benpicco a=miri64

 


19975: pkg/nanocbor: Bump to latest commit r=benpicco a=bergzand

### Contribution description

Not much to see here

Important changes:
- Add stream-like interface for encoder
- Separate functions for number of items left in arrays and maps

### Testing procedure

The usual test should still work

### Issues/PRs references

None

19976: core: Express -1 as ~0 in thread_status_t cast r=benpicco a=SimonIT



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Erik Ekman <eekman@google.com>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: SimonIT <simonit.orig@gmail.com>
2023-10-16 15:31:25 +00:00
Marian Buschsieweke
edc43201db
tree-wide: fix typos in doc and comments
This should not change any generated binary
2023-10-16 12:17:48 +02:00
Martine Lenders
988db6923d
gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked
... for NULL pointer dereference.
2023-10-12 16:24:18 +02:00
Erik Ekman
4f6b2759be sys/net: Add NETOPT_ACTIVE for netif on/off state
Similar to forcing interface up/down on Linux.
In lwIP this is separate to link state.
2023-10-11 21:46:55 +02:00
Martine Lenders
8d1cb1bd2b
gcoap: fix underflow when correcting ETag from cache 2023-10-10 14:41:45 +02:00
krzysztof-cabaj
d7000477d4 gnrc/icmpv6: add check for too big icmpv6 packets 2023-09-20 11:24:56 -04:00
Benjamin Valentin
c337992236 net/gnrc/rpl: enable RTR_ADV on RPL interface 2023-09-12 10:32:16 +02:00
bors[bot]
8e5a67b088
Merge #19870 #19900 #19902
19870: tests/gcoap_fileserver: only enable test with GCC r=benpicco a=benpicco





19900: gnrc_ipv6_nib: fix for border router with non-6lo interfaces r=benpicco a=benpicco





19902: tests/pkg/relic: skip CI testing with samr21-xpro and llvm toolchain r=benpicco a=aabadie



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-08-24 14:28:41 +00:00
Benjamin Valentin
d38379688d gnrc_ipv6_nib: fix for border router with non-6lo interfaces
A border router should not send router advertisements on it's 6LoWPAN
interfaces, but if it also has classic IPv6 downstream interfaces it
should very much do so.
2023-08-24 12:05:03 +02:00
bors[bot]
d1edbd94d6
Merge #19881 #19892
19881: drivers/stmpe811: fix initialization if callback function parameter is NULL r=benpicco a=gschorcht

### Contribution description

This PR fixes the `stmpe811` driver initialization if the callback function parameter `cb` is `NULL. This might be the case for example if the application uses the touch device in polling mode.

If the interrupt pin is initialized if the callback function parameter `cb` is `NULL`, the driver crashes the first time an interrupt is triggered. Therefore, the INT pin must be initialized only if also the callback function parameter `cb` is not `NULL`.

To be able to test the polling mode, this PR also includes a change of the `tests/drivers/stmpe811` application which introduces the environment variables `STMPE811_POLLING_MODE` `STMPE811_POLLING_PERIOD` and in the makefile.

### Testing procedure

1. Use a `stm32f429i-disc1` board and test it in polling mode:
   ```
   STMPE811_POLLING_MODE=1 BOARD=stm32f429i-disc1 make -C tests/drivers/stmpe811 flash term
   ```
   It should work as expected.
   ```
   main(): This is RIOT! (Version: 2023.10-devel-119-g26e7a-drivers/stmpe811_fix_cb_null)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Pressed!
   X: 113, Y:135
   X: 113, Y:135
   X: 113, Y:136
   Released!
   ```

2. Checkout master branch and cerry-pick commit 691a5e6308426ddc685e5a2c297238529211c258. The test application `tests/drivers/stmpe811` will crash once a touch event occur:
   ```
   main(): This is RIOT! (Version: 2023.10-devel-117-g91441)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Stack pointer corrupted, reset to top of stack
   FSR/FAR:
    CFSR: 0x00020000
    HFSR: 0x40000000
    DFSR: 0x00000008
    AFSR: 0x00000000
   Misc
   EXC_RET: 0xfffffff1
   *** RIOT kernel panic:
   HARD FAULT HANDLER
   ```

### Issues/PRs references

19892: pkg/tinydtls: allow to set buffer size from application again r=benpicco a=leandrolanzieri

### Contribution description

Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before.

### Testing procedure

Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors.


### Issues/PRs references
Reported in #19838


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2023-08-23 22:43:56 +00:00
Leandro Lanzieri
e65f1c41fe
sys/net/gcoap: configure DTLS buffer 2023-08-21 17:21:12 +02:00
Leandro Lanzieri
91001468f9
sys/net/nanocoap: configure DTLS buffer 2023-08-21 17:21:12 +02:00
bors[bot]
e56353cf24
Merge #19387 #19874 #19875
19387: drivers/atwinc15x0: support dynamic scanning and connection to AP r=benpicco a=fabian18



19874: coap: add missing option numbers r=benpicco a=JKRhb



19875: coap: add missing Content-Format definitions r=benpicco a=JKRhb



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.loc@MLPA-NB119.(none)>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Jan Romann <jan.romann@hs-emden-leer.de>
2023-08-21 13:49:27 +00:00
Fabian Hüßler
63ac792b8b net: add NETOPT_{SCAN, CONNECT, DISCONNECT} 2023-08-19 23:23:10 +02:00
Fabian Hüßler
b65002ecdc tests/net: add test for l2scan list module 2023-08-18 20:42:43 +02:00
Benjamin Valentin
ae28f11e3a gnrc_static: fix static PID assignment 2023-08-01 23:27:20 +02:00
Benjamin Valentin
5a0550e96e sys/net/sock: add sock_aux_ttl 2023-07-18 16:41:42 +02:00
Marian Buschsieweke
4709bbb952
sys/net/gnrc_lorawan: make clang happy
`clang` doesn't propagate the packed attribute to members. I think
this incorrect, but explicitly adding it won't hurt and makes clang
happy. So let's have it.
2023-07-18 12:24:08 +02:00
Fabian Hüßler
dd52f5fedd sys/net: add l2scan list module 2023-07-14 20:27:10 +02:00
bors[bot]
72ca81b65c
Merge #19487 #19808
19487: nanocoap: implement extended tokens (RFC 8974) r=benpicco a=benpicco



19808: boards: add ESP32-S3-USB-OTG support r=benpicco a=gschorcht

### Contribution description

This PR provides the support for the [ESP32-S3-USB-OTG](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/user_guide.html) board.

The SD card can only be used in SPI mode at the moment. As soon as PR #19786 is merged, the SD/MMC support can be enabled and the SD card can then be used in SD mode with 4-bit data bus width.

The display uses uses the ST7789 driver IC that is compatible with the ST7735. For that purpose the ST7735 driver is extended by a pseudomodule definition `st7789` for the ST7789 which is enabled by the board and enables automatically the `st7789` (e57c48a33ee2a869c15603788e5306ba066f91cf). Vise versa, board's `Makefile.dep` enables automatically the `st7789` pseudomodule if the `st7735` is used. The pseudomodule `st7789` is just used to increase the upper limit for supported lines. This change is also part of PR #19807.

~The PR includes a very small documentation fix for ESP32-S3-DevKit board that was noticed during the development of this board definition (1155b6ac1b8efa39d8a0bd7150e602095159fdc1).~

### Testing procedure

The board has been tested with all basic tests for supported hardware including `tests/driver/st3375`:

![IMG_20230707_105556](https://github.com/RIOT-OS/RIOT/assets/31932013/88d4ac11-0c02-4339-a423-7900e1c0904c)

- [x] tests/drivers/st3375
- [x] tests/periph/gpio
- [x] tests/periph/pwm
- [x] tests/periph/spi
- [x] tests/periph/uart
- [x] tests/sys/usbus_cdc_ecm 

### Issues/PRs references


Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-07 17:41:40 +00:00
bors[bot]
ddf1fe252d
Merge #19733 #19747 #19769 #19782
19733: cpu/msp430: reorganize code r=maribu a=maribu

### Contribution description

RIOT supports two distinct families of the MSP430: The [MSP430 x1xx] MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible MCU families the code was located in the msp430fxyz folder, resulting in case of the UART driver in particularly bizarre code looking roughly like this:

```C
#ifndef UART_USE_USCI
/* implementation of x1xx peripheral ... */
#else
/* implementation of F2xx/G2xx peripheral ... */
#endif
/* zero shared code between both variants */
```

This moves peripheral drivers shared between the two families to msp430_common and splits the SPI and UART driver into two MCU families.

In addition, it cleans up the `msp430_regs.h` by dropping most of it and using the macros and symbols provided by the vendor header files. There is little reason for us to maintain constants when TI is already doing that.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf


19747: gnrc/ipv6/nib: reset rs_sent counter also for not-6LN interfaces r=maribu a=fabian18



19769: cpu/nrf53: add initial support with nRF5340DK-APP board r=maribu a=dylad

### Contribution description

This PR adds support for nRF5340 MCU and its associated Nordic development board, nRF5340DK.
This MCU provides a dual Cortex-M33, one application core running at up to 128MHz, and one network core running at up to 64MHz.
Peripherals are inherited from others Nordic MCUs families so it shouldn't be hard to add more of them in followup PRs.

For now, only the minimal set of peripherals is supported:
- GPIO / GPIO_IRQ
- UART
- TIMER

### Testing procedure
Build the usual test application for the supported peripherals and flash the board.
nRF5340DK provides two serial ports on its embedded debugger. RIOT's shell should be available on the first one (/dev/ttyACM0)


### Issues/PRs references
#18576
#19267 


19782: cpu/msp430: fix for ti's msp430-gcc-opensource package ld version r=maribu a=hugueslarrive

### Contribution description
My msp430 toolchain (https://www.ti.com/tool/MSP430-GCC-OPENSOURCE) was broken by #19484:
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
/opt/ti/msp430-gcc/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: .rodata not found for insert
collect2: error: ld returned 1 exit status
make: *** [/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/../../Makefile.include:761 : /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf] Erreur 1
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version
GNU ld (Mitto Systems Limited - msp430-gcc 9.3.1.11) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+'
9.3
1.11
2.34
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+$'
2.34
```


### Testing procedure
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
   text	   data	    bss	    dec	    hex	filename
   8612	    722	    866	  10200	   27d8	/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
```


### Issues/PRs references
Introduced by #19484, highlighted in #16727.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 18:43:26 +00:00
bors[bot]
655211129e
Merge #19749
19749: sys/net/rpl: fix missing assignment operator r=maribu a=szsam




Co-authored-by: Mingjie Shen <shen497@purdue.edu>
2023-06-24 16:04:59 +00:00
bors[bot]
9ba1d78c55
Merge #19756
19756: all/gnrc: fix null pointer dereference r=miri64 a=szsam



Co-authored-by: Mingjie Shen <shen497@purdue.edu>
2023-06-23 05:13:31 +00:00
Mingjie Shen
51ff6c3675 all/gnrc: fix null pointer dereference
Check return values of following functions for null:
    - gnrc_netif_iter
    - gnrc_netif_hdr_build
    - gnrc_pktsnip_search_type
    - gnrc_netif_get_by_pid
    - gnrc_netif_hdr_get_netif
    - _nib_drl_get
2023-06-22 19:43:30 -04:00