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

46473 Commits

Author SHA1 Message Date
Marian Buschsieweke
1d99f4f758
core/mutex: use thread_yield_higher() in mutex_unlock()
Using `sched_switch()` in `mutex_unlock()` can result in crashes when
`mutex_unlock()` is called from IRQ context. This however is a common
pattern in RIOT to wake up a thread from IRQ. The reason for the crash
is that `sched_switch()` assumes `thread_get_active()` to always return
a non-`NULL` value. But when thread-less idle is used, no thread may be
active after the last runnable thread exited. Using
`thread_yield_higher()` instead solves the issue, as
`thread_yield_higher()` is safe to call from IRQ context without an
active thread.

This fixes https://github.com/RIOT-OS/RIOT/issues/20812
2024-10-05 22:02:28 +02:00
chrysn
13188e13f2
Merge pull request #20887 from chrysn-pull-requests/fmt
static_tests: Add test for Rust code formatting rules
2024-10-04 08:24:07 +00:00
chrysn
d0299deb33 static_tests/rust: Address shellcheck lints
The pure POSIX way to do `for x in $(find ...)` right involves a
tempfile, thus limiting to bash.
2024-10-03 20:42:40 +02:00
benpicco
248371e11a
Merge pull request #20881 from Teufelchen1/fix/rpble
bluetil: Ensure advertisement length does not exceed pkt len
2024-10-03 12:50:32 +00:00
benpicco
8a933a56ae
Merge pull request #20882 from Teufelchen1/fix/dhcpv6
net/dhcpv6: Improve option parsing in dhcpv6 advertise
2024-10-03 12:50:12 +00:00
Marian Buschsieweke
d41a39e29b
Merge pull request #20888 from chrysn-pull-requests/riotdocker-update
makefiles/docker: Update docker image
2024-10-03 09:02:55 +00:00
chrysn
69a89b80ca treewide/rust: cargo fmt 2024-10-02 22:17:08 +02:00
chrysn
44cd632af0 static_tests: Add test for Rust code formatting rules 2024-10-02 22:11:09 +02:00
chrysn
c5c248a267 makefiles/docker: Update docker image
This acknowledges the changes after [254], which moved the Rust
installation into the static tools.

[254]: https://github.com/RIOT-OS/riotdocker/pull/254
2024-10-02 22:09:23 +02:00
benpicco
153562f5da
Merge pull request #20885 from maribu/drivers/shield_llcc68
drivers: Add shield_llcc68 module
2024-10-02 15:39:56 +00:00
benpicco
260e58fa52
Merge pull request #20880 from Teufelchen1/fix/lora
gnrc_lorawan: Ensure minimal packet length
2024-10-02 13:08:36 +00:00
chrysn
505433b8f9
Merge pull request #20838 from chrysn-pull-requests/rust-coap-expose-more
examples/gcoap-rust: Expose more functionality
2024-10-02 11:39:42 +00:00
chrysn
e94337bd60 examples/rust-gcoap: Regenerate Makefile.ci 2024-10-02 13:25:32 +02:00
chrysn
455b19962e examples/rust-gcoap: Use patched try-lock version for armv6 devices 2024-10-02 13:25:32 +02:00
chrysn
5eaa09a872 examples/rust-gcoap: Tighten stack sizes
This still leaves a comfortable 976 byte on the gcoap stack, and 812 on
main -- and makes the application fit on way more boards.
2024-10-02 13:25:32 +02:00
Marian Buschsieweke
8c2f6ae9dc
drivers: Add shield_llcc68 module
This implements the `shield_llcc68` module that allows using the LLCC68
LoRa shield on Arduino UNO compatible boards (with Arduino IO mappings
provided by the board) by just selecting the module.
2024-10-02 09:48:29 +02:00
Marian Buschsieweke
7bc7b732d5
drivers/shield_w5100: pimp documentation
This adds a picture and a small fact table to the doc.
2024-10-02 09:48:29 +02:00
Teufelchen1
f88285de75 net/dhcpv6: Improve option parsing in dhcpv6 advertise 2024-10-02 09:47:22 +02:00
benpicco
884e21a234
Merge pull request #20884 from maribu/boards/common/arduino-zero
boards/common/arduino-zero: Add Arudino SPI mapping
2024-10-01 16:46:55 +00:00
Marian Buschsieweke
cbf06649aa
boards/common/arduino-zero: Add Arudino SPI mapping
The Arduino Zero based boards already provided the feature
`arduino_spi`, but were missing the corresponding mapping. This fixes
the issue by adding the SPI bus numbers for the ISP SPI bus and the
D11D12D13 SPI bus.

(And in order to actually add the D11D12D13 SPI bus, the `periph_conf.h`
was extended to provide an SPI configuration for it.)
2024-10-01 18:27:33 +02:00
benpicco
068db8bbe6
Merge pull request #20883 from maribu/examples/lorawan/bugfix
examples/lorawan: drop crazy STM32 hack
2024-10-01 13:55:28 +00:00
Marian Buschsieweke
4b6ad3b99f
examples/lorawan: drop crazy STM32 hack
We cannot just decrement the reference counter of power modes without
any coordination. First, this will trigger an `assert()`ion on non
STM32 MCUs that have power modes that are not used (the ref count would
be decremented below zero). Second, there hopefully is a reason a
certain power mode is blocked, e.g. because a periph driver needs a
certain clock to function.

Likely the `periph_uart` driver on STM32 boards keeps power modes
blocked after TX is completed even when no RX callback is present, which
is the waste of power this hack tries to address. But that should be
addressed there.
2024-10-01 15:44:39 +02:00
Teufelchen
541ef69ce4
Merge pull request #20871 from benpicco/dist/tools/bootterm-0.5
dist/tools/bootterm: bump to 0.5
2024-10-01 13:31:12 +00:00
mguetschow
723d8cd47e
Merge pull request #20566 from maribu/buildsystem/document-riotbuild.h
build system: document `riotbuild.h` and deprecated `RIOT_MCU`
2024-10-01 12:57:24 +00:00
Teufelchen1
84f1ae3635 bluetil: Ensure advertisement length does not exceed pkt len 2024-10-01 14:49:09 +02:00
Teufelchen1
51537908d1 gnrc_lorawan: Ensure minimal packet length 2024-10-01 12:11:05 +02:00
Marian Buschsieweke
4b36bb6098
Merge pull request #20873 from benpicco/cpu/native-no-pedantic
makefiles/arch/native: don't be pedantic
2024-10-01 08:51:55 +00:00
benpicco
61df141332
Merge pull request #20862 from benpicco/drop-SUIT_SEC_PASSWORD
makefiles/suit: make use of `SUIT_SEC_PASSWORD` optional
2024-09-30 17:43:09 +00:00
Benjamin Valentin
50e3d61441 makefiles/suit: allow to decrypt signing key with SUIT_SEC_PASSWORD 2024-09-30 16:38:16 +02:00
Marian Buschsieweke
4f15523741
Merge pull request #20879 from benpicco/gnrc_sixlowpan_frag-gnrc_netif_pktq
gnrc_sixlowpan_frag: enable `gnrc_netif_pktq` if `netdev_new_api` is used
2024-09-30 14:00:33 +00:00
Benjamin Valentin
0b99d4fffe gnrc_sixlowpan_frag: enable gnrc_netif_pktq if netdev_new_api is used 2024-09-30 14:07:35 +02:00
Martine Lenders
f2b04ca6fa
Merge pull request #20875 from miri64/gh-actions/fix/bump-upload-artifact
gh-actions: bump upload-artifact to v4
2024-09-30 09:05:47 +00:00
Marian Buschsieweke
3c5c78abf3
Merge pull request #20841 from maribu/tests/pkg/emlearn
tests/pkg/emlearn: add model.h to repo
2024-09-29 17:17:23 +00:00
Marian Buschsieweke
29e963bd95
build system: deprecate RIOT_MCU predefined macro
This re-adds `RIOT_MCU` as alias for `RIOT_CPU` and marks it as
deprecated. That should make life easier for downstream apps that may
still use `RIOT_CPU`.
2024-09-28 18:32:49 +02:00
Marian Buschsieweke
cadbbb6e95
build system: Add MACRO_DEPRECATED macro
Adding this macro in the definition of a macro causes a warning about
the deprecation to be emitted when used (and a build failure with
`WERROR=1`). This is useful as no other means to deprecate preprocessor
macros are provided.

The macro will be defined empty for compilers that are not GCC or
clang.
2024-09-28 18:32:49 +02:00
Marian Buschsieweke
906e2c3234
build system: document riotbuid.h
This adds a `riotbuild-prefix.h` that is added to the `riotbuild.h`
and processed by Doxygen. It solves two problems:

1. The pre-defined macros where previously fully undocumented, but
   may be useful to real world applications
2. It provides a place where backward compatibility aliases can be
   added with a deprecation notice
2024-09-28 18:32:49 +02:00
Marian Buschsieweke
2c89b7acd3
tests/pkg/emlearn: add model.h to repo
The Makefile rule to regenerate model.h has been left in place, but
just adding the header to the test allows to build the application
without heaving emlearn installed, which is convenient for the CI.

Actual users of emlearn will like still want to generate the header.
2024-09-28 18:29:56 +02:00
Martine S. Lenders
29baafe523
gh-actions: bump upload-artifact to v4
See https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/
2024-09-28 10:29:27 +02:00
benpicco
9bdb697edb
Merge pull request #20857 from benpicco/dns_msg-fix_skip
dns_msg: skip RDLENGTH_LENGTH field when skipping record
2024-09-27 15:57:17 +00:00
Benjamin Valentin
0463b2705f
unittests: add test for dns_msg
Co-Authored-By: Martine Lenders <martine.lenders@tu-dresden.de>
2024-09-27 17:40:11 +02:00
mguetschow
055c1e6080
Merge pull request #20874 from chrysn-pull-requests/cpuid
doc: Clarify that our CPU ID is not ARM's CPUID
2024-09-27 08:59:23 +00:00
chrysn
f116a78de8 doc: Clarify that our CPU ID is not ARM's CPUID 2024-09-27 10:42:17 +02:00
benpicco
9d0a2c19e4
Merge pull request #20347 from aabadie/pkg/emlearn/bump_version
pkg/emlearn: bump version to 0.17.1
2024-09-26 15:14:35 +00:00
Benjamin Valentin
5c34eeae03 makefiles/arch/native: don't be pedantic
We don't enable this on any other architecture.
-pedantic doesn't give us any more beneficial wanrings, only warns
about language extensions that are implemented by both GCC and Clang
anyway.

Since those are the only compilers we are targeting, we can just make
use of them to make our lives easier.
2024-09-26 17:09:15 +02:00
Benjamin Valentin
42d95ad174 dist/tools/bootterm: bump to 0.5 2024-09-26 11:22:45 +02:00
benpicco
7f959f83cc
Merge pull request #20870 from derMihai/mir/event_timeout_zero
event/timeout: event_timeout_set() enqueues immediately if timeout is zero
2024-09-25 13:26:38 +00:00
Mihai Renea
b7eee2c8b7 event/timeout: event_timeout_set() enqueues immediately if timeout is zero 2024-09-25 10:00:58 +02:00
benpicco
5c06502c4d
Merge pull request #20835 from xnumad/nib-route-hide-on-link-prefixes
gnrc/ipv6: `nib route`: hide off-link PLEs
2024-09-24 15:42:48 +00:00
Marian Buschsieweke
4e17dbae20
Merge pull request #20866 from maribu/CODING_CONVENTIONS.md/indent-pp-directives
CODING_CONVENTIONS.md: Add preprocessor directive formatting
2024-09-24 08:52:49 +00:00
Marian Buschsieweke
f431aab856
CODING_CONVENTIONS.md: Add preprocessor directive formatting
This explicitly spells out what informally has been the coding
convention for some time on preprocessor directives, making it
more transparent and easier to find.

This is particularly useful as the code base has at least three
different styles. Deducing what actually is the current policy
would require a details look at how the style has changed over
time, rather than being obvious from a quick `grep` over the
code base.
2024-09-23 17:08:05 +02:00