1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/net
bors[bot] 46af92d3a0
Merge #18620 #19296 #19504 #19506
18620: core: add core_mutex_debug to aid debugging deadlocks r=maribu a=maribu

### Contribution description

Adding `USEMODULE += core_mutex_debug` to your `Makefile` results in
on log messages such as

    [mutex] waiting for thread 1 (pc = 0x800024d)

being added whenever `mutex_lock()` blocks. This makes tracing down
deadlocks easier.

### Testing procedure

Run e.g.

```sh
USEMODULE=core_mutex_debug BOARD=nucleo-f767zi make -C tests/mutex_cancel flash test
```

which should provide output such as

```
Welcome to pyterm!
Type '/exit' to exit.
READY
s
[mutex] waiting for thread 1 (pc = 0x8000f35)
START
main(): This is RIOT! (Version: 2022.10-devel-841-g5cc02-core/mutex/debug)
Test Application for mutex_cancel / mutex_lock_cancelable
=========================================================

Test without cancellation: OK
Test early cancellation: OK
Verify no side effects on subsequent calls: [mutex] waiting for thread 1 (pc = 0x800024d)
OK
Test late cancellation: [mutex] waiting for thread 1 (pc = 0x0)
OK
TEST PASSED
```

```sh
$ arm-none-eabi-addr2line -a 0x800024d -e tests/mutex_cancel/bin/nucleo-f767zi/tests_mutex_cancel.elf 
0x0800024d
/home/maribu/Repos/software/RIOT/tests/mutex_cancel/main.c:51
```

### Issues/PRs references

Depends on and includes https://github.com/RIOT-OS/RIOT/pull/18619

19296: nanocoap: allow to define CoAP resources as XFA r=maribu a=benpicco



19504: cpu/cc26xx_cc13xx: Fix bogus array-bound warning r=maribu a=maribu

### Contribution description

GCC 12 create a bogus array out of bounds warning as it assumes that because there is special handling for `uart == 0` and `uart == 1`, `uart` can indeed be `1`. There is an `assert(uart < UART_NUMOF)` above that would blow up prior to any out of bounds access.

In any case, optimizing out the special handling of `uart == 1` for when `UART_NUMOF == 1` likely improves the generated code and fixes the warning.

    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:88:8: error: array subscript 1 is above array bounds of 'uart_isr_ctx_t[1]' [-Werror=array-bounds]
       88 |     ctx[uart].rx_cb = rx_cb;
          |     ~~~^~~~~~
    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:52:23: note: while referencing 'ctx'
       52 | static uart_isr_ctx_t ctx[UART_NUMOF];
          |                       ^~~
    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:89:8: error: array subscript 1 is above array bounds of 'uart_isr_ctx_t[1]' [-Werror=array-bounds]
       89 |     ctx[uart].arg = arg;
          |     ~~~^~~~~~
    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:52:23: note: while referencing 'ctx'
       52 | static uart_isr_ctx_t ctx[UART_NUMOF];
          |                       ^~~

### Testing procedure

The actual change is a pretty obvious one-liner, so that code review and a green CI should be sufficient. If not, running any UART example app without regression should do.

### Issues/PRs references

None

19506: tools/openocd: Fix handling of OPENOCD_CMD_RESET_HALT r=maribu a=maribu

### Contribution description

The OPENOCD_CMD_RESET_HALT was not longer correctly passed to the script. This fixes the issue.

### Testing procedure

Flashing of e.g. the `cc2650-launchpad` with upstream OpenOCD should work again.

### Issues/PRs references

The change was added to https://github.com/RIOT-OS/RIOT/pull/19050 after testing the PR and before merging. I'm not sure if the fix never worked because of this, or if behavior of `target-export-variables` or GNU Make changed.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-04-25 15:46:11 +00:00
..
bluetil
cord cord: bump reference from draft to rfc 2023-03-08 11:50:55 +01:00
dhcpv6 sys/net/dhcpv6: let dhcpv6_client_req_ia_pd() return error 2023-02-01 23:25:22 +01:00
dns includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
ethernet
fib
gcoap Merge #18414 2023-01-16 22:23:46 +00:00
gnrc gnrc_sixlowpan_frag_sfr_congure: add congure_abe support 2023-03-01 20:23:32 +01:00
iana
ieee802154 ieee802154/radio: fix blocking cca function 2023-01-17 11:30:59 +01:00
ipv4 treewide: fix typos found by recent codespell 2022-11-24 14:53:48 +01:00
ipv6 sys/net/ipv6: add ipv6_prefix_from_str() 2022-12-11 23:34:09 +01:00
lorawan gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
nanocoap nanocoap_link_format: add helper function to parse link format 2022-12-11 23:39:47 +01:00
netstats
ppp
rpl sys/net/gnrc/rpl: refactor netstats_rpl_t 2022-06-30 09:48:45 +02:00
sixlowpan nib/_nib-6ln: correct ABR timeout in ABRO 2022-09-29 10:48:49 +02:00
skald net/ble/skald: let itvl be configured per context 2022-05-24 13:02:10 +02:00
sock net/sock/udp: add sock_udp_ep_is_multicast() 2023-03-07 16:58:17 +01:00
af.h sys/include/net/af: fix doc comment 2022-04-14 09:23:27 +02:00
arp.h
asymcute.h
ble.h
coap.h nanocoap_sock: implement DTLS socket 2023-01-13 00:17:32 +01:00
credman.h includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
csma_sender.h
dhcpv6.h doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
dns_mock.h sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns 2022-04-03 17:29:10 +02:00
dns.h sys/dns: select appropriate address family if AF_UNSPEC 2022-12-07 22:26:51 +01:00
dsm.h
dtls.h dtls, tinydtls: Raise default number of connections 2023-03-02 09:16:22 +01:00
eddystone.h
emcute.h
ethernet.h
ethertype.h
eui48.h
eui64.h
eui_provider.h
fib.h fib: document unused state 2023-02-22 16:47:14 +01:00
gcoap.h doc/gcoap: Update ToDo item referencing abandoned document 2023-02-21 20:22:46 +01:00
gnrc.h net/gnrc: Fixing whitespace in the documentation 2022-04-29 14:19:25 +02:00
icmp.h
icmpv6.h
ieee802154_security.h sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
ieee802154.h net/ieee802154: add option for default ack request 2022-12-14 16:29:01 +01:00
inet_csum.h
ipv4.h
ipv6.h
l2filter.h
l2util.h
lora.h includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
loramac.h includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
mqttsn.h
nanocoap_sock.h nanocoap_server: add nanocoap_server_auto_init 2023-03-22 14:43:19 +01:00
nanocoap_vfs.h nanocoap_vfs: add nanocoap_vfs_put() 2022-06-08 17:19:03 +02:00
nanocoap.h gcoap: include CoAP resrouces from NANOCOAP_RESOURCE() XFA 2023-03-09 14:09:15 +01:00
ndp.h
netdev_test.h
netif.h sys/net/netif: add helpers for IPv6 addresses 2022-06-06 20:46:48 +02:00
netopt.h gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
netstats.h
ntp_packet.h
packet.h
ppptype.h
protnum.h
sixlowpan.h
skald.h net/ble/skald: let itvl be configured per context 2022-05-24 13:02:10 +02:00
sntp.h
sock.h gnrc_sock_udp: accept response from any address if remote is multicast 2022-11-15 11:26:31 +01:00
someip.h doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
tcp.h
telnet.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
udp.h
uhcp.h
utils.h sys/net/netutils: add netutils_get_ipv4() 2022-03-08 13:35:32 +01:00
zep.h