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

43249 Commits

Author SHA1 Message Date
chrysn
de410314a3 Rust: Update riot-sys and riot-wrappers
This pulls in several fixes from these repositories:

* riot-sys:
    * Add `random` module to `riot-headers` (https://github.com/RIOT-OS/rust-riot-sys/pull/26)
    * README: fix 2 typos (https://github.com/RIOT-OS/rust-riot-sys/pull/31)
    * bindgen: Use 0.64 (https://github.com/RIOT-OS/rust-riot-sys/pull/30)
    * wolfSSL support added (https://github.com/RIOT-OS/rust-riot-sys/pull/28)
    * extern-types: Generate replacement types dynamically (https://github.com/RIOT-OS/rust-riot-sys/pull/27)
    * Extern types: Add netq_t, make them large (https://github.com/RIOT-OS/rust-riot-sys/pull/25)
    * doc: Suppress warnings about things C2Rust does not uphold (https://github.com/RIOT-OS/rust-riot-sys/pull/23)
    * export macro_DAC_LINE (https://github.com/RIOT-OS/rust-riot-sys/pull/22)
    * Add BINDGEN_OUTPUT_FILE export (https://github.com/RIOT-OS/rust-riot-sys/pull/21)
* riot-wrappers:
    * DAC: Add wrapper around RIOTs DAC-interface (https://github.com/RIOT-OS/rust-riot-wrappers/pull/36)
    * saul: Compatibly rename G* variants (https://github.com/RIOT-OS/rust-riot-wrappers/pull/50)
    * tests: Add test for auto-init when auto-init debug is active (https://github.com/RIOT-OS/rust-riot-wrappers/pull/48)
    * gcoap: Provide link encoder (https://github.com/RIOT-OS/rust-riot-wrappers/pull/47)
    * Drop SUIT support in riot-wrappers (https://github.com/RIOT-OS/rust-riot-wrappers/pull/44)
    * Add an auto init module (https://github.com/RIOT-OS/rust-riot-wrappers/pull/45)
    * gcoap: Allow registration without scope for 'static listeners (https://github.com/RIOT-OS/rust-riot-wrappers/pull/43)

Through direct dependency changes (the bindgen update), the number of
transitive dependencies could be reduced.
2023-04-24 11:29:52 +02:00
bors[bot]
bd295b00b2
Merge #19494
19494: pkg/qcbor: bump to v1.2 r=kaspar030 a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-04-22 21:20:57 +00:00
bd3e6a230f
pkg/qcbor: document how to disable features using CFLAGS 2023-04-22 18:25:14 +02:00
8c5bff8877
pkg/qcbor: bump to v1.2 2023-04-22 17:48:14 +02:00
bors[bot]
0101663e39
Merge #19485
19485: sys/shell: Fix missing dependency r=aabadie a=maribu

### Contribution description

The shell commands depend on the shell module being use. This was already the case in KConfig, but was overlooked in the shell's `Makefile.dep`.

In addition, this uncovered that `tests/memarray` had a bogus dependency on shell commands without every using the shell.

### Testing procedure

Ideally binaries should not differ (except for debug section).

### Issues/PRs references

Split out of https://github.com/RIOT-OS/RIOT/pull/19483

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-04-22 06:21:38 +00:00
bors[bot]
ca4be42d88
Merge #19488
19488: usbus: remove deprecated USBUS_HANDLER_FLAG_TR_FAIL flag r=gschorcht a=dylad

### Contribution description

This PR removes the deprecated `USBUS_HANDLER_FLAG_TR_FAIL` flag.

### Testing procedure

CI should be enough.

### Issues/PRs references

Was deprecated by #17046

Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-04-21 10:17:28 +00:00
0c52207544
Merge pull request from GHSA-xqm8-xj74-fjw2
gnrc_sixlowpan_iphc: check IPHC dispatch for truncation
2023-04-21 11:56:49 +02:00
287f030af2
Merge pull request from GHSA-xfj4-9g7w-f4gh
fixes for CVE-2023-24826
2023-04-21 11:54:57 +02:00
34dc1757f5
Merge pull request from GHSA-xjgw-7638-29g5
gnrc_rpl_srh: check header fields consistency before substraction
2023-04-21 11:52:40 +02:00
Martine Lenders
709ddd2ba7 gnrc_sixlowpan_iphc: check IPHC dispatch for truncation 2023-04-21 11:45:27 +02:00
Martine Lenders
4f1e2a3709 gnrc_rpl_srh: check header fields consistency before substraction 2023-04-21 11:40:47 +02:00
Martine Lenders
eb9e50aafe gnrc_sixlowpan_frag_sfr: move timer initialization to init function 2023-04-21 11:30:59 +02:00
Marian Buschsieweke
69b3e05f01
sys/shell: restructure deps
Move deps on sys/shell to sys/Makefile.dep and only keep deps of
sys/shell in sys/shell/Makefile.dep
2023-04-21 09:45:45 +02:00
Dylan Laduranty
b1ffce3ccd usbus: remove deprecated USBUS_HANDLER_FLAG_TR_FAIL flag
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-04-19 20:54:30 +02:00
Marian Buschsieweke
12140ffb0e
examples,tests: Drop redundant dependency
When depending on one or more shell commands, the shell is pulled in
as dependency anyway.
2023-04-19 16:58:10 +02:00
bors[bot]
88d1d2eb64
Merge #19411
19411: cpu/gd32v: add riotboot support r=benpicco a=gschorcht

### Contribution description

This PR provides `riotboot` support for GD32V.

### Testing procedure

Use any GD32V board with a JTAG adapter and flash the bootloader:
```python
PROGRAMMER=openocd BOARD=sipeed-longan-nano make -C bootloaders/riotboot flash
```
Flash slot 0 and set `RIOT_VERSION` to 1
```python
USEMODULE=stdio_uart FEATURES_REQUIRED=riotboot RIOT_VERSION=1 \
PROGRAMMER=openocd BOARD=sipeed-longan-nano make -C tests/shell riotboot/flash-slot0
...
### Flashing Target ###
Binfile detected, adding ROM base address: 0x08000000
Flashing with IMAGE_OFFSET: 0x08001000
```
```python
> main(): This is RIOT! (Version: 1)
test_shell.
```
Flash slot 1 and set `RIOT_VERSION` to 2
```python
USEMODULE=stdio_uart FEATURES_REQUIRED=riotboot RIOT_VERSION=2 \
PROGRAMMER=openocd BOARD=sipeed-longan-nano make -C tests/shell riotboot/flash-slot1
...
### Flashing Target ###
Binfile detected, adding ROM base address: 0x08000000
Flashing with IMAGE_OFFSET: 0x08010800
```
```python
> main(): This is RIOT! (Version: 2)
test_shell.
```

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-04-19 12:58:03 +00:00
Gunar Schorcht
373b10e18c tests/riotboot_flashwrite: blacklist GD32V boards 2023-04-19 12:54:35 +02:00
Marian Buschsieweke
6448258aac
sys/shell: Add missing dependency
The shell_cmds module depends on the shell module. This was correctly
added to KConfig, but the Makefile dependencies missed this one. This
commit adds the missing dep.
2023-04-19 12:25:00 +02:00
Marian Buschsieweke
5e28ec5a63
tests/memarray: Drop bogus dependency
There is no need for shell commands if there is no shell.
2023-04-19 12:24:54 +02:00
Gunar Schorcht
dc29a3e209 boards: enable riotboot feature for GD32V boards in Kconfig 2023-04-18 06:20:46 +02:00
Gunar Schorcht
ea613096f5 examples/suit_update: blacklist GD32V boards 2023-04-18 06:20:14 +02:00
Gunar Schorcht
3b2da3e9e0 sys: define CPU_RAM_SIZE as hex number
Some platforms such as RISC-V don't support numbers given with unit (32K)
2023-04-18 06:20:14 +02:00
Gunar Schorcht
2e32d4ee8b sys/riotboot: uses SLOT1_OFFSET in hex format
Using hex number for addresses and address offsets improves the readability.
2023-04-18 06:20:14 +02:00
Gunar Schorcht
06426c41b0 sys/riotboot: common default NUM_SLOT, SLOT_* config 2023-04-18 06:20:14 +02:00
Gunar Schorcht
9be2421890 cpu/gd32v: allow reconfig PLL multiplier in clock config
To be able to reconfigure the PLL multiplier in clock configuration, the existing value has to be reset first. This becomes necessary when changing the core clock, e.g. when booting with riotboot an application that uses USB.
2023-04-18 06:20:14 +02:00
Gunar Schorcht
dc45b7bfbf cpu/gd32c: cleanup in clock configuration 2023-04-18 06:20:14 +02:00
Gunar Schorcht
92e0f25bea boards/common/gd32v: enable riotboot feature 2023-04-18 06:20:14 +02:00
Gunar Schorcht
f6cb8b99e6 cpu/gd32v: add riotboot support 2023-04-18 06:20:14 +02:00
Gunar Schorcht
1ad397ff59 cpu/riscv_common: add riotboot linker support 2023-04-18 06:20:14 +02:00
Gunar Schorcht
2ae7566a89 cpu/riscv_common: rename cpu.h to cpu_common.h
To allow CPU specific definitions in `cpu.h`, `riscv_common/cpu.h` is renamed to ``riscv_common/cpu_common.h` and included in new `cpu.h` files for FE310 and GD32V.
2023-04-18 06:20:14 +02:00
Gunar Schorcht
f4f716a062 sys/riotboot: fix compilation error of riotboot_slot
`riotboot_slot` uses `ARRAY_SIZE` which is defined in `container.h` but not yet included on some plattforms.
2023-04-18 06:20:14 +02:00
bors[bot]
812c216f0c
Merge #19450 #19476
19450: cpu/esp32: fix compilation issues with GCC 12.2 r=benpicco a=gschorcht

### Contribution description

This PR provides the changes in `cpu/esp32` and `cpu/esp_common` to fix the compilation issues with GCC v12.2.  It is required as the first step in the preparation of the upgrade to ESP-IDF version 5.1.

**Please note**: Insead of fixing the ESP-IDF 4.4 code itself by a big bunch of patches to fix the compilation problems with GCC v12.2, it temporarily disables some warnings. The reason is that the ESP-IDF 5.1 requires GCC v12.2 and should be fixed for this compiler version by the vendor.

### Testing procedure

Green CI

The change were already tested with all ESP-specific modules like `esp_now`, `esp_wifi`, `esp_spi`  and `esp_ble` for all supported ESP platforms.

### Issues/PRs references

Prerequisite for https://github.com/RIOT-OS/riotdocker/pull/227
Fixes issue #19421

19476: native/syscalls: rename real_clock_gettime to clock_gettime r=benpicco a=Teufelchen1

### Contribution description

When compiling RIOT for native using a recent LLVM and enabling ASAN, one might encounter "Duplicated symbol".

This is due to a name clash with `real_clock_gettime()` in compiler-rt from [LLVM](f50246da65), I renamed RIOTs `real_clock_gettime` and just default to the posix function `clock_gettime`. The wrapper existed, most likely, for consistency only.

(The best solution would probably to convince the LLVM folks to declare their symbol as `static` and refactor a bit)

### Testing procedure

Passing CI should be enough.


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
2023-04-17 20:18:02 +00:00
bors[bot]
2b6dc6471e
Merge #19436
19436: cpp11-compat: thread::sleep_for in microseconds r=benpicco a=kfessel

### Contribution description

after reviewing #19369  i found that there is a conversion to nanoseconds just to convert it to microseconds some instrunctions later for ztimer64_usec to handle it this removes one of the conversions (convert once direct to microseconds)

### Testing procedure

run the cpp tests

### Issues/PRs references

#19369

Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-04-17 18:20:28 +00:00
bors[bot]
023cf782ba
Merge #19447
19447: boards/nucleo-f429zi: Provide 2nd timer r=benpicco a=maribu

### Contribution description

- Add a common timer config with two (instead of only one) timer using TIM2 + TIM5
    - Mostly copy-pasting the cfg_timer_tim2.h and cfg_timer_tim5.h together
- Make use of that for the `nucleo-f429zi`

### Testing procedure

E.g. `tests/periph_timer`, but also grepping for TIM2 and TIM5 in `boards/nucleo-f429zi/include/periph_conf.h` to detect any conflict e.g. between PWM and timer config.

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-04-17 16:21:27 +00:00
Teufelchen1
10cada1b8d native/syscalls: rename real_clock_gettime to clock_gettime 2023-04-17 15:21:52 +02:00
bors[bot]
a87634cf91
Merge #19475
19475: gnrc_netif/lorawan: fix setting nwkskey via NETOPT r=MrKevinWeiss a=jia200x



Co-authored-by: Jose Alamos <jose@alamos.cc>
2023-04-17 13:04:37 +00:00
Karl Fessel
90d2ae83fb cpp11-compat: thread::sleep_for in microseconds 2023-04-17 13:27:14 +02:00
Jose Alamos
3c1f5a0dbd
gnrc_netif/lorawan: fix setting nkskey via NETOPT 2023-04-17 12:40:42 +02:00
Marian Buschsieweke
d7923f4905
boards/nucleo-f429zi: Use common TIM5 + TIM2 timer conf 2023-04-17 12:24:48 +02:00
Marian Buschsieweke
190cfdb206
boards/common/stm32: Add timer conf for TIM5 + TIM2
This adds a common configuration file that provides two periph timers
using TIM5 and TIM2.
2023-04-17 12:24:48 +02:00
bors[bot]
82234b1d23
Merge #19389
19389: drivers/usbdev_synopsys_dwc2: add GD32V support r=bergzand a=gschorcht

### Contribution description

This PR provides the GD32V support in `drivers/usbdev_synopsys_dwc2`. It also includes some cleanup and bug fixes.

To support GD32V (CID 1.000) the PR includes the following changes:
- XFRC interrupts are also used in Non-DMA mode to complete a transfer
- SETUP phase done (STUP) interrupt is used in Non-DMA mode
- additional XFRC interrupts in SETUP stage are ignored
- RX FIFO handling doesn't complete a transfer anymore and is handled directly in ISR
- OTG interrupt handling added

The following fixes, improvements and cleanup has been added:
- USB OTG HS definition dependencies for platforms that don't support USB OTG HS
- thread context switch at ISR exit was added for all platforms
- units in USB FIFO size definitions are clarified
- USB EP number as defined in CMSIS is used
- FIFO allocation documentation is improved
- power modes for STM32 are fixed
- CID/HW debug info added

The PR could be split into a PRs with cleanups and improvements and a PR with GD32V support if necessary.

### Testing procedure
```
BOARD=sipeed-longan-nano make -j8 -C tests/shell
```
should work with `stdio_cdc_acm`.

`periph_usbdev` should still work for other platforms. The PR was tested with `tests/usbus_cdc_ecm` together with `stdio_cdc_acm` if possible:
```
esp32s2      FS  CID: 0000, HWREV: 4f54400a, HWCFG: 224dd930  (esp32s2-devkit)
esp32s3      FS  CID: 0000, HWREV: 4f54400a, HWCFG: 224dd930  (esp32s3-devkit)
efm32gg12    FS  CID: 0000, HWREV: 4f54330a, HWCFG: 228f5910  (sltb009a)
gd32vf103cb  FS  CID: 1000, HWREV: 00000000, HWCFG: 00000000  (sipeed-longan-nano)
stm32f407vg  FS  CID: 1200, HWREV: 4f54281a, HWCFG: 229dcd20  (stm32f4discovery) 
stm32f429zi  HS  CID: 1100, HWREV: 4f54281a, HWCFG: 229ed590  (stm32f429i-disc1)
stm32f439zi  FS  CID: 1200, HWREV: 4f54281a, HWCFG: 229dcd20  (nucleo-f439ze)
stm32f446ze  FS  CID: 2000, HWREV: 4f54320a, HWCFG: 229ed520  (nucleo-f446ze)
stm32f723ie  FS  CID: 3000, HWREV: 4f54330a, HWCFG: 229ed520  (stm32f723e-disco)
stm32f723ie  HS  CID: 3100, HWREV: 4f54330a, HWCFG: 229fe1d0  (stm32f723e-disco)
stm32f746ng  FS  CID: 2000, HWREV: 4f54320a, HWCFG: 229ed520  (stm32f746g-disco)
stm32f746ng  HS  CID: 2100, HWREV: 4f54320a, HWCFG: 229fe190  (stm32f746g-disco)
stm32f767zi  FS  CID: 2000, HWREV: 4f54320a, HWCFG: 229ed520  (nucleo-f767zi)
```
Boards with HS interfaces were tested in DMA and none-DMA mode.

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-04-17 08:36:02 +00:00
Gunar Schorcht
d8d9a9bdc4 cpu/esp32: disable warnings in ESP-IDF for gcc 12.2 2023-04-17 07:32:48 +02:00
Gunar Schorcht
0de2570802 cpu/esp32: fix compilation with gcc 12.2 2023-04-17 07:32:48 +02:00
Gunar Schorcht
1e983f3833 boards/common/gd32v: enable usb_board_reset if USB CDC ACM is used 2023-04-16 23:24:23 +02:00
Gunar Schorcht
c92b981581 boards/spieed-longan-nano: use stdio_cdc_acm by default 2023-04-16 23:24:23 +02:00
Gunar Schorcht
ff6e3d4f6d boards/seeedstudio-gd32: use stdio_cdc_acm by default 2023-04-16 23:24:23 +02:00
Gunar Schorcht
6d7c6c1957 boards/seeedstudio-gd32: add periph_usbdev support 2023-04-16 23:24:23 +02:00
Gunar Schorcht
ac8f221c1f boards/sipeed-longan-nano: add periph_usbdev support 2023-04-16 23:24:23 +02:00
Gunar Schorcht
81cf8a5eec cpu/gd32v: add periph_usbdev support 2023-04-16 23:24:23 +02:00
Gunar Schorcht
26d435a101 drivers/usbdev_synopsys_dwc2: add GD32V support 2023-04-16 23:24:23 +02:00