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

104 Commits

Author SHA1 Message Date
Marian Buschsieweke
68beb52f14
sys/net/nanocoap: add and use coap_get_response_hdr_len()
Before, handlers writing blockwise transfer assumed that the response
header length will match the request header length. This is true for
UDP, but not for TCP: The CoAP over TCP header contains a Len field,
that gets extended for larger messages. Since the reply often is indeed
larger than the request, this is indeed often the case for CoAP over
TCP.

Note: Right now, no CoAP over TCP implementation is upstream. However,
      getting rid of incorrect assumptions now will make life easier
      later on.
2024-11-05 10:46:02 +01:00
Fabian Hüßler
9dfdf2b319 examples/nanocoap_server: 5.03 only for different requests to /separate 2024-05-27 17:58:44 +02:00
benpicco
3f41494e59
Merge pull request #20266 from benpicco/nanocoap_reply_separate
nanocoap_sock: implement separate response
2024-05-21 17:45:22 +00:00
Benjamin Valentin
63d5a5aafa examples/nanocoap_server: add endpoint with separate response 2024-05-21 19:27:57 +02:00
Benjamin Valentin
7e69c13630 nanocoap_sock: implement nanocoap_sock_send_separate() 2024-05-21 19:27:57 +02:00
chrysn
756a384442 makefiles, treewide: Remove MCU variable 2024-02-18 20:46:09 +01:00
benpicco
4d9e8a8dde
Merge pull request #20335 from fzi-haxel/pr/native64-board
native64: Separate board for 64-bit native
2024-02-05 22:58:02 +00:00
Frederik Haxel
5ed0bafc92 examples, tests: Changes for the native64 board
- Adapted build system and test checks for the native boards to include native64
- Added `native64` to the same tests as `native`
2024-02-05 22:02:14 +01:00
Benjamin Valentin
85cfcafdf6 boards/weact-g030f6: add new board 2024-02-05 00:45:42 +01:00
benpicco
d00fdcb301
Merge pull request #20030 from benpicco/nanocoap_fileserver
gcoap_fileserver: rename to nanocoap_fileserver
2024-02-01 09:08:49 +00:00
Benjamin Valentin
e1f64ffc62 examples/nanocoap_server: use nanocoap_fileserver 2024-01-30 16:59:00 +01:00
Jason Parker
a2f4a13beb boards/nucleo-c031c6 initial add 2024-01-30 10:11:57 -05:00
Frederik Haxel
314dbf15b9 examples: Use size_t print format specifier
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-12-21 12:02:34 +01:00
Marian Buschsieweke
82d98ed377
examples, tests: update Makefile.ci for AVR8
Ran dist/tools/insufficient_memory for all AVR8 boards.
2023-12-01 19:37:05 +01:00
Hugues Larrive
3c465836f2 examples and tests: add atmega8 to relevent Makefile.ci
using dist/tools/insufficient_memory/add_insufficient_memory_board.sh
2023-07-11 21:22:02 +02:00
Marian Buschsieweke
e7d1c4abc0
boards/olimex-msp430-h1611: new board 2023-05-16 15:03:12 +02:00
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
Benjamin Valentin
88789454dd examples/nanocoap_server: enable fileserver for large boards 2023-03-09 14:09:15 +01:00
Benjamin Valentin
13aa272616 examples/nanocoap_server: define CoAP resources as XFA 2023-02-28 20:13:18 +01:00
Marian Buschsieweke
7e58bea1bd
examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
Benjamin Valentin
4fe202db1e examples: check return value of coap_build_reply()
`coap_build_reply()` may return negative values on error or
0 in the no-response case.

Don't use it to calculate a payload offset without checking first.
2022-11-04 20:00:51 +01:00
Benjamin Valentin
598494f75f examples: make use of coap_request_ctx_t 2022-07-17 14:32:16 +02:00
Marian Buschsieweke
501a5b951f
examples/nanocoap_server: use netifs_print_ipv6() 2022-06-06 20:46:48 +02:00
Karl Fessel
e03cf052ba example/nanocoap_server: include kernel_defines.h 2022-02-12 18:30:58 +01:00
Karl Fessel
53387d83e8 example/nanocoap_server: depends on xtimer 2021-12-14 22:53:01 +01:00
Dave VanKampen
55ea8cfb97 boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
Benjamin Valentin
9a6fc85b16 treewide: replace gnrc_netdev_default with netdev_default 2021-09-06 15:43:40 +02:00
Gerson Fernando Budke
d02efca65d Revert "examples: Exclude atxmega-a1u-xpro board due low mem"
This reverts commit d23b139938.
2021-08-24 08:35:41 -03:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Karl Fessel
827572d771 examples/nanocoap_server: remove unneed case block 2021-04-27 10:16:15 +02:00
krzysztof-cabaj
68ccf36754 examples/nanocoap_server: fix a buffer overflow bug 2021-04-26 05:52:03 -04:00
Gerson Fernando Budke
4a9f0efb6d boards: introduce atmega328p-xplained-mini
Add ATmega328P Xplained Mini board.  The board is an official
development kit from MCHP based on the Arduino UNO, reduced
hardware, with a xplainedmini debugger and CDC ACM serial
converter.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-27 14:10:19 -03:00
Gerson Fernando Budke
d23b139938 examples: Exclude atxmega-a1u-xpro board due low mem
Add atxmega-a1u-xpro board to BOARD_INSUFFICIENT_MEMORY list to
exclude examples since board don't have enough data memory.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2021-03-15 20:16:10 -03:00
Benjamin Valentin
ae4d7ee116 Makefile.ci: add zigduino 2021-02-09 15:26:03 +01:00
Benjamin Valentin
4f587bedb5 examples: add bluepill-stm32f030c8 to Makefile.ci 2021-02-02 23:47:40 +01:00
Bas Stottelaar
6fc50c9d0d examples: add to BOARD_INSUFFICIENT_MEMORY 2021-01-06 23:44:54 +01:00
Benjamin Valentin
f35b5dbed9 examples: add samd10-xmini to Makefile.ci 2020-12-11 18:25:36 +01:00
Akshai M
977390f7f9 Kconfig/pktbuf : Fix check for "CONFIG_GNRC_PKTBUF_SIZE" 2020-10-16 16:02:03 +05:30
13e56b3e3e
examples: skip nucleo-l011k4 where it doesn't fit 2020-10-15 18:52:51 +02:00
Benjamin Valentin
f34f970503 examples: add stk3200 to Makefile.ci 2020-10-06 16:43:47 +02:00
Martine S. Lenders
4696a773de
examples / tests: pull in sock API not implementation 2020-09-07 08:45:25 +02:00
f08f582f1a tests, examples: remove chronos references 2020-08-05 14:32:58 +02:00
67843a2b11
examples: test: remove remaining occurences of wsn430 2020-07-10 16:49:08 +02:00
Akshai M
6450d9989e gnrc/pktbuf : Set Kconfig defaults and conditions
Set Kconfig defaults for CPU and conditions to avoid
conflict with CFLAGS

Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2020-06-11 14:47:27 +05:30
Akshai M
5523d119b6 gnrc/pktbuf : Move 'GNRC_PKTBUF_SIZE' to 'CONFIG_' 2020-06-11 14:46:36 +05:30
Leandro Lanzieri
4052c01e85
net/nanocoap: Move NANOCOAP_URI_MAX to 'CONFIG_' namespace 2020-04-07 17:00:53 +02:00
chudov
0a151a78da boards/derfmega*: initial support 2019-11-27 20:53:14 +01:00
Marian Buschsieweke
4cf2151248
Merge pull request #12537 from benpicco/at86rfmega
drivers/at86rf2xx: add support for ATmegaRF MCUs
2019-10-28 09:22:02 +01:00
Benjamin Valentin
d45b3d1cd3 makefiles: default-channel.inc.mk -> default-radio-settings.inc.mk
The scope of the file has changed, so change it's name.
2019-10-27 11:55:55 +01:00
Benjamin Valentin
eeb75c08bd tests/examples: add microduino-corerf to Makefile.ci
Now that the radio is enabled, some tests do not fit onto the MCU
anymore.
2019-10-27 00:18:23 +02:00