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

46629 Commits

Author SHA1 Message Date
Benjamin Valentin
f2d5a4cad9 examples/sock_tcp_echo: add TCP echo client / server 2024-11-12 00:22:38 +01:00
mguetschow
d86738f057
Merge pull request #20970 from crasbe/pr/nRF_OpenOCD
cpu/nRF52: Always recover Device before Flashing
2024-11-11 08:29:41 +00:00
Marian Buschsieweke
5d76abffa1
Merge pull request #20951 from maribu/makefiles/improve-tty-select-cmd-handling
makefiles/serial: better MOST_RECENT_PORT=1 for CDC ACM
2024-11-10 19:14:07 +00:00
Marian Buschsieweke
cec85cfc88
Merge pull request #20945 from maribu/sys/net/gcoap/replace-super-insane-hack-with-less-insane-hack
sys/net/gcoap: reduce insanity of hack
2024-11-08 20:03:37 +00:00
crasbe
168829f865 boards/nrf52: always recover device before flashing with OpenOCD 2024-11-08 16:04:35 +01:00
crasbe
5d7194a4ee makefiles: introduce OPENOCD_POST_INIT_CMDS 2024-11-08 16:03:17 +01:00
Marian Buschsieweke
1672c0e613
Merge pull request #20956 from HavingaThijs/cc2538_crc_bit
cpu/cc2538: use RX FIFO count to determine CRC OK location
2024-11-08 12:49:36 +00:00
Dylan Laduranty
6401abbd92
Merge pull request #20850 from dylad/pr/cpu/saml21/compat_headers
cpu/saml21: add compatibily headers for vendor files migration
2024-11-08 08:14:28 +00:00
Marian Buschsieweke
6a19004aa1
Merge pull request #20963 from maribu/clang-format/line-limit
.clang-format: Set ColumnLimit to 0
2024-11-08 05:54:50 +00:00
Dylan Laduranty
a9cb19dcc5 cpu/samr30: create compatibility headers for vendor files migration
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-11-07 21:25:03 +01:00
Dylan Laduranty
7d83c7a9d2 cpu/samr34: create compatibility headers for vendor files migration
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2024-11-07 21:22:23 +01:00
benpicco
d65dec6ab5
Merge pull request #20960 from maribu/build_system/xfa/fix-alignment
build_system/xfa: change API to fix alignment
2024-11-07 16:16:28 +00:00
Marian Buschsieweke
2b6f65a08a
build_system/xfa: change API to fix alignment
This changes the API of xfa from

    XFA(array_name, prio) type element_name = INITIALIZER;

to

    XFA(type, array_name, prio) element_name = INITIALIZER;

this allows forcing natural alignment of the type, fixing failing tests
on `native64`.
2024-11-07 16:30:01 +01:00
Marian Buschsieweke
30a3057bdb
.clang-format: Set ColumnLimit to 0
This disables adding/removing line breaks by `clang-format`, as this
could very well introduce regressions in code formatting in terms of
our coding convention: If a long array was matching the soft limit of 80
chars per line, `clang-format` would reflow it to match the hard limit
of 100 chars.

One can selectively disable `clang-format` with magic comments. But at
this point, I'd say we should rather disable this feature until we
can configure it in a way to match our coding convention better (without
having to add magic comments).
2024-11-07 16:16:04 +01:00
mguetschow
76b9b711a8
Merge pull request #20962 from maribu/tests/sys/shell_lock/test-robustness
tests/sys/shell_lock: increase robustness of the test
2024-11-07 12:21:04 +00:00
Marian Buschsieweke
abb666bf73
tests/sys/shell_lock: increase robustness of the test
Before the test used the `help` command to verify that access to the
shell is present. While this does have the benefit of not requiring a
custom command, it does have some robustness issues:

- When new default commands get added, this test will fail
- When the help message of a command gets reworded, the test will fail
- When the order of commands in the test will change, the test will fail
    - Note that with the XFA based `SHELL_COMMAND()` macro, we do not
      guarantee any particular order. Specifically, the order can change
      with implementation details.
2024-11-07 10:45:50 +01:00
Marian Buschsieweke
2839224594
tests/build_system/xfa: improve test coverage
This increases the test coverage for XFA:

- Multiple entries are added from a single file
- Priorities are assigned to enforce a given order
- The size of the `struct` to add is changed to no longer be a power of
  2
2024-11-06 19:34:35 +01:00
Thijs Havinga
81358aa7b3
cpu/cc2538: use RX FIFO count to determine CRC OK location 2024-11-06 14:41:37 +01:00
benpicco
9c55be7237
Merge pull request #20954 from benpicco/mutex_init_locked
core/mutex: add `mutex_init_locked()`
2024-11-06 12:09:56 +00:00
Benjamin Valentin
46ecf82e24 core/mutex: add mutex_init_locked() 2024-11-06 12:53:17 +01:00
Marian Buschsieweke
06aaf648e3
Merge pull request #20953 from Enoch247/add-u8g2-to-displays-doc-group
pkg/u8g2: add to the displays doc group
2024-11-06 11:37:06 +00:00
Joshua DeWeese
01fd2195db pkg/u8g2: add to the displays doc group 2024-11-05 20:09:41 -05:00
Marian Buschsieweke
d10ab413a0
Merge pull request #20952 from benpicco/nanocoap-block_robust
nanocoap/sock: re-try if wrong block was received
2024-11-05 17:24:17 +00:00
Benjamin Valentin
9b25c033de nanocoap/sock: re-try if wrong block was received 2024-11-05 18:06:31 +01:00
Marian Buschsieweke
c70075b073
Merge pull request #20950 from maribu/sys/net/nanocoap/coap_get_response_hdr_len
sys/net/nanocoap: add and use coap_get_response_hdr_len()
2024-11-05 13:09:51 +00:00
Marian Buschsieweke
fdac725d8c
makefiles/serial: better MOST_RECENT_PORT=1 for CDC ACM
- Allow specifying an alternative board filter for the bootloader TTY,
  as this will present different vendor, model, and serial than RIOT's
  USB implementation.
- Allow specifying the serial. This is useful when multiple CDC ACM
  devices are present.
2024-11-05 13:21:16 +01:00
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
benpicco
27343666dc
Merge pull request #20949 from maribu/sys/net/nanocoap/fix-coap_build_reply_header
sys/net/nanocoap: fix `coap_build_reply_header()`
2024-11-05 08:52:15 +00:00
Marian Buschsieweke
e52659c4cd
tests/unittests: Increase test coverage for coap_build_reply_header()
This increases test coverage for coap_build_reply_header() for the case
that extended tokens are used. The test validates the correctness of
the return value and the correctness of the assembled reply.
2024-11-04 21:18:08 +01:00
Marian Buschsieweke
2c93dc9c3b
sys/net/nanocoap: fix coap_build_reply_header()
In case no payload is added, `coap_build_reply_header()` would return
`sizeof(coap_hdr_t) + token_length` regardless of the actual header
length returned by `coap_build_hdr()`. These can be different if
RFC 8974 extended tokens are enabled (module `nanocoap_token_ext`
used): If an extended token length field is used, its size is not
considered.

Co-authored-by: benpicco <benpicco@googlemail.com>
2024-11-04 21:18:07 +01:00
Marian Buschsieweke
afb16bb705
Merge pull request #20570 from maribu/doc/coding-convention/IWYU
CODING_CONVENTIONS.md: Add IWYU policy
2024-11-04 15:27:48 +00:00
Marian Buschsieweke
ffeb46fc42
CODING_CONVENTIONS.md: Add IWYU policy
This makes an implicit agreement that code should include the headers
is uses, no more and no less, explicit.

It also recommends using tooling (such as clangd) and adding IWUY
pragma comments to aid those tools in common cases they otherwise would
provide false positives.

Co-authored-by: chrysn <chrysn@fsfe.org>
2024-11-04 16:24:28 +01:00
mguetschow
6ac70c4d16
Merge pull request #20947 from krzysztof-cabaj/nucleo-l433rc-pinout
boards/nucleo-l433rc: add pinout to documentation page
2024-11-04 11:44:47 +00:00
krzysztof-cabaj
33ddeb60ee boards/nucleo-l433rc: add pinout to board page 2024-11-01 20:16:21 +01:00
krzysztof-cabaj
cbe8333538 boards/nucleo-l433rc: add pinout file 2024-11-01 20:16:16 +01:00
Marian Buschsieweke
5ae4c96cba
Merge pull request #20946 from maribu/sys/nanocoap/fix-header-size-computation
sys/net/nanocoap: fix coap_get_total_hdr_len()
2024-11-01 15:39:35 +00:00
Marian Buschsieweke
765dc3a299
sys/net/gcoap: reduce insanity of hack
gcoap contains a hack where a `coap_pkt_t` is pulled out of thin air,
parts of the members are left uninitialized and a function is called on
that mostly uninitialized data while crossing fingers hard that the
result will be correct. (With the current implementation of the used
function this hack does actually work.)

Estimated level of insanity: 😱😱😱😱😱

This adds to insane functions to get the length of a token and the
length of a header of a CoAP packet while crossing fingers hard that
the packet is valid and that the functions do not overread.

Estimated level of insanity: 😱😱😱

The newly introduced insane functions are used to replace the old
insane hack, resulting in an estimated reduction of insanity of 😱😱.

Side note: This actually does fix a bug, as the old code did not take
           into account the length of the extended TKL field in case of
           RFC 8974 being used. But that is a bug in the abused API,
           and not in the caller abusing the API.
2024-11-01 16:32:59 +01:00
Marian Buschsieweke
2b3da3911c
tests/unittests: increase coverage for coap_get_total_hdr_len()
Previously the corner case when RFC 8974 extended TKL fields are used
the result of coap_get_totel_hdr_len() was not tested, resulting in a
bug slipping through the test. This increase the test coverage.
2024-11-01 13:59:20 +01:00
Marian Buschsieweke
469edf4827
sys/net/nanocoap: fix coap_get_total_hdr_len()
Before `coap_get_total_hdr_len()` did not take the extended TKL field
(RFC 8974) into account. This fixes the issue.
2024-11-01 13:58:34 +01:00
mguetschow
00e25adfe3
Merge pull request #20720 from netd-tud/chacha20-glue-code-implementation
sys/psa_crypto: one-shot Chacha20 support
2024-10-29 16:52:30 +00:00
benpicco
1fc9d1bb82
Merge pull request #20934 from LasseRosenow/pthread-attr-setstack
sys/posix/pthread: Add pthread_attr_getstack and pthread_attr_setstack
2024-10-29 16:17:51 +00:00
Lasse Rosenow
459b8dc6aa
sys/posix/pthread: Add pthread_attr_getstack and pthread_attr_setstack 2024-10-29 13:29:54 +00:00
Marian Buschsieweke
02e059546f
Merge pull request #20944 from maribu/sys/usbus/stable-ids
sys/usb: Use luid_base for stable USB serials
2024-10-29 09:10:31 +00:00
mguetschow
94bb7b2915
Merge pull request #20943 from maribu/sys/luid/get/fixed_width
sys/luid: luid_custom() use fixed width int
2024-10-29 08:46:27 +00:00
Marian Buschsieweke
6b80a1a61e
sys/usb: Use luid_base for stable USB serials
This is useful when having multiple instances of the same board
connected via USB CDC ACM and telling the TTYs apart.
2024-10-29 09:40:22 +01:00
Marian Buschsieweke
49c151e432
sys/luid: luid_custom() use fixed width int
This changes the type of the last parameter of `luid_custom()` to a
fixed width integer for consistent behavior among different
architectures.
2024-10-28 14:51:44 +01:00
Teufelchen
b376bec667
Merge pull request #20847 from benpicco/event_assert
sys/event: add assertion that event has a handler
2024-10-25 08:11:51 +00:00
Marian Buschsieweke
ba83fefe3b
Merge pull request #20936 from maribu/drivers/periph_gpio/gpio_read/bool
drivers/periph_gpio: let gpio_read() return bool
2024-10-24 20:43:55 +00:00
benpicco
ae36fa4b37
Merge pull request #20921 from Vjorald/cord-doc
sys/net/app/cord: update doc
2024-10-24 16:59:01 +00:00
mguetschow
fbde0209d1
Merge pull request #20933 from benpicco/sys/net/application_layer/gcoap-ipv4
gcoap: fix build with IPv4
2024-10-24 09:28:23 +00:00