Benjamin Valentin
b729fe3237
sys/shell: add RIOT_VERSION_EXTRA output
...
This allows to define an extra string that will be output as part
of the version command.
e.g. an application may define
RIOT_VERSION_EXTRA += v1.33.7
RIOT_VERSION_EXTRA += flashed by $(shell whoami
2024-02-05 14:18:14 +01:00
benpicco
85dcc1bd3b
Merge pull request #19742 from benpicco/shell_cmd_udptty
...
shell/cmds: add udptty command
2024-02-02 16:28:26 +00:00
Benjamin Valentin
13deed1a83
shell/cmds: add udptty command
2024-02-02 12:55:25 +01:00
benpicco
22dbbf4a07
Merge pull request #20319 from chrysn-pull-requests/rust-simplifications
...
makefiles/cargo: Remove CARGO_CHANNEL and other simplifications
2024-02-02 08:07:02 +00:00
Marian Buschsieweke
3b3da09ec6
Merge pull request #20313 from maribu/sys/byteorder/cleanup-implementation
...
sys/byteorder: clean up implementation
2024-02-02 05:38:33 +00:00
Marian Buschsieweke
e14b309c42
sys/byteorder: clean up implementation
...
This changes the implementation to be solely build upon `endian.h`
and `unaligned.h`.
This turns `byteorder.h` basically in syntactic sugar on top of the
`<endian.h>` API, reducing the complexity of the implementation and,
hence, the maintenance effort.
Note that yields a small ROM reduction as well *yeah!*
```
make BOARD=nrf52840dk RIOT_CI_BUILD=1 BUILD_IN_DOCKER=1 -C tests/unittests
```
Yields before this commit:
```
text data bss dec hex filename
417788 2200 28640 448628 6d874 /data/riotbuild/riotbase/tests/unittests/bin/nrf52840dk/tests_unittests.elf
```
And with this commit:
```
text data bss dec hex filename
417756 2200 28640 448596 6d854 /data/riotbuild/riotbase/tests/unittests/bin/nrf52840dk/tests_unittests.elf
```
2024-02-01 18:24:40 +01:00
Benjamin Valentin
7cbf516e3b
event_periodic_callback: add getter for interval & count
2024-02-01 17:11:37 +01:00
chrysn
16153d73cc
rust: Selectively update riot-wrappers and -sys
...
This pulls in embedded-nal 0.7 implementations, and (on both crates)
alterations that decouple riot-wrappers from riot-sys and simplify build
system integration, and do away with the need for passing
RIOT_USEMODULE.
2024-02-01 13:53: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
benpicco
4934504c93
Merge pull request #20314 from benpicco/nanocoap_sock-debug
...
nanocoap_sock: improve debug output
2024-01-31 21:20:09 +00:00
Marian Buschsieweke
9723a8d5f4
sys/endian: move form sys/libc
...
Move the <endian.h> header from `sys/libc/include` to `sys/include`.
2024-01-31 20:14:46 +01:00
Marian Buschsieweke
10e896390d
sys/libc/endian.h: fix compilation with older newlib
...
Older versions of newlib already provide the magic endian numbers
via `machine/endian.h`, which may be indirectly included. This changes
the header to only provide the macros if the are not provided otherwise.
For sanity, it checks if the values are indeed the expected magic
numbers, even if provided from other sources.
2024-01-31 14:50:36 +01:00
Marian Buschsieweke
0d01356c9c
sys/libc/endian: fix compilation on AVR
...
There is no need to use `__uint16_t` instead of `uint16_t` etc., so
let's just go with `uint16_t` and have AVR GCC happy.
2024-01-31 14:46:24 +01:00
Marian Buschsieweke
e5f69206ad
sys/libc/endian.h: fix magic constants
...
The constants BIG_ENDIAN etc. were not consistently defined. This
bug was not caught by the unit tests, as the preprocessor would
treat undefined macros as being `0` in numeric comparisons, hence
the following test did select the correct implementation:
```C
#if BYTE_ORDER == LITTLE_ENDIAN
/* correct implementation for all currently supported boards */
#endif
```
This adds now an explicit test to the unit tests to ensure that the
magic numbers are consistently the correct values. Hence, this bug
should no longer be able to sneak in.
Co-authored-by: Teufelchen <9516484+Teufelchen1@users.noreply.github.com>
2024-01-31 14:46:24 +01:00
Han Xinrong
bf3c038fa9
sys/random/fortuna/fortuna.c:add error check of aes_encrypt()
2024-01-30 19:04:01 +01:00
Benjamin Valentin
be399d59d0
gcoap_fileserver: rename to nanocoap_fileserver
2024-01-30 16:59:00 +01:00
Benjamin Valentin
a76feeb70e
nanocoap_sock: improve debug output
2024-01-30 16:33:55 +01:00
benpicco
7c8c522a73
Merge pull request #20309 from jia200x/pr/fix_tnt_loopback
...
gnrc_ipv6: fix double-free when pinging TNT loopback address
2024-01-30 11:54:48 +00:00
Marian Buschsieweke
e085ad02af
Merge pull request #20310 from maribu/libc/endian
...
sys/libc: add endian.h
2024-01-30 11:48:45 +00:00
Marian Buschsieweke
68018fe182
sys/libc: add endian.h
...
This provides glibc, NetBSD, FreeBSD compatible endian.h header with a
lean and simple API to convert between host byte order to little endian
and big endian and the other way around.
2024-01-30 10:59:28 +01:00
chrysn
55cbb7bdfa
Merge pull request #20303 from chrysn-pull-requests/rust-updates
...
treewide: Rust updates
2024-01-29 19:54:32 +00:00
Jose Alamos
8dc5e9109e
gnrc_ipv6: fix double free when pinging TNT loopback address
2024-01-29 14:34:41 +01:00
Fabian Hüßler
278dec22b1
vfs: fix FATFS_VFS_FILE_BUFFER_SIZE for increased VFS_NAME_MAX
2024-01-29 11:54:21 +01:00
chrysn
002cd42e26
treewide: cargo update
2024-01-27 09:41:26 +01:00
benpicco
2d459157f1
Merge pull request #20284 from benpicco/coap_build_reply_header
...
nanocoap: add coap_build_reply_header()
2024-01-24 22:00:57 +00:00
chrysn
52b0c8087b
Merge pull request #20294 from Teufelchen1/chore/rpl_format
...
routing/rpl: Fixing styling & format
2024-01-24 12:08:05 +00:00
Teufelchen1
1407d4b638
net/rpl: Major style fixes using uncrustify
2024-01-24 11:47:28 +01:00
Teufelchen1
8f6d5b2cb4
net/rpl: Minor style fixes
2024-01-24 11:45:32 +01:00
benpicco
ded97c36f0
Merge pull request #20285 from benpicco/gnrc_loopback-linklocal
...
gnrc/ipv6: only send link-local loopback if it's on the same interface
2024-01-23 21:48:54 +00:00
Benjamin Valentin
c71b5ae617
nanocoap: implement coap_reply_simple() using coap_build_reply_header()
2024-01-23 19:16:59 +01:00
Benjamin Valentin
158c1b8fa8
nanocoap: add coap_build_reply_header()
2024-01-23 19:16:59 +01:00
Benjamin Valentin
a6ef93fc71
nanocoap: make use of COAP_PAYLOAD_MARKER
2024-01-23 19:16:59 +01:00
Benjamin Valentin
fdc722f842
net/coap: define COAP_PAYLOAD_MARKER
2024-01-23 13:56:10 +01:00
mguetschow
50cf7b77cd
Merge pull request #20272 from Teufelchen1/chore/fmt_test_2
...
tests: Slightly increase coverage of fmt unittests
2024-01-23 12:06:48 +00:00
Teufelchen1
7c39b48847
tests: Slightly increase coverage of fmt unittests
2024-01-23 10:30:49 +01:00
Benjamin Valentin
616a5d69f6
gnrc/ipv6: only send link-local loopback if it's on the same interface
2024-01-22 20:03:41 +01:00
benpicco
8dbe2ef7e4
Merge pull request #20273 from benpicco/coap_find_uri_query
...
nanocoap: implement coap_find_uri_query()
2024-01-20 11:27:15 +00:00
Benjamin Valentin
1c24462cd9
nanocoap: implement coap_find_uri_query()
2024-01-19 10:53:03 +01:00
Benjamin Valentin
0b925c2494
sys/shell: fix reserved addresses in i2c_scan
...
There are only 8 reserved addresses on the low end of the address space.
2024-01-18 15:08:14 +01:00
Benjamin Valentin
c650b38989
gcoap: move gcoap_fileserver to nanoCoAP
2024-01-17 19:21:47 +01:00
Marian Buschsieweke
0cffb7f365
Merge pull request #20257 from fzi-haxel/native64-part1
...
core, sys, drivers: 64-bit support preparations
2024-01-17 15:40:34 +00:00
Frederik Haxel
394cd0e3a8
sys: 64 bit compatibility
...
* priority_queue_t: Replaced `-1U` literal with PRIORITY_QUEUE_DATA_SIGNALING define
* architecture.h: Added 64-bit
* bloom.h: Fixed typedef for the hashfp_t function pointer
* vfs.h: Increased default vfs buffer sizes for 64 bit
* bytes.h: Check if socklen_t is already defined
* ztimer: Use PRIxPTR format specifier
2024-01-17 16:05:12 +01:00
mguetschow
084dedcca7
Merge pull request #20116 from bergzand/pr/sha256/no_static
...
hashes/sha2{24,56}: Remove static variables from sha256
2024-01-16 16:01:56 +00:00
benpicco
c1ae2ecb9f
Merge pull request #20259 from fabian18/pr/gnrc/ipv6/nib_rejoin_ip6_mcast
...
gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up
2024-01-16 15:11:53 +00:00
434e5647d0
hashes/sha224: Remove static variables from sha224
2024-01-16 16:00:44 +01:00
bac3f48dc9
hashes/sha256: Remove static variables from sha256
...
This removes the static (thread-unsafe) variables from sha256 and
hmac_sha256 to remove a potential footgun. The static variable is only
used when the caller does not supply a pointer to store the digest and
it is returned via the (undocumented) return value.
This commit removes this option and makes the digest argument mandatory.
2024-01-16 16:00:39 +01:00
Fabian Hüßler
ab3f77e673
gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up
2024-01-16 12:34:37 +01:00
Frederik Haxel
291c89f1e7
sys/net/gnrc: Fixed wrong PRIuSIZE format specifier
2024-01-12 17:17:33 +01:00
benpicco
0c80553534
Merge pull request #20244 from benpicco/sys/shell/cmds-version
...
sys/shell: add firmware version to version cmd
2024-01-11 17:56:40 +00:00
Benjamin Valentin
eb76b8ea62
nanocoap: allow lastonum=NULL in coap_opt_put_uri_pathquery()
2024-01-11 16:51:18 +01:00
Benjamin Valentin
a470c1cb44
nanocoap_sock: always use coap_opt_put_uri_pathquery()
2024-01-11 16:51:18 +01:00
Benjamin Valentin
f932552b99
sys/shell: add firmware version to version cmd
2024-01-11 14:38:15 +01:00
benpicco
714958ad3c
Merge pull request #20241 from benpicco/busy_wait
...
sys/busy_wait: add busy wait helper
2024-01-11 12:19:31 +00:00
benpicco
bb4c4ddf20
Merge pull request #20243 from benpicco/gnrc_ipv6_nib_pl_set-relax
...
gnrc/nib: allow prefix to be on-link without being used for address
2024-01-10 22:19:03 +00:00
Benjamin Valentin
433438c924
gnrc/nib: allow prefix to be on-link without being used for address
2024-01-10 14:49:03 +01:00
Benjamin Valentin
bfd29f0fa7
sys/busy_wait: add busy wait helper
2024-01-09 19:03:15 +01:00
Benjamin Valentin
7240f707a5
nanocoap_sock: implement FETCH methods
2024-01-09 12:40:10 +01:00
Benjamin Valentin
7c9345f53a
sys/suit: introduce suit_worker_done_cb()
2024-01-08 20:39:12 +01:00
benpicco
1d3a7cdb5a
Merge pull request #20224 from benpicco/GNRC_IPV6_STATIC_LLADDR_FIXED
...
gnrc/ipv6/nib: allow for predictable static link-local addresses
2024-01-04 18:17:09 +00:00
Benjamin Valentin
4a5757b9af
gnrc/ipv6/nib: add Kconfig for static link-local address
2024-01-04 17:45:23 +01:00
Benjamin Valentin
7196b0a2ae
gnrc/ipv6/nib: allow for predictable static link-local addresses
2024-01-04 16:13:37 +01:00
Marian Buschsieweke
616b48d354
Merge pull request #20228 from benpicco/cc2538_get_eui64_primary
...
cpu/cc2538: fix EUI provider
2024-01-04 14:30:19 +00:00
Benjamin Valentin
ecb1e57b18
net/eui_provider: include board.h
2024-01-04 13:16:24 +01:00
benpicco
519f8251a4
Merge pull request #20220 from LP-HAW/fix-benchmark-overflow
...
sys/benchmark: fix integer overflow in benchmark_print_time()
2024-01-03 14:30:33 +00:00
benpicco
6d180c365c
Merge pull request #20210 from Enoch247/fix-riotboot
...
riotboot: fix build errors
2024-01-02 17:54:49 +00:00
benpicco
59eb017448
Merge pull request #20198 from Teufelchen1/chore/fmt_test
...
tests: Slightly increase coverage of fmt unittests
2024-01-02 14:02:59 +00:00
Mikolai Gütschow
aaf7064b51
sys/psa_crypto: fix compile bug for certain configuration
2024-01-02 13:59:36 +01:00
Joshua DeWeese
9f27a5a246
sys/riotboot/slot: fix failed build
...
When riotboot/slot.h is included, but riotboot is not enabled in the
build, a compiler error occures. This is because SLOT0_LEN is not
defined. This patch fixes this by surrounding the offending macrro with
a conditional compile. `riotboot_slot_size()` may still be called, in
which case it returns 0 for the size of any slot given.
2023-12-21 16:33:15 -05:00
Joshua DeWeese
edb419ab7c
sys/shell: update doc
...
This patch updates shell.c's doc that undersells the shells complexity.
The comment seems to have been written prior to the shell's ability to
parse command args and handle quoting sequences.
2023-12-21 16:18:23 -05:00
Joshua DeWeese
5cd52885c1
sys/shell: fix missing NULL terminator
...
This patch adds the missing NULL terminator to the argv passed to shell
command handlers. Without it, Newlib's getop() was intermittently
causing hardfaults. Closer inspection of NewLib's code revealed that it
relies in this NULL termination. ANSI-C also requires it of the argv
passed to main().
2023-12-21 15:53:04 -05:00
Joshua DeWeese
8a9dd047be
sys/shell: add details to doc
...
This patch adds details to the rationale behind the design of the
argv/argc handling for shell command handlers. It also fixes a
misspelling.
2023-12-21 15:53:04 -05:00
Joshua DeWeese
fcd3d0decf
sys/shell: fix doc
...
Fixed broken Markdown code spans. Also added a code span around mention
of getopt.
2023-12-21 15:52:53 -05:00
Frederik Haxel
9272ad8d9a
net/gnrc/rpl: Remove unused debug string
2023-12-21 12:06:47 +01:00
Frederik Haxel
64ba553d1f
sys: Use size_t print format specifier
...
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-12-21 12:02:19 +01:00
Frederik Haxel
b5a43801fb
print: Added size_t print format specifier
...
- Added `PRIuSIZE`, `PRIxSIZE`, etc. to `architecure.h`
- Changed `CODING_CONVENTIONS.md` regarding `size_t` printing
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-12-21 12:02:16 +01:00
Oleg Hahm
724e6e0098
Merge pull request #20167 from benpicco/gnrc_ipv6_classic
...
gnrc_ipv6_nib: fix config for mixed 6lo/classic setup
2023-12-20 12:12:40 +00:00
Benjamin Valentin
9ceb7cd30c
gnrc/ipv6/nib: fix GNRC_IPV6_STATIC_LLADDR when link state changes
2023-12-19 18:33:59 +01:00
Teufelchen1
4a62b9ff31
tests: Slightly increase coverage of fmt unittests
2023-12-19 18:11:28 +01:00
Benjamin Valentin
a1c3d5a4ea
nanocoap: rename coap_get_uri_query() -> coap_get_uri_query_string()
...
Free up the name for a function that will do something actually useful
2023-12-19 14:01:53 +01:00
Benjamin Valentin
f56edf5849
nanocoap: defuse footgun in coap_get_uri_query()
2023-12-19 14:00:04 +01:00
Benjamin Valentin
fa1f60f4ac
gnrc_ipv6_nib: fix config for mixed 6lo/classic setup
2023-12-19 10:47:54 +01:00
Benjamin Valentin
2f9c68dabc
sys/net/netif: constify netif access
2023-12-15 16:50:21 +01:00
Benjamin Valentin
8f7dad6c53
gnrc: introduce gnrc_ipv6_classic pseudo-module
2023-12-11 23:31:21 +01:00
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
Fabian Hüßler
0cc2bdaf5b
sys/include/net/gnrc: reduce stack by previously allocated message queue
2023-12-03 17:53:44 +01:00
Lena Boeckmann
de09b2a0b4
sys/psa_crypto: Build PSA Crypto functions based on module selection
2023-11-30 21:02:42 +01:00
Mikolai Gütschow
6935ea21e7
sys/hashes: add SHA-512 support
2023-11-29 19:18:51 +01: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
4bfd87ffa2
nanocoap: rename coap_get_code() -> coap_get_code_decimal()
2023-11-28 13:11:11 +01:00
chrysn
e9e1f9cce4
sys/random doc: Point to auto initialization and its caveats
2023-11-23 23:34:56 +01:00
chrysn
df70e00b92
sys/random doc: Make implementation list visible
2023-11-23 16:50:23 +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
Marian Buschsieweke
978176a283
Merge pull request #20074 from maribu/sys/flash_utils/avr
...
sys/flash_utils: Minor bug fixes
2023-11-11 12:58:08 +00:00