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

37156 Commits

Author SHA1 Message Date
f8e7e2f557
usbdev_mock: Adapt to xmit API
Includes the adaptations needed in the test application
2021-11-16 20:16:59 +01:00
597f1d19aa
usbdev: Refactor to xmit API
This API change refactors the usbdev API to supply buffers via the
usbdev_ep_xmit function. This changes from the usbdev_ep_ready call to allow
separate buffers per call. An usbdev_ep_buf_t pseudotype is available and must
be used when defining buffers used for endpoints to adhere to the DMA alignment
restrictions often required with usb peripherals.

Main advantage is that the usbdev peripherals no longer have to allocate
oversized buffers for the endpoint data, potentially saving multiple KiB
of unused buffer space. These allocations are now the responsibility of
the individual USB interfaces in the firmware
2021-11-16 11:21:07 +01:00
59e85cf921
usbdev: Refactor to xmit API
This API change refactors the usbdev API to supply buffers via the
usbdev_ep_xmit function. This changes from the usbdev_ep_ready call to allow
separate buffers per call. An usbdev_ep_buf_t pseudotype is available and must
be used when defining buffers used for endpoints to adhere to the DMA alignment
restrictions often required with usb peripherals.

Main advantage is that the usbdev peripherals no longer have to allocate
oversized buffers for the endpoint data, potentially saving multiple KiB
of unused buffer space. These allocations are now the responsibility of
the individual USB interfaces in the firmware
2021-11-16 11:21:00 +01:00
76215adef1
Merge pull request #17154 from maribu/cpu/stm32/periph_usb
cpu/stm32/periph/usbdev: fix alignment issues
2021-11-16 11:20:34 +01:00
Martine Lenders
3c402d88a8
Merge pull request #16774 from miri64/lwip/enh/v2.1.3
lwip: bump to v2.1.3
2021-11-16 10:25:50 +01:00
Francisco
6dd0521203
Merge pull request #17196 from maribu/tests/pthread_barrier
tests/pthread_barrier: fix test script
2021-11-16 10:21:06 +01:00
3bf4ef88fe
Merge pull request #17181 from fjmolinas/pr_examples_lorawan_ztimer
examples/lorawan: use ztimer_msec if not rtc
2021-11-16 09:51:59 +01:00
Francisco
5f119e3b6c
Merge pull request #17200 from bergzand/pr/usbus_cdc_ecm/check_max_frame_len
cdc_ecm: Truncate frames at max ethernet size
2021-11-16 07:54:01 +01:00
chrysn
d7559cc121
Merge pull request #17205 from benpicco/create-Makefile.ci
Makefile.include: rename Makefile.ci target to create-Makefile.ci
2021-11-15 21:59:12 +01:00
Dylan Laduranty
8f4ef1eb75
Merge pull request #17186 from benpicco/cpu/sam0_common/uart-frac
cpu/sam0_common: uart: set oversampling based on baud rate
2021-11-15 21:53:19 +01:00
Benjamin Valentin
3303b8c16a Makefile.include: rename Makefile.ci target to create-Makefile.ci
If we

    -include Makefile.ci

and `Makefile.ci` does not exist, but we provide `make` with a way
on how to do so, it will try to create `Makefile.ci`.

This is not what we want, but I don't know how to disable this automagic.
So rename the target to `create-Makefile.ci` to avoid the conflict.
2021-11-15 20:20:11 +01:00
chrysn
5a1c5ad096
Merge pull request #17202 from Ollrogge/doxygen_fix_pr
periph/flashpage: fix wrong doxygen group
2021-11-15 19:43:32 +01:00
Francisco
72abac66f1
Merge pull request #17183 from fjmolinas/pr_stm32wl_adc
cpu/stm32/wl: initial periph_adc implementation
2021-11-15 19:06:24 +01:00
3871948015
Merge pull request #17126 from bergzand/pr/benchmark/ztimer
sys/benchmark: Convert to ztimer
2021-11-15 18:56:18 +01:00
benpicco
7c8504186e
Merge pull request #16109 from benpicco/dist/tools/create_makefile.ci.sh
tools/insufficient_memory: add create_makefile.ci.sh and Makefile.ci make target
2021-11-15 18:12:01 +01:00
1855b9e9bd
Merge pull request #17199 from aabadie/pr/boards/stm32f769i-disco-cleanup
boards/stm32f769i-disco: fix and cleanup default configuration
2021-11-15 17:58:51 +01:00
Benjamin Valentin
0b3e4cd43f tools/insufficient_memory: add create_makefile.ci.sh 2021-11-15 17:41:54 +01:00
Ollrogge
37403c09eb periph/flashpage: fix wrong doxygen group 2021-11-15 17:25:59 +01:00
Francisco Molina
6346fc8613 boards/lora-e5-dev: map a4, a5 analog inputs 2021-11-15 17:07:21 +01:00
cd489cebd1
cdc_ecm: Truncate frames at max ethernet size
This truncates the incomming frames to ETHERNET_FRAME_LEN and silently
discards the rest of the frame until the end of the frame. This should
be modified to an endpoint halt condition after #17090 is merged, but
for now this should be good enough.

Stalling the endpoint with the current stall implementation could cause
a ping of death scenario, so for now the data is truncated until the
above solution can be implemented.
2021-11-15 16:04:13 +01:00
2f6b7bc651
Merge pull request #17082 from kaspar030/add_doxy_pattern_script
dist/tools/doccheck: add create_pattern.sh
2021-11-15 15:35:59 +01:00
556160b9a3
Merge pull request #17182 from ML-PA-Consulting-GmbH/fix/20211111__sys-suit__deps
sys/suit: adjust dependencies for CoAP transport
2021-11-15 15:27:47 +01:00
600adb8ec6
Merge pull request #17197 from fjmolinas/pr_dwm1001_spi0_pins
boards/dwm1001: fix SPI0 miso/mosi pins
2021-11-15 15:25:41 +01:00
f1feaa2063
tests/periph_gpio: Convert to ztimer 2021-11-15 15:24:38 +01:00
d9c78201cc
boards/stm32f769i-disco: remove wrong DMA configuration 2021-11-15 15:09:04 +01:00
benpicco
70ae34a448
Merge pull request #16979 from ospoco/master
cpu/stm32: Add hardening changes to stm32
2021-11-15 15:09:01 +01:00
527d321533
boards/stm32f769i-disco: fix mistake in Kconfig clock config 2021-11-15 15:08:20 +01:00
8c2f0dd2af
sys/benchmark: Convert to ztimer 2021-11-15 14:14:23 +01:00
Francisco Molina
2b842a9ec5 boards/dwm1001: fix SPI0 miso/mosi pins 2021-11-15 10:53:36 +01:00
Francisco
6dbf1c3013
Merge pull request #17102 from aabadie/pr/drivers/ads101x_ztimer
drivers/ads101x: migrate to ztimer
2021-11-15 09:56:14 +01:00
Francisco Molina
63c51d4add cpu/stm32/wl: initial periph_adc implementation 2021-11-15 09:52:45 +01:00
Marian Buschsieweke
e78a45b319
tests/pthread_barrier: fix test script
Previously the test script relied on the exact sequence of numbers
returned by the used PRNG. This resulting e.g. in

```
$ USEMODULE=prng_musl_lcg make -C tests/pthread_barrier flash test
```

to fail, only because the order in which the children completed is
slightly different due to different sleep durations. This fixes the
issue.
2021-11-15 09:10:03 +01:00
Marian Buschsieweke
5e925e1906
Merge pull request #17192 from maribu/sys/fido2
sys/fido2: fix CBOR parsing
2021-11-13 21:43:57 +01:00
Marian Buschsieweke
8a178f49e7
sys/fido2: fix CBOR parsing
The TinyCBOR library takes a `size_t *` length argument in many
functions which at function call contains the length of a buffer, and
at exit the actual size of the data. The FIDO-2 code however uses
`uint8_t` fields in `struct`s to store the data. Previously, a pointer
to that `uint8_t` filed was just casted to `size_t *`, resulting in
three neighboring bytes also being interpreted as being part of the
buffer size - which could result in undetected buffer overflows.
Similar, upon exit of the function not only the `uint8_t` sized length
`struct` member but also three neighboring bytes were written to.

I didn't care to investigate, but this really looks like crafted CBOR
payloads send to the FIDO2 implementation could result in arbitrary
code execution on the device.
2021-11-13 20:32:02 +01:00
benpicco
7da50b05a9
Merge pull request #17190 from benpicco/drivers/dose-padding
drivers/dose: reduce struct padding
2021-11-12 20:45:24 +01:00
Karl Fessel
3d33cee551
Merge pull request #17137 from kfessel/p-ztimer-at30tse75x
driver/at30tse75x: port to ztimer_usec
2021-11-12 17:12:11 +01:00
Benjamin Valentin
b34b67feee drivers/dose: reduce struct padding
By moving all the single byte struct elements to the end, we can reduce
padding inside `dose_t` and ensure that `recv_buf` is always aligned.

This saves some RAM:

master
------
   text	   data	    bss	    dec	    hex	filename
  36384	    136	  12944	  49464	   c138 tests/driver_dose/bin/samr21-xpro/tests_driver_dose.e

this patch
----------
   text	   data	    bss	    dec	    hex	filename
  36484	    136	  12936	  49556	   c194	tests/driver_dose/bin/samr21-xpro/tests_driver_dose.elf
2021-11-12 16:19:20 +01:00
Marian Buschsieweke
c18dc7157d
Merge pull request #17177 from maribu/sys/architecture
sys/architecture: add HAS_ALIGNMENT_OF() helper
2021-11-12 14:12:08 +01:00
benpicco
6f4c354461
Merge pull request #17139 from fjmolinas/pr_static_cocci_remove
dist/tools/coccinelle/force: remove static.cocci
2021-11-12 13:53:37 +01:00
benpicco
1c3ceb2bd6
Merge pull request #17185 from fjmolinas/pr_lora_e5_dev_warning
boards/lora-e5-dev: add warning in doc
2021-11-12 13:42:17 +01:00
benpicco
046ecf221e
Merge pull request #17187 from fjmolinas/pr_i2c_stm32wl_typo
cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro
2021-11-12 13:41:58 +01:00
VanL
ee832148b3 cpu/stm32: Add hardening changes to stm32
Initialize STM32 RDP in a glitch-resistant fashion to prevent
debugger use when restrictions are set by the designer.
2021-11-11 15:58:52 -06:00
Francisco Molina
ec0e3d242e cpu/stm32/include/cpu_conf_stm32_common.h: fix typo in macro 2021-11-11 19:58:34 +01:00
Francisco Molina
b247dbca97 examples/lorawan: use ztimer_msec if not rtc 2021-11-11 18:03:04 +01:00
a85853ae30
Merge pull request #17125 from aabadie/pr/cpu/native_rtc_ztimer
cpu/native: migrate periph_rtc to ztimer
2021-11-11 17:26:10 +01:00
Benjamin Valentin
18cdd100a9 cpu/sam0_common: uart: set oversampling based on baud rate
In Asynchronous Fractional baud rate mode, the baud rate can not be
greater than the source frequency divided by the oversampling (8, 16).

Currently we are always using 16x oversampling.
This makes it impossible to e.g. set a 2 MHz UART baud rate on the 16 MHz
`saml10-xpro`.

With this change, the oversampling is automatically reduced to 8x which
allows us to set 16 MHz / 8 -> 2 MHz baud rate.
2021-11-11 17:03:05 +01:00
Francisco Molina
773d576bdc boards/lora-e5-dev: add warning in doc 2021-11-11 16:51:51 +01:00
Daniel Lockau
201e42a497 examples/suit: remove automatic deps 2021-11-11 14:00:31 +01:00
Daniel Lockau
9e1e7be77e sys/suit: adjust dependencies for CoAP transport 2021-11-11 13:58:32 +01:00
1772628483
Merge pull request #16186 from kaspar030/fix_native_notext
cpu/native: add `-no-pie` to LINKFLAGS
2021-11-11 11:50:54 +01:00