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

43818 Commits

Author SHA1 Message Date
MrKevinWeiss
d419898d6a
sys/usb: Rework usb kconfig model 2023-05-31 12:55:52 +02:00
MrKevinWeiss
adff099d61
sys/Kconfig.stdio: Add FORCE_ and REQUIRES_ USB 2023-05-31 12:55:51 +02:00
MrKevinWeiss
e481571b4e
cpu/esp32: Move MODULE_STDIO_USB_SERIAL_JTAG to cpu 2023-05-31 12:55:51 +02:00
MrKevinWeiss
bfd9153391
tools/kconfiglib: Update to RIOT-OS package 2023-05-31 12:55:47 +02:00
c7f1226588
examples/micropython: add Kconfig config 2023-05-31 09:44:23 +02:00
bors[bot]
d742513b62
Merge #19664
19664: usbus: don't trigger assertion in usbus_urb_submit() r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-31 07:13:24 +00:00
bors[bot]
67c011f5a4
Merge #19686 #19687
19686: sys/string_utils: add memchk() r=maribu a=benpicco



19687: tests/unittests: remove old workaround for SAML1X and gcc9.X bug r=maribu a=dylad

### Contribution description
This reverts #13462, this workaround is no longer needed with newer GCC version.

### Testing procedure

Try to compile tests/unittests for `saml11-xpro` or `saml10-xpro`

### Issues/PRs references

This is a revert of #13462.


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-05-30 23:26:16 +00:00
bors[bot]
f10426709c
Merge #19677 #19683
19677: boards/nucleo-l432k: provide three periph_timer instances r=maribu a=maribu

### Contribution description

- `cpu/stm32/periph_timer`: Generalize to also work with timers that do not have 4 channels
- `boards/common/stm32`: Add timer config for three timers based on TIM2, TIM15, and TIM16 (the three general-purpose timers of the STM32L4)
- `boards/nucleo-l432kc`: Make use of the new timer config


19683: cpu/sam0_eth: clean up init() r=maribu a=benpicco





Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-30 20:01:21 +00:00
Dylan Laduranty
6499b698fa tests/unittests: remove old workaround for SAML1X and gcc9.X bug
This reverts #13462, this workaround is no longer needed with newer GCC version

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-05-30 21:44:22 +02:00
Benjamin Valentin
4476b2a024 sys/net/gnrc_pktbuf: make use of memchk() 2023-05-30 20:45:13 +02:00
Benjamin Valentin
55dc66e942 tests/unittests: libc: add test for memchk() 2023-05-30 20:40:28 +02:00
Benjamin Valentin
c57b13f1e8 sys/string_utils: add memchk()
Check if all bytes in a buffer are set to s certain value - inverse
of memset().
2023-05-30 20:39:10 +02:00
Benjamin Valentin
23790a3f52 sys/string_utils: fix doxygen title 2023-05-30 20:11:17 +02:00
bors[bot]
00b5bc12a2
Merge #19610 #19670 #19678 #19679 #19680 #19681
19610: drivers/periph/rtc: improve doc on rtc_set_alarm r=maribu a=maribu

### Contribution description

- point out behavior on denormalized time stamps
- use errno codes to indicate errors (and adapt the few instances of actual error handling to use them)


19670: cpu/stm32: stm32f4 BRR from BSRR r=maribu a=kfessel

### Contribution description

sometimes one wants to save one instruction :) 
just write the bits we need to write.

### Testing procedure

tests/periph/gpio_ll tests this 

### Issues/PRs references

`@maribu` might know some reference

maybe #19407

19678: gnrc_sixlowpan_iphc: fix NULL pointer dereference r=maribu a=miri64



19679: gnrc_sixlowpan_frag_sfr: fix ARQ scheduler race-condition r=maribu a=miri64



19680: gnrc_sixlowpan_frag_rb: fix OOB write in _rbuf_add r=maribu a=miri64



19681: sys/xtimer: improve documentation r=maribu a=maribu

### Contribution description

- Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer` is gone


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-05-30 17:11:06 +00:00
Marian Buschsieweke
51127f674a
drivers/periph/rtc: improve doc on rtc_set_alarm
- point out behavior on denormalized time stamps
- use errno codes to indicate errors (and adapt the few instances of
  actual error handling to use them)
2023-05-30 17:41:36 +02:00
Marian Buschsieweke
9454a50df3
sys/xtimer: improve documentation
- Add a deprecation note to xtimer, so that new code hopefully
  starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer`
  is gone
2023-05-30 17:32:48 +02:00
bors[bot]
4fa53d654f
Merge #19682
19682: gnrc_sixlowpan_frag_sfr: mark as experimental + doc fixes r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-05-30 15:05:46 +00:00
Martine Lenders
1aeb90ee55
gnrc_sixlowpan_frag_rb: fix OOB write in _rbuf_add 2023-05-30 16:44:09 +02:00
Martine Lenders
31c6191f61
gnrc_sixlowpan_frag_sfr: fix ARQ scheduler race-condition 2023-05-30 16:42:35 +02:00
MrKevinWeiss
b618db2464
tests/sys/fido2_ctap: Replace ztimer with ztimer_sec 2023-05-30 16:42:01 +02:00
Karl Fessel
f8a64dfb1c
cpu/stm32: stm32f4 BRR from BSRR 2023-05-30 16:06:35 +02:00
Benjamin Valentin
faf8be39c6 cpu/sam0_eth: clean up init()
- don't enable PHY twice
 - properly set NCFGR register
 - sam0_read_phy() does not return a signed value
2023-05-30 15:41:24 +02:00
Martine Lenders
dc333463d8
gnrc_sixlowpan_frag_sfr: Mark feature as experimental 2023-05-30 14:51:07 +02:00
Martine Lenders
6ea04e19e7
gnrc_sixlowpan_frag_sfr: fix reference in documentation 2023-05-30 14:50:46 +02:00
Martine Lenders
c9d7863e56
gnrc_sixlowpan_iphc: fix NULL pointer dereference 2023-05-30 14:27:13 +02:00
Marian Buschsieweke
0051d4148c
boards/nucleo-l432kc: provide three periph_timer instances 2023-05-30 13:05:38 +02:00
Marian Buschsieweke
a6e8e1ff7e
boards/common/stm32: Add timer config based on TIM2,15,16
This adds the three general purpose timers on STM32L4 boards in a
central place so that STM32L4 boards can just include it.

Some other families may also have TIM15 and TIM16 and could use this,
but likely some generalization is needed to use this for other
families as well. This can be added later on.
2023-05-30 13:03:19 +02:00
Marian Buschsieweke
7c0a4b8390
cpu/stm32/periph_timer: Support timers with channels != 4
The assumption that all STM32 timers have exactly four channels no
longer holds. E.g. the STM32L4 has the following general purpose timers:

- TIM2: 32 bit, 4 channels
- TIM15: 16 bit, 2 channels
- TIM16: 16 bit, 1 channel

Hence, a new field is added to the timer configuration to also contain
the number of timer channels. Due to alignment the `struct` previously
was padded by 16 bit, so adding another 8 bit field doesn't increase
its size.

For backward compatibility, a value of `0` is considered as alias for
`TIMER_CHANNEL_NUMOF` (or 4), so that the number of timer channels
only needs to be set when the timer is different from the typical 4
channel timer. This helps backward compatibility.
2023-05-30 12:55:29 +02:00
b93bbe9e6b
pkg/micropython: model in Kconfig 2023-05-30 11:00:25 +02:00
bors[bot]
e690ef4c12
Merge #19673
19673: tools/build_system_sanity_check: add check to verify test applications are at the right place r=maribu a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-28 08:22:49 +00:00
7bac10f13d
dist/tools/buildsystem_sanity_check: add check for tests subdirs 2023-05-28 09:42:40 +02:00
bors[bot]
f08ab0814c
Merge #19629
19629: cpu/stm32/periph/adc: fix setting ADC clock r=benpicco a=Enoch247

### Contribution description

The current implementation uses the core clock frequency to calculate the needed prescalar to achieve a given ADC clock frequency. This is incorrect. This patch fixes the calculation to use the correct source clock (PCKLK2 ie APB2). It also changes the defined max clock rate to use the frequency macro to improve readability.

I based on code similarity. I believe the gd32v CPU may need this same fix, but I am not familiar with that MCU.

### Testing procedure

I tested this on a nucleo-f767zi. The the MCU's reference manual is in agreement with what I have implemented here. I spot checked references manuals for a random [STM32F1](https://www.st.com/resource/en/reference_manual/cd00171190-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf) and [STM32F2](https://www.st.com/resource/en/reference_manual/rm0033-stm32f205xx-stm32f207xx-stm32f215xx-and-stm32f217xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf), and they are clocked similar to the F7 I have.

### Issues/PRs references

None known.


Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
2023-05-28 05:23:29 +00:00
bors[bot]
d58f2c8501
Merge #19268
19268: shell_lock: don't set CONFIG_SHELL_SHUTDOWN_ON_EXIT r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-27 22:23:54 +00:00
bors[bot]
1710650256
Merge #19601
19601: SUIT: Prepared manifests r=chrysn a=chrysn

### Contribution description

While SUIT can generally be used already with manifests that are "dropped into memory" (by any mechanism), the convenient SUIT worker thread mechanism so far could not be used with it.

This adds the suit_worker_try_prepare / suit_worker_trigger_prepared
pair for using the SUIT worker, and breaks suit_handle_manifest_buf out
of suit_handle_url (where the latter now calls the former).

#### By-catch

As part of factoring out reaping of the zombie worker thread, a locking
error that deadlocks the SUIT worker in case the race between the mutex
being unlocked and the thread being reaped hits the necessary handling
code is fixed (and mutex_unlock is called in the error path).

### Testing procedure

SUIT tests should pass.

https://github.com/RIOT-OS/RIOT/pull/19659 provides a demo of how the new API is used.

### Issues/PRs references

I think that the currently employed mechanism of having a resource to which a URL with the manifest gets posted is contrary to the design goals of SUIT -- the signed manifest should be what justifies the device to spend resources (eg. get data from a server), not a URI that is just *not* signed.

This PR makes it easier to implement a resource to which the manifest can be POSTed, rather than a CoAP URI that represents the manifest, as is proposed (but not mature) in 
https://github.com/RIOT-OS/RIOT/pull/19659.

[edit: Adjusted to reflect decisions made during review]

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-05-27 19:14:05 +00:00
chrysn
8d6a375537 sys/suit: Fix missing include 2023-05-27 21:01:18 +02:00
chrysn
763474b485 sys/suit: Introduce functions to provide a manifest in memory
This adds the suit_worker_try_prepare / suit_worker_trigger_prepared
pair for using the SUIT worker, and breaks suit_handle_manifest_buf out
of suit_handle_url (where the latter now calls the former).

As part of factoring out reaping of the zombie worker thread, a locking
error that deadlocks the SUIT worker in case the race between the mutex
being unlocked and the thread being reaped hits the necessary handling
code is fixed (and mutex_unlock is called in the error path).
2023-05-27 21:01:18 +02:00
bors[bot]
af83e73e41
Merge #19576
19576: boards: add stm32l496g-disco support r=aabadie a=gschorcht

### Contribution description

The PR adds the board definition for the STM2L496G-DISO board.

It is the same board that is also shipped with the P-L496G-CELL02 LTE pack for which we already have the board definition `p-l496g-cell02`. However, `stm32l496g-disco` provides a complete configuration of the board and supports the following features in addition to `p-l496g-cell02`:
```
> FEATURES_PROVIDED += periph_adc
> FEATURES_PROVIDED += periph_dac
> FEATURES_PROVIDED += periph_dma
> FEATURES_PROVIDED += periph_pwm
> FEATURES_PROVIDED += periph_uart_hw_fc
> FEATURES_PROVIDED += arduino
```
In the long term, `p-l496g-cell02` is to be based on the new full `stm32l496g-disco` board definition.

The CPT and the LCD display are not yet supported since they are connected to/controlled by the MFX (a STM32L152-based sub-system) and the FMC peripheral.

### Testing procedure

All basic tests should work with the new board definition. The following tests were executed and did succeed:

- [x] `tests/periph/adc`
- [x] `tests/periph/dac`
- [x] `tests/periph/i2c` for `I2C_DEV(0)`, `I2C_DEV(1)` is not exposed and not tested
- [x] `tests/periph/pwm`
- [x] `tests/periph/spi` for `SPI_DEV(0)`, `SPI_DEV(1) connection not soldered and not tested
- [x] `tests/periph/timer` for `TIMER_DEV(0)` and `TIMER_DEV(1)`
- [x] `tests/periph/uart` for `UART_DEV(0)`, `UART_DEV(1)` and `UART_DEV(2)`
- [x] `tests/usbus_cdc_ecm` together with `stdio_cdc_acm`

### Issues/PRs references

~Depends on PR #19571~
~Depends on PR #19572~
~Depends on PR #19573~

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-05-27 15:08:54 +00:00
Gunar Schorcht
f7e026ab6a boards: add stm32l496g-disco support 2023-05-27 10:46:47 +02:00
Benjamin Valentin
c0a4acf32d sys/shell_lock: lock shell on EOF 2023-05-26 15:04:36 +02:00
Benjamin Valentin
f58384832c shell_lock: don't set CONFIG_SHELL_SHUTDOWN_ON_EXIT 2023-05-26 15:04:35 +02:00
bors[bot]
84a3078a93
Merge #19665
19665: doc: do not rebuild riot.css r=maribu a=maribu

### Contribution description

- simplify the makefile
    - changing behavior depending on lessc being installed is surprising and makes the Makefile less readable
    - failing with `make: lessc: No such file or directory` is helpful, but `make: No rule to make target 'src/css/riot.css'` is not clearly indicating that `lessc` was not found
- don't rebuild `riot.css` when generating HTML output
    - anyone touching the less file will have to manually call `make src/css/riot.css -C doc/doxygen`
    - this happens so rarely that implementing a convenient mechanism is not worth the trouble


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-25 17:09:27 +00:00
Marian Buschsieweke
cfee27cfb2
doc: do not rebuild riot.css
- simplify the makefile
    - changing behavior depending on lessc being installed is
      surprising and makes the Makefile less readable
    - failing with `make: lessc: No such file or directory` is helpful,
      but `make: No rule to make target 'src/css/riot.css'` is not
      clearly indicating that `lessc` was not found
- don't rebuild `riot.css` when generating HTML output
    - anyone touching the less file will have to manually call
      `make src/css/riot.css -C doc/doxygen`
    - this happens so rarely that implementing a convenient mechanism
      is not worth the trouble

Fixes https://github.com/RIOT-OS/RIOT/issues/8122
2023-05-24 21:24:08 +02:00
Benjamin Valentin
153dbd2495 usbus: don't trigger assertion in usbus_urb_submit() 2023-05-24 18:25:34 +02:00
bors[bot]
993c10a2a2
Merge #19556 #19662
19556: tools/mspdebug: fix `make debug` and `make debugserver` r=aabadie a=maribu

### Contribution description

The semantics of `make debug` and `make debugserver` have changed in the years since the MSP430 integration. This brings the implementation back into line with the current semantics

- `make debug` now starts both mspdebug and GDB, no need to run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added


19662: driver/lc709203f: remove unnecessary use of float r=aabadie a=kfessel

### Contribution description

removes a unnecessary use of float

### Testing procedure

read and test if you got that hardware (I don't)

### Issues/PRs references

#19614 

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
2023-05-24 15:54:23 +00:00
Marian Buschsieweke
ca15b1e1f8
tools/mspdebug: fix make debug and make debugserver
The semantics of `make debug` and `make debugserver` have changed in
the years since the MSP430 integration. This brings the implementation
back into line with the current semantics

- `make debug` now starts both mspdebug and GDB, no need to
  run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase
  cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added
2023-05-24 17:00:38 +02:00
bors[bot]
7b324d7a4f
Merge #19650 #19660
19650: drivers/nrf24l01p: model in kconfig r=aabadie a=aabadie



19660: cpu/rpx0xx: Fix kconfig model r=aabadie a=MrKevinWeiss



### Contribution description

Broken master due to incorrect model of the periph_pio in kconfig.

### Testing procedure

Green murdock (now that the board is added to the list)

### Issues/PRs references

Look at the master CI...

Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
2023-05-24 13:09:20 +00:00
Karl Fessel
2c3920ab62 driver/lc709203f: remove unnecessary use of float 2023-05-24 14:22:24 +02:00
bors[bot]
7d16a1b289
Merge #19636
19636: sys: model ecc, evtimer, pipe and shell_lock in kconfig r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-24 10:00:26 +00:00
4daa40d68c
tests/drivers/nrf24l01p_lowlevel: add Kconfig config 2023-05-24 10:18:54 +02:00
1dc6e0e32b
drivers/nrf24l01p: model in Kconfig 2023-05-24 10:18:53 +02:00