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

42867 Commits

Author SHA1 Message Date
Benjamin Valentin
f5bd5308e4 MAINTAINING.md: add some notes on Bors 2023-02-27 17:28:16 +01:00
bors[bot]
ee7ea44d0e
Merge #19324
19324: doc: Add out of tree RIOT app documentation r=benpicco a=bergzand

### Contribution description

This PR adds documentation on how to create an out-of-tree RIOT application using a directory structure I've personally been using for a few projects.

### Testing procedure

Check the new documentation and try to determine whether it is sufficient and clear enough to get somewhat new users up to speed


### Issues/PRs references

The occasional forum post and Matrix question on how to achieve this


Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-02-27 15:04:27 +00:00
bors[bot]
231393c894
Merge #19326
19326: sys/doc.txt: add sys_compression doxygen group r=aabadie a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-27 14:17:36 +00:00
Benjamin Valentin
31534fcb84 sys/doc.txt: add sys_compression doxygen group 2023-02-27 15:09:08 +01:00
68bc404f94
doc: Add out of tree RIOT app documentation 2023-02-27 14:48:47 +01:00
bors[bot]
e50d4f9d98
Merge #19323
19323: SUBSYSTEMS.md: Adding myself to the relevant parts r=benpicco a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-02-27 13:43:42 +00:00
Martine Lenders
662ce5ed2c
SUBSYSTEMS.md: Adding myself to the relevant parts 2023-02-27 13:13:57 +01:00
bors[bot]
f0b60d5a0d
Merge #17091 #18148
17091: USBUS: Add URB support r=benpicco a=bergzand

### Contribution description

This commit adds support for URBs (USB Request/Response Blocks). These
allow for submitting multi-transfer sized buffers with USBUS handling
the individual usbdev xmits. Multiple URBs can be queued at once for a
single endpoint and USBUS will handle them in the order of submission.

OUT endpoint URBs must always consist of a whole number of full-sized
transfers (N x MaxEndpointSize). They will automatically finish after
the endpoint received a transfer less than the endpoint size.

IN endpoints can be arbitrary-sized and do not have to consist of a
whole number of full-sized transmissions. They support a flag to
indicate that the last transfer in the sequence must be less than a full
sized transfer (USBUS_URB_FLAG_AUTO_ZLP) and this adds a zero length
transfer at the end of the transmissions if the last transfer was equal
to the maximum transfer size.

URBs can be cancelled, but if the URB is already being processed it will
be cancelled after the current transmission within the URB is finished.
If it is still in the queue it will immediately be removed from the
queue.

### Testing procedure

- `tests/usbus_cdc_ecm` should still work. Testing one of the usbdev-supported platform should be sufficient here.

### Issues/PRs references

Needs #17064 


18148: sys/flash_utils: helpers to store data in flash r=benpicco a=maribu

### Contribution description

This helpers that allow storing, accessing, and working with data in flash that works for both classical Harvard architectures (which do not map flash also into the address space) as well as modern Harvard architectures and von-Neumann architectures.

With this, `examples/default` again runs on the Arduino Uno / Nano. Since this board is still the "entry kit" for many people to embedded hardware, it would be nice to support it with our default example.

### Testing procedure

`examples/default` should run and work on ATmega boards (especially ATmega328P and ATmega32U4 based boards) as well on all other boards now.

### Issues/PRs references

None

Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-02-27 11:57:20 +00:00
Marian Buschsieweke
7e58bea1bd
examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
Marian Buschsieweke
cdcec5b3f9
drivers/saul: use flash_utils 2023-02-27 12:31:04 +01:00
Marian Buschsieweke
29cfeb752e
sys/phydat: use flash_utils 2023-02-27 12:31:03 +01:00
Marian Buschsieweke
2825f5f2ae
sys/shell: use flash_utils 2023-02-27 12:31:03 +01:00
Marian Buschsieweke
c406f7ef42
cpu/avr8_common: Wrap stdio.h
This allows automatically moving format strings to flash, provided that
code previously compiled fine with `-Wformat-nonliteral` (which in RIOT
is the case due to `-Wformat=2`).
2023-02-27 12:31:03 +01:00
Marian Buschsieweke
75f17b4930
pkg/cryptoauthlib: Fix compilation with -Wformat-nonliteral 2023-02-27 12:31:03 +01:00
Marian Buschsieweke
4e3c0777fc
sys/flash_utils: add helpers for placing variables in flash
This adds a layer of convenience abstraction over classical Harvard
architectures (like most AVRs) that do not map the flash memory into
the data address space and modern Harvard architectures or von-Neumann
architectures that do so. The motivation is to safe a lot of RAM for
AVR by storing constant strings into flash.
2023-02-27 12:31:03 +01:00
Marian Buschsieweke
e5d0f83696
cpu/atmega_common: store periph_timer prescalers in flash 2023-02-27 12:06:30 +01:00
Marian Buschsieweke
7e8a0ae2d4
build system: use -std=gnu11 for avr8
This allows using the __flash qualifier to store data into flash.
2023-02-27 12:06:29 +01:00
bors[bot]
e9333feac2
Merge #19322
19322: subsystems: Assign chrysn to Rust r=bergzand a=chrysn

This sets me as the (so far, sole) subsystem assignee for Rust.

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-27 10:02:17 +00:00
ba88608749
usbus/cdc_ecm: Make use of URBs for inbound frames 2023-02-27 10:09:55 +01:00
7bfdd73818
usbus: Add URB support
This commit adds support for URBs (USB Request/Response Blocks). These
allow for submitting multi-transfer sized buffers with USBUS handling
the individual usbdev xmits. Multiple URBs can be queued at once for a
single endpoint and USBUS will handle them in the order of submission.

OUT endpoint URBs must always consist of a whole number of full-sized
transfers (N x MaxEndpointSize). They will automatically finish after
the endpoint received a transfer less than the endpoint size.

IN endpoints can be arbitrary-sized and do not have to consist of a
whole number of full-sized transmissions. They support a flag to
indicate that the last transfer in the sequence must be less than a full
sized transfer (USBUS_URB_FLAG_AUTO_ZLP) and this adds a zero length
transfer at the end of the transmissions if the last transfer was equal
to the maximum transfer size.

URBs can be cancelled, but if the URB is already being processed it will
be cancelled after the current transmission within the URB is finished.
If it is still in the queue it will immediately be removed from the
queue.
2023-02-27 10:09:53 +01:00
chrysn
04320bcbf5 subsystems: Assign chrysn to Rust 2023-02-27 09:56:00 +01:00
bors[bot]
d4422a074a
Merge #18682
18682: pkg/lwext4: add lightweight implementation of the ext2/3/4 filesystem r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-25 18:59:07 +00:00
bors[bot]
ae32ce7fda
Merge #19318
19318: efm32/dac: Shift instead of masking r=chrysn a=chrysn

The documented behavior is:

> The value is always given as 16-bit value and is internally scaled to the actual resolution that the DAC unit provides (e.g. 12-bit). So to get the maximum output voltage, this function has to be called with value set to 65535 (UINT16_MAX).

The previous behavior was masking, now it's shifting.

### Testing procedure

* Run tests/periph_dac interactively and look at the voltage with an oscilloscope.

  Before, the period was 100ms/16, now it's 100ms as advertised.

*Note: I couldn't do that yet, the above is just what I expect.*

### Issues/PRs references

Closes: https://github.com/RIOT-OS/RIOT/issues/19317

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-25 13:08:32 +00:00
Benjamin Valentin
020aac6c4c boards/same54-xpro: add support for lwEXT4 2023-02-25 14:01:20 +01:00
Benjamin Valentin
c1a8a5cc9e boards/native: add support for lwEXT4 2023-02-25 14:01:20 +01:00
Benjamin Valentin
e798d21b3b pkg/lwext4: add lwEXT4 2023-02-25 14:01:20 +01:00
chrysn
b04af7920c efm32/dac: Shift instead of masking
Closes: https://github.com/RIOT-OS/RIOT/issues/19317
2023-02-25 13:38:56 +01:00
bors[bot]
9d1d4bb1b2
Merge #19119 #19313
19119: makefiles/tools/serial.inc.mk: Allow detection of debug adapter r=benpicco a=maribu

### Contribution description

This PR adds the ability to automatically detect the debug adapter for boards with an integrated programmer/debugger, if that debugger also provides the TTY.

This extends the TTY detection that can be enabled with `MOST_RECENT_PORT=1` to set `DEBUG_ADAPTER_ID` to the TTY's serial, but only if `DEBUG_ADAPTER_ID_IS_TTY_SERIAL` is set to `1` by the board (as not all boards have an integrated programmer/debugger).

### Testing procedure

Connect a HiFive-1B and a nRF52840DK at the same time and try `make BOARD=<nrf52840dk|hifive1b> MOST_RECENT_PORT=1 -C examples/default flash term` for both. The programmer will not reliably select the correct programmer in `master`. With this PR, it will.

### Issues/PRs references

None

19313: gnrc_static: don't parse address as prefix r=benpicco a=benpicco



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-24 17:46:10 +00:00
Marian Buschsieweke
64d4aec812
boards: Provide debug adapter ID from serial where possible
Set `DEBUG_ADAPTER_ID_IS_TTY_SERIAL` to `1` for those boards to allow
automatic detection of the debug adapter with `MOST_RECENT_PORT=1`.
2023-02-24 16:50:59 +01:00
Marian Buschsieweke
015ee050f2
makefiles/tools/serial.inc.mk: Allow detection of debug adapter
Boards with an integrated debugger/programmer that also provides the
serial as UART <--> USB adapter, the TTY serial matches the serial of
the programmer.

This adapts the `serial.inc.mk` to set the `DEBUG_ADAPTER_ID` to the
TTY serial if (and only if) `MOST_RECENT_PORT` *and*
`DEBUG_ADAPTER_ID_IS_TTY_SERIAL` both have a value of `1`. Boards with
an integrated programmer are expected to set
`DEBUG_ADAPTER_ID_IS_TTY_SERIAL` to `1` in their `Makefile.include`.
2023-02-24 16:50:56 +01:00
Marian Buschsieweke
48a02d60e2
dist/tools/usb-serial/ttys.py: Allow combining simple formats
For scripts it can be useful to output not only one, but multiple
formats (e.g. to obtain both path and serial of a TTY). The script
now support passing multiple formats.

Note that only simple formats can be combined, as the JSON and markdown
table won't mix well with any other format.
2023-02-24 16:49:44 +01:00
Benjamin Valentin
4e642451c8 gnrc_static: don't parse address as prefix 2023-02-24 16:03:16 +01:00
bors[bot]
1de75a6cbb
Merge #19309
19309: ci/print_versions: print all ESP32 toolchains r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-24 13:12:07 +00:00
bors[bot]
e70f257b81
Merge #19311
19311: boards/microbit-v2: Recognize with MOST_RECENT_PORT r=maribu a=chrysn

### Contribution description

Since the introduction MOST_RECENT_PORT support, we've been gathering identifying criteria for particular boards to make it useful.

This adds such criteria to the microbit-v2. (They might also apply to the classical microbit board, but I have none to test; if it does, they're indistinguishable and that's something that can happen.)

### Testing procedure

* Connect something that has a USB UART, and then a microbit-v2, and then something yet different. (There might be simpler test setups).
* Run `make BOARD=microbit-v2 all term MOST_RECENT_PORT=1`
* Observe that /dev/ttyACM1 is selected.

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-24 12:41:31 +00:00
bors[bot]
e4453d9cd2
Merge #19312
19312: SUBSYSTEMS.md: add myself to the list r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-24 12:24:18 +00:00
chrysn
8dff7cc347 boards/microbit-v2: Recognize with MOST_RECENT_PORT 2023-02-24 12:44:45 +01:00
Benjamin Valentin
e5a6fa1342 SUBSYSTEMS.md: add myself to the list 2023-02-24 12:17:54 +01:00
bors[bot]
0dfc05c77c
Merge #19165 #19303
19165: cpu/sam0_common: adc: implement 16 bit mode by oversampling r=dylad a=benpicco



19303: dist/tools/insufficient_memory: Minor improvements r=benpicco a=maribu

### Contribution description

`create_makefile.sh`:
- address all shellcheck warnings
- make script POSIX shell compatible
- use nproc to set the number of parallel jobs to increase throughput
- print error messages when building fails
- run `make info-boards-supported` with `EXTERNAL_BOARD_DIRS=""` to avoid adding out-of-tree boards to `Makefile.ci`.
- classify output as "not supported" also when used features are blacklisted, not only when required features are missing

`add_insufficient_memory_board.sh`:
- classify output as "not supported" also when used features are blacklisted, not only when required features are missing

### Testing procedure

Run the script; it should still work.

### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-02-23 23:58:02 +00:00
Benjamin Valentin
0ecba666b9 ci/print_versions: don't print compiler error 2023-02-23 23:51:25 +01:00
Benjamin Valentin
c89eccd219 ci/print_versions: print all ESP32 toolchains 2023-02-23 23:49:14 +01:00
bors[bot]
4809b687b6
Merge #19292 #19307
19292: sys/phydat: Fix unit confusion r=miri64 a=maribu

### Contribution description

Previously, `UNIT_G` was used for g-force with the correct symbol `g`, `UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs` (which is an alternative correct symbol).

To avoid confusion between G-Force, Gauss, and Gram the units have been renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition, gram now uses the correct symbol `g`; which sadly is the same as for g-force. But usually there is enough context to tell them apart.

### Testing procedure

Green CI

### Issues/PRs references

None

19307: nanocoap_link_format: fix off-by-one error r=miri64 a=benpicco



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-23 21:25:12 +00:00
Benjamin Valentin
470bee59a7 cpu/sam0_common: implement 16 bit mode by oversampling 2023-02-23 22:17:48 +01:00
bors[bot]
72a0f1972d
Merge #18746 #19161
18746: sys/clif: Fixing out of bounds read under certain conditions r=maribu a=Teufelchen1

Hi 😈

This fixes a potential out of bounds read in clif_encode_link. There is no code in RIOT that can be exploited.
The fix does not break the current API but alters the behaviour slightly. Before the change, the length attributes of `clif_attr_t` where optional. If missing, the length was deduced using `strlen()`. This fix makes those parameters required and if they are `0` it operates as if the length really is `0`. This might not be ideal but it is the only non api breaking fix I could think off. 
```c
typedef struct {
    char *value;                  
    unsigned value_len;    NO LONGER OPTIONAL
    const char *key;               
    unsigned key_len;       NO LONGER OPTIONAL
} clif_attr_t;
```
Depends on #18744

cc `@leandrolanzieri` 

19161: bors.yaml: re-activate labels check + add block_labels r=miri64 a=miri64



Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-02-23 16:39:44 +00:00
Marian Buschsieweke
3c287c058d
sys/phydat: Fix unit confusion
Previously, `UNIT_G` was used for g-force with the correct symbol `g`,
`UNIT_GR` for gram (as in kilogram) with the incorrect symbol `G` (which
would be correct for Gauss), and `UNIT_GS` for Gauss with symbol `Gs`
(which is an uncommon but correct symbol).

To avoid confusion between G-Force, Gauss, and Gram the units have been
renamed to `UNIT_G_FORCE`, `UNIT_GRAM`, and `UNIT_GAUSS`. In addition,
gram now uses the correct symbol `g` and Gauss uses `G`.
2023-02-23 16:44:24 +01:00
Benjamin Valentin
7468c6272b nanocoap_link_format: fix off-by-one error 2023-02-23 16:34:56 +01:00
Martine Lenders
a7c450311b
bors.yaml: re-activate labels check + add block_labels 2023-02-23 15:49:46 +01:00
Teufelchen1
8c295ab7cf sys/clif: Fixing out of bounds read under certain conditions 2023-02-23 15:45:03 +01:00
Marian Buschsieweke
fe176f5b1f
dist/tools/insufficient_memory: Minor improvements
`create_makefile.sh`:
- address all shellcheck warnings
- make script POSIX shell compatible
- use nproc to set the number of parallel jobs to increase throughput
- print error messages when building fails
- run `make info-boards-supported` with `EXTERNAL_BOARD_DIRS=""` to
  avoid adding out-of-tree boards to `Makefile.ci`.
- classify output as "not supported" also when used features are
  blacklisted, not only when required features are missing
- classify output as "not supported' also when output contains
  `not supported.  Stop.`, e.g. as raised by pkg/tinyusb on unsupported
  CPUs / CPU families.

`add_insufficient_memory_board.sh`:
- classify output as "not supported" also when used features are
  blacklisted, not only when required features are missing
- classify output as "not supported' also when output contains
  `not supported.  Stop.`, e.g. as raised by pkg/tinyusb on unsupported
  CPUs / CPU families.
2023-02-23 13:47:00 +01:00
bors[bot]
bcd550bc68
Merge #19304
19304: matrix_keypad: Move documentation to doxygen group r=benpicco a=bergzand

### Contribution description

This moves the documentation for the matrix keypad module from the header file to the doxygen group. With this a reader doesn't have to click to the header file definitions from the doxygen group to read the documentation.

### Testing procedure

Take a brief look at the generated doxygen.


### Issues/PRs references

None


Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-02-23 12:23:50 +00:00
f4d4784034
matrix_keypad: Move documentation to doxygen group 2023-02-23 11:39:11 +01:00