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

41865 Commits

Author SHA1 Message Date
Benjamin Valentin
24cb2dada8 tests/coding: add tests for XOR codding 2023-02-07 14:09:39 +01:00
Benjamin Valentin
d18a304267 sys/coding: add XOR based coding module
This implements the XOR based error-correction code described by
Jürgen Fitschen (@jue89) at the RIOT Summit.

A parity byte is generated for each 3 payload bytes, then the payload array
is transposed by interpreting it as a 2D matrix with height of 3.

This is to reduce the chance of consecutive bytes ending up in the same
packet.

This allows to recover one in 3 lost data packets (if parity packets are received).

[0] https://summit.riot-os.org/2021/wp-content/uploads/sites/16/2021/09/s02-01.pdf
2023-02-06 16:21:57 +01:00
Karl Fessel
19021d618e
Merge pull request #18858 from kfessel/p-fix-DIV2
core/marco: fix DIV_ROUND
2022-11-10 16:26:20 +01:00
Marian Buschsieweke
a17ae056bc
Merge pull request #18868 from maribu/tests/mpu_stack_guard
tests/mpu_stack_guard: Fix compilation on modern GCC (>= 12.x)
2022-11-10 14:49:27 +01:00
Marian Buschsieweke
fdc3f6a56b
tests/mpu_stack_guard: Fix compilation on modern GCC (>= 12.x)
The `mpu_stack_guard` test intentionally overflows the stack with a
stupid infinite recursion. Newer versions of GCC started to dislike
this, so this disables the corresponding diagnostics to get the
intentional stack overflow still compiled.
2022-11-10 12:49:18 +01:00
Marian Buschsieweke
24262f1279
Merge pull request #18859 from maribu/examples/wasm
examples/wasm/wasm_sample: fix linking with new wasm-ld
2022-11-10 12:17:46 +01:00
Marian Buschsieweke
b1dbbbbcac
Merge pull request #18866 from maribu/dist/tools/backport_pr
tools/backport_pr.py: improve usability
2022-11-10 11:35:02 +01:00
Marian Buschsieweke
4983f8bb60
tools/backport_pr.py: improve usability
Add `search_parent_directories=True` to `git.Repo()` so that
`backport_pr.py` can be called anywhere within the RIOT git repo
without manually passing the repo root path via `--gitdir`.

Previously the tool had to be called from the RIOT base repo.
2022-11-10 09:52:24 +01:00
Marian Buschsieweke
e909a41ce3
Merge pull request #18861 from maribu/dist/tools/flatc
dist/tools/flatc: Fix compilation on musl
2022-11-10 08:46:59 +01:00
Marian Buschsieweke
6700e91a99
Merge pull request #18862 from maribu/pkg/utensor
pkg/utensor: fix uninitialized variable
2022-11-10 08:44:26 +01:00
Marian Buschsieweke
70a0e3fa47
pkg/utensor: fix uninitialized variable
This fixes compilation with modern GCC. (And likely runtime issues...)
2022-11-09 22:47:08 +01:00
Marian Buschsieweke
b540f6fe5e
dist/tools/flatc: Fix compilation on musl
flatc uses `strto<foo>_l()` over `strto<foo>()` when available, so that
they behave reproducible. The musl libc has no locale support, which
has the added benefit of reproducible behavior being the default.

For some reason a `strtof_l()` compatibility wrapper was added in
musl, but the other `strto<foo>_l()` wrappers are missing. This
adds a patch to check for `strtoull_l()` instead of `strtof_l()`. This
will not make a difference on a libc that supports all of them, but
fixes compilation on musl.
2022-11-09 22:33:23 +01:00
Marian Buschsieweke
c801990c5d
examples/wasm/wasm_sample: fix linking with new wasm-ld
Apparently the order of the flags now became significant. This fixes:

    wasm-ld: error: entry symbol not defined (pass --no-entry to suppress)
2022-11-09 20:12:32 +01:00
Karl Fessel
aa31dd7d66 core/macros: rewrite DIV_ROUND, DIV_ROUND_UP; add DIV_ROUND_INF 2022-11-09 17:59:18 +01:00
Karl Fessel
228d8e72c0 unittest/core-macros: add negtive cases for DIV_ROUND and DIV_ROUND_UP 2022-11-09 17:59:18 +01:00
Marian Buschsieweke
e402e3f57a
Merge pull request #18849 from benpicco/core-SIGNOF
core/macros: fix SIGNOF() macro when applied to size_t
2022-11-09 17:54:00 +01:00
benpicco
15448bf416
Merge pull request #18857 from blueted2/pr/dwm1001/lis2df12_i2c
boards/dwm1001: use lis2dh12_i2c instead of lis2dh12_spi
2022-11-09 15:07:57 +01:00
Gunar Schorcht
de266af973
Merge pull request #18804 from benpicco/tinyusb_cdc_acm_stdio
pkg/tinyusb: implement stdio via CDC ACM
2022-11-09 14:43:45 +01:00
Benjamin Valentin
8f8bb6ce84 tests/unittests: core: add test for SIGNOF(size_t) 2022-11-09 14:23:51 +01:00
Benjamin Valentin
ea0cf85d73 tests/pkg_tinyusb_cdc_acm_stdio: add test for stdio via CDC ACM 2022-11-09 12:06:36 +01:00
Benjamin Valentin
03bbd6badf pkg/tinyusb: implement stdio via CDC ACM 2022-11-09 12:06:36 +01:00
Benjamin Valentin
5938bd815a pkg/tinyusb: provide common tusb_config.h 2022-11-09 12:06:36 +01:00
Benjamin Valentin
0bd67d98d9 cpu: always rely on stdio.inc.mk for default stdio selection 2022-11-09 10:42:47 +01:00
benpicco
e38e0b937c
Merge pull request #18835 from gschorcht/pkg/tinyusb_descriptors
pkg/tinyusb: add common USB descriptors implementation
2022-11-09 10:42:15 +01:00
Gregory Holder
dde641fded
boards/dwm1001: use lis2dh12_i2c instead of lis2dh12_spi 2022-11-09 09:36:09 +00:00
Gunar Schorcht
028c22083b pkg/tinyusb: add Kconfig variables for common tinyUSB descriptors 2022-11-09 06:57:55 +01:00
Gunar Schorcht
5685718bcf sys/usb: enable common USB Kconfig for tinyUSB 2022-11-09 06:57:55 +01:00
Gunar Schorcht
579370fd75 tests/pkg_tinyusb_cdc_msc: use common descriptors implementation 2022-11-09 06:57:55 +01:00
Gunar Schorcht
ef5c4deb55 pkg/tinyusb: common descriptors implementation 2022-11-09 06:57:55 +01:00
Karl Fessel
c354ab6285
Merge pull request #18846 from kfessel/p-pm-layerd-speedup1
sys/pm_layered: align pm_blocker_t for speed
2022-11-08 10:50:16 +01:00
benpicco
f8964c0149
Merge pull request #18827 from benpicco/nanocoap_block-fix
nanocoap_sock: don't store entire sock in coap_block_request_t
2022-11-08 10:49:39 +01:00
Marian Buschsieweke
7e0af3cd22
Merge pull request #18833 from benpicco/bitfield-ops
sys/bitfield: add bf_find_first_{set, unset}()
2022-11-07 20:27:48 +01:00
benpicco
8559472179
Merge pull request #18821 from jue89/feature/saml21_pheriph_pm
cpu/saml21: add interaction with pm_layered for peripheral drivers
2022-11-07 19:53:57 +01:00
benpicco
8a811e8a69
Merge pull request #18845 from maribu/llvm-compat
build system: fix compilation with LLVM
2022-11-07 19:51:18 +01:00
Marian Buschsieweke
0077e9ad70
makefiles/libc: fix wchar_t size warnings on LLVM
The test for the requirement of disabling wchar_t size warnings assumed
that $(CC) is used for linking, instead of $(LINK). With GCC $(LINK)
and $(CC) happen to be (in most cases) identical, but with LLVM they
are not. This results in issues with compiling with LLVM.
2022-11-07 15:02:03 +01:00
Marian Buschsieweke
67ba1a0cb7
makefiles/cflags.inc.mk: add -z noexecstack to link flags
GCC on some platforms does need an executable stack to generate
trampoline code, but use of nested functions is not allowed in
RIOT's code base anyway.
2022-11-07 15:02:03 +01:00
Marian Buschsieweke
13eef005ef
Merge pull request #18848 from benpicco/coap_build_reply-return
examples: check return value of coap_build_reply()
2022-11-07 12:20:42 +01:00
Martine Lenders
e07747a9f7
Merge pull request #18852 from Teufelchen1/fix/llvm_gnrc_networking
gnrc: Fix unused function error when using LLVM
2022-11-06 19:08:53 +01:00
Teufelchen1
64b4d433b9 gnrc: Fix unused function error when using LLVM 2022-11-06 15:39:39 +00:00
Martine Lenders
5c2a99a348
Merge pull request #18850 from Teufelchen1/chore/examples_gnrc
examples: Remove macOS references in README
2022-11-06 16:17:27 +01:00
Teufelchen1
2adf0e9072 examples: Remove macOS references in README 2022-11-05 11:54:51 +00:00
benpicco
384e3ca534
Merge pull request #18847 from krzysztof-cabaj/nucleo-f207zg-ADC
boards/nucleo-f207zg:  support for ADC
2022-11-05 01:55:30 +01:00
Benjamin Valentin
1eb02f7fda core/macros: fix SIGNOF() macro with size_t 2022-11-04 23:53:15 +01:00
krzysztof-cabaj
aa426bd3aa cpu/stm32/f2: add ADC support for f207zg 2022-11-04 18:02:28 -04:00
krzysztof-cabaj
cfd0183f60 boards/nucleo-f207zg: add ADC support 2022-11-04 18:02:28 -04: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
Karl Fessel
72a1e93eed sys/pm_layered: pm_get_blocker = instead of memcopy -ease readability 2022-11-04 16:59:48 +01:00
Karl Fessel
5447203921 sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath 2022-11-04 16:59:02 +01:00
Karl Fessel
21973963c0 sys/pm_layered: align pm_blocker_t for speed 2022-11-04 16:50:52 +01:00
Benjamin Valentin
17374301c9 tests/unittests: add tests for bf_set_all() 2022-11-04 16:48:49 +01:00