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

45097 Commits

Author SHA1 Message Date
Marian Buschsieweke
48b2552ed2
pkg/esp8266_sdk: make use of <endian.h> 2024-02-01 18:24:40 +01: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
Marian Buschsieweke
b42b1998ec
cpu/sam0_common: fix vendor header files
Ran the `fix_headers.sh` to fix the vendor header files and removed
the no longer needed work around for them.
2024-01-31 14:46:23 +01:00
Marian Buschsieweke
1425dc0652
cpu/sam0_common: Update script to fix vendor headers
The script to fix the vendor header files has been renamed to
`fix_headers.sh` and now does two things:

1. Strip bogus type qualifiers in front of padding (as before)
2. Strip bogus `LITTLE_ENDIAN` defines.
2024-01-31 14:46:23 +01:00
Teufelchen
cec06d5417
Merge pull request #15965 from benpicco/cpu/sam0_common/flashpage_irq_disable
cpu/sam0_common: flashpage: disable interrupts while writing
2024-01-31 10:49:10 +00:00
6adc52594d
Merge pull request #20311 from kaspar030/git-cache-rs
ci: support git-cache-rs
2024-01-31 07:34:27 +00:00
f9afdf86d0 pkg: ensure "dynamic sparse paths" are up-to-date 2024-01-30 21:08:20 +01:00
2bb2016e23 pkg/cmsis: add PKG_SPARSE_PATHS for NN and DSP sub-pkgs 2024-01-30 21:08:20 +01:00
Teufelchen
0d04b730e3
Merge pull request #15576 from Hxinrong/aes_encryptBranch
add error check of aes_encrypt()
2024-01-30 19:19:34 +00:00
Martine Lenders
34fcffe37b
Merge pull request #20170 from miquel-b/lsm6dsxx
drivers/lsm6dsxx: refactoring Lsm6dsl into common driver Lsm6dsxx
2024-01-30 19:07:04 +00: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
a21acf0858 cpu/sam0_common: flashpage: disable interrupts while writing 2024-01-30 18:48:01 +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
6615f47b90
tests/unittests: Add tests for endian.h 2024-01-30 12:24:12 +01:00
benpicco
1ee9985577
Merge pull request #20276 from fzi-haxel/native64-part3
tests: 64-bit support preparations
2024-01-30 11:13:09 +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
cba6f12b8b make: pkg/: add git-cache-rs support 2024-01-30 10:51:20 +01:00
Frederik Haxel
c4a8b94eab lua: Increased LUA_MEM_SIZE for 64 bit 2024-01-30 09:31:00 +01:00
Frederik Haxel
7a1c099e7b tests: 64 bit compatibility
Fixed compilation errors. Mostly DEBUG/printf formatting and void pointer casting.

Other changes are:
* net/gnrc_sixlowpan_frag_*: Generalized packet size calculation
* cpu/native_backtrace: Reduced required backtrace size to 3 for 64-bit
* periph/flashpage: Simplified test
* unittests/tests-pktbuf: Generalized alignment
* sys/architecture: Extended test for 64-bit
2024-01-30 09:31:00 +01:00
Marian Buschsieweke
57cd430363
Merge pull request #20306 from Wer-Wolf/native_timer_freq
cpu/native: Add support for periph_timer_query_freqs
2024-01-30 08:20:23 +00:00
Armin Wolf
6070c57e21 cpu/native: Add support for periph_timer_query_freqs
Add support for querying the frequency supported by
`periph_timer`. This allows applications which require
this feature to run on the `native` board.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-01-30 02:01:50 +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
benpicco
1d11b67151
Merge pull request #20297 from fabian18/pr/fatfs_fix_FATFS_VFS_FILE_BUFFER_SIZE
vfs: fix FATFS_VFS_FILE_BUFFER_SIZE for increased VFS_NAME_MAX
2024-01-29 14:52:53 +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
Oleg Hahm
71fed48e7c
Merge pull request #20307 from Wer-Wolf/exec_stack
cpu/native: Fix executable stack warning
2024-01-29 09:54:25 +00:00
Armin Wolf
d04df84b76 cpu/native: Fix executable stack warning
The tramp assembly was missing a `.note.GNU-stack` section,
meaning the compiler was forced to assume that we require
an executable stack.

Fix this by adding the necessary section.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
2024-01-28 04:43:42 +01:00
chrysn
8f111a3c29
Merge pull request #20299 from chrysn-pull-requests/nrf52-spi-bugs-2
cpu/nrf52 i2c: Wait for complete transmission when writing NOSTOP
2024-01-27 08:56:05 +00:00
chrysn
002cd42e26 treewide: cargo update 2024-01-27 09:41:26 +01:00
chrysn
790e808deb cpu/nrf52 i2c: Wait for complete transmission when writing NOSTOP 2024-01-27 09:41:26 +01:00
chrysn
6231c58fdb examples/rust-coap: Update to coap-handler 0.2 based implementations 2024-01-27 09:41:26 +01:00
chrysn
3c5a540d01 drivers/lsm303agr: Use version 1.0 of driver 2024-01-27 09:41:26 +01:00
chrysn
96af920a12 drivers/lsm303agr: Use version 0.3 of driver
Note that for the very CPU this driver is used with (nRF52 on the
microbit-v2 board), this currently needs extra workarounds to copy
written data from flash to RAM so that the driver can see it. (Otherwise
it silently writes 00, and then correctly reads 00 from the bus all the
time).
2024-01-27 09:41:26 +01:00
Marian Buschsieweke
ad69fc14c9
Merge pull request #20304 from benpicco/drivers-luid_get
drivers/w5100: make use of netdev_eui48_get()
2024-01-26 21:31:57 +00:00
Benjamin Valentin
a774ad935b drivers/w5100: make use of netdev_eui48_get() 2024-01-26 21:42:27 +01:00
chrysn
1073df2ce2
Merge pull request #20298 from chrysn-pull-requests/nrf52-spi-bugs
cpu/nrf52 i2c: Always buffer writes
2024-01-25 16:09:28 +00:00
chrysn
52a976e147 cpu/nrf52 i2c: Add shortcut when data is in RAM
See-Also: https://github.com/RIOT-OS/RIOT/pull/20298#discussion_r1466508505
2024-01-25 16:33:25 +01:00
chrysn
b80d1e622f cpu/nrf52 i2c: Always buffer writes
The underlying peripheral can only read from RAM. This uses the
existing infrastructure (already needed to work around the lack of a
hardware support for I2C_NOSTART) to unconditionally copy any to-be-sent
data into RAM.
2024-01-25 15:24:57 +01:00
MrKevinWeiss
780bb5d500
tests/drivers/saul_drivers: Specify lsm6dsl 2024-01-25 09:18:10 +01:00
MrKevinWeiss
bd64ed460b
drivers/lsm6dsxx: Cleanup style 2024-01-25 09:16:10 +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
MrKevinWeiss
ab84f2387b
drivers/saul: replace lsm6dsl->lsm6dsxx 2024-01-24 20:32:03 +01:00
Teufelchen
de89843fbc
Merge pull request #20293 from mguetschow/uzlib-warning
pkg/uzlib: warn about memory leak during compression
2024-01-24 16:48:41 +00:00
MrKevinWeiss
2f7e1e3b53
docs: exclude lsm6dsxx macros 2024-01-24 13:44:50 +01: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
MrKevinWeiss
1d05932bb9
drivers: Fix kconfig error
Even though it is removed just to get this through
2024-01-24 12:23:01 +01:00