1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples
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
..
arduino_hello-world example/arduino_hello-wold: add building BOARD default 2022-02-28 22:00:21 +01:00
asymcute_mqttsn examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
benchmark_udp examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
bindist examples/bindist: cleanup and fix formatting in README 2019-01-22 07:37:36 +01:00
blinky examples/blinky: use coreclk() instead of CLOCK_CORECLOCK 2021-12-15 13:14:19 +01:00
ccn-lite-relay examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
cord_ep examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
cord_epsim examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
cord_lc examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
default examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
dtls-echo boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
dtls-sock boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
dtls-wolfssl examples/dtls-wolfssl: Update insufficient flash board list 2023-03-08 20:29:15 +00:00
emcute_mqttsn examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
filesystem examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gcoap examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gcoap_block_server examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gcoap_dtls examples/gcoap_dtls: blacklist GD32V boards 2023-02-21 15:04:13 +01:00
gcoap_fileserver examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_border_router Merge #19321 #19325 #19327 #19328 2023-02-27 16:30:53 +00:00
gnrc_lorawan examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_minimal examples/gnrc_minimal: use netifs_print_ipv6() 2022-06-06 20:46:48 +02:00
gnrc_networking examples/gnrc_networking: remove microduino-corerf from Makefile.ci 2023-02-27 17:15:21 +01:00
gnrc_networking_mac examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
gnrc_networking_subnets examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
hello-world examples: adapt DEVELHELP switch 2017-11-28 19:25:10 +01:00
ipc_pingpong examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
javascript examples: add sipeed-longan-nano to Makefile.ci 2023-01-24 00:39:43 +01:00
lorawan examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
lua_basic boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
lua_REPL examples: Update Makefile.ci 2023-01-12 08:39:41 +01:00
micropython boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
nanocoap_server Merge #18620 #19296 #19504 #19506 2023-04-25 15:46:11 +00:00
ndn-ping examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
nimble_gatt pkg/nimble/autoadv: add support for ext_adv 2022-04-27 08:22:58 +02:00
nimble_heart_rate_sensor pkg/nimble/autoadv: add support for ext_adv 2022-04-27 08:22:58 +02:00
nimble_scanner sys/shell_commands: convert to SHELL_COMMAND() 2022-06-07 09:25:04 +02:00
openthread examples/openthread: adapt to update in package support 2021-11-22 15:22:27 +01:00
paho-mqtt examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
posix_select boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
posix_sockets examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
riot_and_cpp treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
rust-gcoap Rust: Update riot-wrappers 2023-04-25 09:20:58 +02:00
rust-hello-world Rust: Update riot-wrappers 2023-04-25 09:20:58 +02:00
saul examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
senml_saul sys/senml: add SenML modules 2022-02-11 12:38:21 +01:00
skald_eddystone examples/skald_eddystone: explicitly config itvl 2022-05-24 13:02:10 +02:00
skald_ibeacon examples/skald_ibeacon: explicitly configure itvl 2022-05-24 13:02:10 +02:00
sniffer examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
spectrum-scanner examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
suit_update examples/suit_update: blacklist GD32V boards 2023-04-18 06:20:14 +02:00
telnet_server examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_duel examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
timer_periodic_wakeup examples/timer_periodic_wakeup: switch to ztimer 2022-12-01 18:37:01 +01:00
twr_aloha boards/xg23-pk6068a: initial commit 2022-10-26 11:27:22 +02:00
usbus_minimal examples/usbus_minimal/Makefile: remove unneeded SHOULD_RUN_KCONFIG 2020-11-04 09:35:35 +01:00
wakaama boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
wasm boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
.gitignore examples,tests: ignore core dumps via .gitignore 2022-08-31 15:05:14 +02:00