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

1780 Commits

Author SHA1 Message Date
db5ea456bd
makefiles/app_dirs.inc.mk: add tests/periphs subdirectory 2023-05-06 15:29:49 +02:00
aaf5468082
makefiles/app_dirs.inc.mk: add tests/pkgs subdirectory 2023-05-06 07:55:00 +02:00
Teufelchen1
bb76f13757 tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
Marian Buschsieweke
63d535e21d
makefiles/tools/jlink.inc.mk: use ELF file for flashing
There seems to be a consensus to go for a more ELF centric approach
whenever possible. J-Link seems to work fine with ELF files, so let's
avoid the extra step to create a bin file from the ELF file prior to
flashing.
2023-05-03 15:32:17 +02:00
Marian Buschsieweke
f220c23c20
tools/openocd: Fix handling of OPENOCD_CMD_RESET_HALT
The OPENOCD_CMD_RESET_HALT was not longer correctly passed to the
script. This fixes the issue.
2023-04-25 15:59:30 +02:00
bors[bot]
70e91e4cac
Merge #19499 #19500
19499: makefiles/features_modules: ignore periph_wdt_auto_start r=benpicco a=benpicco



19500: makefiles/features_modules: ignore periph_spidev_linux r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-04-24 23:26:07 +00:00
Benjamin Valentin
0078ab4522 makefiles/features_modules: ignore periph_spidev_linux 2023-04-24 16:57:42 +02:00
Benjamin Valentin
4965a229c9 makefiles/features_modules: ignore periph_wdt_auto_start 2023-04-24 15:40:15 +02:00
1c0f882db9
makefiles/pseudomodules.inc.mk: declare shell_cmd_gnrc_netif_lora 2023-04-22 08:17:45 +02:00
MrKevinWeiss
6d729033e5
makefiles/tools/serial.inc.mk: Handle new miniterm versions
While testing examples/micropython I notice that the default of miniterm.py is actually miniterm.
To simplify user setups, this checks for miniterm.py first then falls back to miniterm.
2023-04-04 12:47:54 +02:00
bors[bot]
19da279ba5
Merge #19374
19374: makefiles/boards/stm32: fix DFU_USB_ID handling r=benpicco a=gschorcht

### Contribution description

This PR fixes the still existing problem that an application can't be flashed to a STM32 board if it uses `riotboot_dfu` with default  VID/PID (1209:7d02).

In PR #18964 item 1, the problem was already described that an application can't be flashed on a board that is using `riotboot_dfu`. Using for example
```python
FEATURES_REQUIRED+=riotboot USEMODULE+=usbus_dfu make -C examples/saul BOARD=nucleo-f767zi \
PROGRAMMER=dfu-util all riotboot/flash-slot0
```
always leads to error
```python
/home/gs/src/RIOT-Xtensa-ESP.esp-idf-4.4/makefiles/boards/stm32.inc.mk:28: *** DFU_USB_ID is not set.  Stop.
/home/gs/src/RIOT-Xtensa-ESP.esp-idf-4.4/makefiles/boot/riotboot.mk:87: recipe for target 'riotboot/bootloader/binfile' failed
```
even if `DFU_USB_ID` variable is set as described in documentation.
```python
FEATURES_REQUIRED+=riotboot USEMODULE+=usbus_dfu make -C examples/saul BOARD=nucleo-f767zi \
PROGRAMMER=dfu-util DFU_USB_ID=1209:7d02 all riotboot/flash-slot0
```
The reason is that the variable `DFU_USB_ID` isn't exported and the check 8dc8bf3567/makefiles/boards/stm32.inc.mk (L27-L29) sees an empty `DFU_USB_ID` variable here. It prevents to use `dfu-util` event though the following `dfu-util.mk` will generate a default value for this variable from the `USB_VID` and `USB_PID` variables if necessary.

Commit 6a76b94c6e0ae97bc743cc90d0811e691a35869e of PR #18964 tried to fix this problem but wasn't merged for any reason.

To fix this problem, the check is completely removed. If a board such as `weact-f4x1cx` uses a DFU boorloader and requires a certain VID/PID combination, board's makefile is responsible to set `DFU_USB_ID` variable.

### Testing procedure

It is not necessary to use a real boad, checking the compilation process is sufficient.

1. Using default VID/PID as described in documentation:
   ```python
   FEATURES_REQUIRED+=riotboot USEMODULE+=usbus_dfu make -C examples/saul BOARD=nucleo-f767zi \
   PROGRAMMER=dfu-util all riotboot/flash-slot0
   ```
   can't be compiled without this PR but calls `dfu-util` correctly with this PR using the default VID/PID:
   ```python
   dfu-util --device 1209:7d02 --alt 0 --download examples/saul/bin/nucleo-f767zi/riotboot_files/slot0.1678440536.bin
   ```
2. Using a VID/PID as described in documentation:
   ```python
   FEATURES_REQUIRED+=riotboot USEMODULE+=usbus_dfu make -C examples/saul BOARD=nucleo-f767zi \
   DFU_USB_ID=1209:affe PROGRAMMER=dfu-util all riotboot/flash-slot0
   ```
   can't be compiled without this PR but calls `dfu-util` correctly with this PR using the default VID/PID:
   ```python
   dfu-util --device 1209:affe --alt 0 --download examples/saul/bin/nucleo-f767zi/riotboot_files/slot0.1678440536.bin
   ```
3. Compiling a board with DFU bootloader
   ```python
   make -C examples/saul flash BOARD=weact-f411ce
   ```
   should still call dfu-util with correct VID/PID:
   ```python
   dfu-util --device 0483:df11 --alt 0 --download /home/gs/src/RIOT-Xtensa-ESP.esp-idf-4.4/examples/saul/bin/weact-f411ce/saul_example.bin  --dfuse-address 0x8000000:leave
   ```
### Issues/PRs references



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-03-10 14:32:59 +00:00
7ab8d6100c
tools/renode: add support for target reset 2023-03-10 10:39:49 +01:00
Gunar Schorcht
9d2d9db73e makefiles/boards/stm32: fix DFU_USB_ID handling
The variable `DFU_USB_ID` is used by `dfu-util` to specify the device to be flashed. The STM32 make system prevents `dfu-util` from being used as programmer if this variable is not set, although `dfu-util.mk` generates a default value for this variable from the `USB_VID` and `USB_PID` variables if necessary. Therefore, checking the `DFU_USB_ID` variable is removed here. If a board requires a specific combination of VID/PID for `dfu_util`, it is responsible for setting the `DFU_USB_ID` variable.
2023-03-10 10:02:15 +01:00
Oleg Hahm
60a77948a7 Makefile.dep: pull in FEATURES_REQUIRED for periph
Whenever the module of a peripheral driver, i.e., periph_* should be used, the corresponding entry in the
FEATURES_REQUIRED should be added. Conflicts between these modules are
only checked when this entry is present.
2023-03-07 21:06:24 +01:00
Martine Lenders
13f613429d gnrc_sixlowpan_frag_sfr_congure: add congure_abe support 2023-03-01 20:23:32 +01:00
Martine Lenders
33402296d3
gnrc_sixlowpan_frag_sfr_congure: add congure_reno support 2023-03-01 16:32:31 +01:00
Martine Lenders
d0986caf03
gnrc_sixlowpan_frag_sfr_congure: add congure_quic support 2023-03-01 13:08:17 +01:00
bors[bot]
04ef37274f
Merge #16158
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-03-01 08:32:45 +00: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
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
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
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
Benjamin Valentin
e798d21b3b pkg/lwext4: add lwEXT4 2023-02-25 14:01:20 +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
6dc2a60597
drivers/servo: reimplement with high level interface
The previous servo driver didn't provide any benefit over using PWM
directly, as users controlled the servo in terms of PWM duty cycles.
This changes the interface to provide a high level interface that
abstracts the gory PWM details.

In addition, a SAUL layer and auto-initialization is provided.

Co-authored-by: benpicco <benpicco@googlemail.com>
2023-02-22 10:00:04 +01:00
Benjamin Valentin
980b60325c sys/shell/cmds: fix typo 'shell_cmd_grnc_udp' 2023-02-15 13:35:33 +01:00
bors[bot]
1c55118bd8
Merge #18257
18257: drivers/wdt: add periph_wdt_auto_start for early watchdog r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-13 21:09:07 +00:00
Benjamin Valentin
80fe4e5f26 sys/auto_init: add auto_init_wdt_{event, thread} modules 2023-02-13 15:06:24 +01:00
bors[bot]
5bdf2d38dc
Merge #19250 #19260
19250: sys/fmt: use `fflush(); stdio_write()` instead of `fwrite()` r=benpicco a=kaspar030



19260: sys/stdio: mark stdio_tinyusb_cdc_acm as buffered r=benpicco a=benpicco





Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-07 22:28:43 +00:00
Benjamin Valentin
c27010c630 sys/stdio: mark stdio_tinyusb_cdc_acm as buffered
stdio_tinyusb_cdc_acm benefits from stdio buffering (not transferring
individual bytes) just like stdio_cdc_acm.
2023-02-07 22:47:35 +01:00
df18af5195
Make: default to docker with generate-Makefile.ci 2023-02-04 16:53:49 +01:00
820a895684
Make: rename create-Makefile.ci to generate-Makefile.ci
With this rename it is in line with the other generate-* targets
2023-02-04 16:51:36 +01:00
Marian Buschsieweke
2b2506c052
build system: Fix linker feature test with newlib 4.3.0
Before the build system used something like

    echo "int main(){} void _exit(int n) {(void)n;while(1);}" | LC_ALL=C $(LINK) -xc - -o /dev/null -lc -Wall -Wextra -pedantic <FLAGS_TO_TEST>

to check for flags supported by the compiler (used as linker frontend).
This however no longer works with newlib 4.3.0, which requires the
symbols `_sbrk_r`, `_close_r`, `_lseek_r`, `_read_r`, and `_write_r` to
be present. Instead, now a new file `minimal_linkable.c` was added that
adds all the missing symbols and is used in the linker feature tests
instead.
2023-02-02 20:47:37 +01:00
6fb226d5a2 make: pass make jobserver to cargo 2023-01-26 21:43:39 +01:00
96e37a4f41
blobs: include documentation in doxygen 2023-01-26 09:27:47 +01:00
Benjamin Valentin
ea799e738d core/init: allow to run callback on main exit 2023-01-20 17:41:30 +01:00
Martine Lenders
914ca26bc7
gnrc_sixlowpan_frag_sfr_congure_sfr: initial import 2023-01-20 08:25:11 +01:00
bors[bot]
d6f44f6206
Merge #18414
18414: gcoap/fileserver: add event callbacks r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-01-16 22:23:46 +00:00
Benjamin Valentin
47295cc929 gcoap/fileserver: add event callbacks 2023-01-16 10:25:00 +01:00
bors[bot]
6fb340d654
Merge #19057 #19151
19057: fuzzing: Add uri_parser setup r=benpicco a=Teufelchen1

Hello!

### Contribution description

This PR is a replacement for PR #18802

In this contribution:

* The variable `AFL_FLAGS` is renamed to `FLAGS_FOR_AFL` because AFL is always complaining that `AFL_FLAGS` is not a valid env var for it. While this is not a bug nor an issue, I found it to be annoying.
*  A generic input reader is added to simplify building a test harness
*  The usage of this reader is demonstrated by adding a harness for fuzzing the uri_parser


(needs squashing after review)

### Testing procedure

Go to `fuzzing/uri_parser` and run `make all-asan` and `make fuzz` to get some action going.
Also mildly interesting: `./dist/tools/compile_test/compile_like_murdock.py -b native -a fuzzing/uri_parser`

### Issues/PRs references

The original PR #18802 is replaced because the generic input reader is present in both PRs but this PoC harness is much simpler.


19151: examples/gcoap: Fix shell parameter validation r=benpicco a=maribu

### Contribution description

Executing the shell command with an URI-Path that doesn't start with a slash results in an assertion error while composing the client side message. This is suboptimal user experience, so add an explicit check for a valid URI-Path and a dedicated error message.

### Testing procedure

#### In `master`

```
 $ make BOARD=microbit-v2 -C examples/gcoap flash term
[...]
2023-01-15 22:23:32,512 #  coap get [::1] /.well-known/core
2023-01-15 22:23:32,516 # gcoap_cli: sending msg ID 52272, 23 bytes
2023-01-15 22:23:32,520 # gcoap: response Success, code 2.05, 46 bytes
2023-01-15 22:23:32,524 # </cli/stats>;ct=0;rt="count";obs,</riot/board>
> coap get [::1] foo
2023-01-15 22:23:34,763 # coap get [::1] foo
2023-01-15 22:23:34,763 # 2329
2023-01-15 22:23:34,765 # *** RIOT kernel panic:
2023-01-15 22:23:34,767 # FAILED ASSERTION.
2023-01-15 22:23:34,767 # 
2023-01-15 22:23:34,775 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current     
2023-01-15 22:23:34,784 # 	 - | isr_stack            | -        - |   - |    512 (  200) (  312) | 0x20000000 | 0x200001c8
2023-01-15 22:23:34,793 # 	 1 | main                 | running  Q |   7 |   1536 ( 1072) (  464) | 0x200006c0 | 0x2000095c 
2023-01-15 22:23:34,802 # 	 2 | 6lo                  | bl rx    _ |   3 |   1024 (  328) (  696) | 0x200036c0 | 0x200039c4 
2023-01-15 22:23:34,810 # 	 3 | ipv6                 | bl rx    _ |   4 |   1024 (  460) (  564) | 0x20001294 | 0x20001574 
2023-01-15 22:23:34,819 # 	 4 | udp                  | bl rx    _ |   5 |    512 (  300) (  212) | 0x20003e98 | 0x20003f9c 
2023-01-15 22:23:34,828 # 	 5 | coap                 | bl anyfl _ |   6 |   1112 (  704) (  408) | 0x20000e38 | 0x200011c4 
2023-01-15 22:23:34,837 # 	 6 | nrf802154            | bl anyfl _ |   2 |    896 (  288) (  608) | 0x20001a90 | 0x20001d54 
2023-01-15 22:23:34,843 # 	   | SUM                  |            |     |   6616 ( 3352) ( 3264)
2023-01-15 22:23:34,843 # 
2023-01-15 22:23:34,844 # *** halted.
2023-01-15 22:23:34,844 # 
```

#### This PR

```
 $ make BOARD=microbit-v2 -C examples/gcoap flash term
[...]
make: Entering directory '/home/maribu/Repos/software/RIOT/examples/gcoap'
/home/maribu/Repos/software/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
2023-01-15 22:22:27,842 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
coap get [::1] /.well-known/core
2023-01-15 22:22:40,042 #  coap get [::1] /.well-known/core
2023-01-15 22:22:40,046 # gcoap_cli: sending msg ID 25182, 23 bytes
2023-01-15 22:22:40,050 # gcoap: response Success, code 2.05, 46 bytes
2023-01-15 22:22:40,054 # </cli/stats>;ct=0;rt="count";obs,</riot/board>
> coap get [::1] foo
2023-01-15 22:22:43,858 # coap get [::1] foo
2023-01-15 22:22:43,862 # ERROR: URI-Path must start with a "/"
2023-01-15 22:22:43,866 # usage: coap <get|post|put|ping|proxy|info>
```

### Issues/PRs references

None

Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-16 02:34:21 +00:00
bors[bot]
9ff9704fe5
Merge #19010 #19149
19010: bootloaders/riotboot: add tinyUSB DFU support r=benpicco a=gschorcht

### Contribution description

This PR provides
- the tinyUSB DFU and DFU Runtime support and
- the `riotboot_tinyusb_dfu` bootloader that uses the tinyUSB DFU mode to flash new application images.

~This PR includes PR #18983 for now to be compilable.~

### Testing procedure

1. Use any board that supports the `riotboot´ and `tinyusb_device` features and flash the bootloader first, for example
   ```
   BOARD=nucleo-f767zi make -C bootloaders/riotboot_tinyusb_dfu flash
   ```
   and check that the `riotboot_tinyusb_dfu` bootloader is in DFU mode:
   ```
   dfu-util --list
   ```
3. Flash a first application using the following command:
    ```
   FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
   make -C tests/saul PROGRAMMER=dfu-util riotboot/flash-slot0
   ```
   and check that the application starts and is seen as upgradable:
   ```
   dfu-util --list
   ```
4. Restart the node in bootloader DFU mode by:
   ```
   dfu-util -e
   ```
   Flash a second application, for example
   ```
   FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
   make -C tests/shell PROGRAMMER=dfu-util riotboot/flash-slot1
   ```
   and check that the second application starts and is seen as upgradable:
   ```
   dfu-util --list
   ```
   
### Issues/PRs references

~Depends on PR #18983~

19149: SECURITY: Describe that declassification is an option r=benpicco a=chrysn

### Contribution description

Our security policy does not contain provisions for the case when what is reported is not what we consider an actual security issue. As it is described now, everything reported through security@ would go through the full treatment, including a point release.

I'm not sure it belongs into the text itself (as it's more about how security reporters interact with the project than internals), but declassification should IMO be backed at least by 3 maintainers, and no strong NACK.

### Issues/PRs references

#19141 followed that procedure after some chat on it on the maintainers channel. (In the discussion, I proposed declassification, with 2.5 people supporting it and one "I was about to, but can we be sure nobody is using it?" voice).

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: chrysn <chrysn@fsfe.org>
2023-01-15 23:31:00 +00:00
Gunar Schorcht
3d4e8d6a0d makefiles/boot/riotboot-dfu-util: add tinyusb_dfu support 2023-01-15 18:09:55 +01:00
bors[bot]
9d8fdd3f34
Merge #19137
19137: toolchain/gnu.inc.mk: don't check version if CC is not installed r=kaspar030 a=miri64





Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-01-13 20:31:00 +00:00
bors[bot]
fb603f2660
Merge #18459 #18724 #19081 #19082 #19136
18459: makefiles/suit: make it possible to accept multiple SUIT keys r=miri64 a=benpicco



18724: nanocoap_sock: implement DTLS socket r=miri64 a=benpicco



19081: sys/stdio_udp: add stdio over UDP r=benpicco a=benpicco



19082: core/init: add early_init() r=benpicco a=benpicco



19136: CI: re-add "synchronize" event to check-labels r=miri64 a=kaspar030



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-13 13:50:55 +00:00
Martine Lenders
212933f080
toolchain/gnu.inc.mk: don't check version if CC is not installed
With b30efeeb65 a warning was introduced when using `make term` without
the proper toolchain installed (e.g. when using BUILD_IN_DOCKER, but
`term` outside of the docker). This removes this warning
2023-01-13 11:45:04 +01:00
Benjamin Valentin
6d3562bd0d sys/stdio_udp: add stdio over UDP 2023-01-13 11:08:22 +01:00
bors[bot]
89ef35f9c6
Merge #19050
19050: boards/common/cc26xx cc13xx: clean up and fix flash configs r=benpicco a=maribu

### Contribution description

- Add support for XDS110 debugger via `OPENOCD_DEBUG_ADAPTER=xds110`
- Clean up OpenOCD configs in `boards/common/cc26xx_cc13xx`
    - No longer hardcode the debugger to xds110, but use `OPENOCD_DEBUG_ADATER ?= xds110`
    - Add support for cc13x0, cc13x2, cc26x0
- `boards/cc2650*`: drop custom OpenOCD config in favor of shared one
- add variables needed to support flashing with `PROGRAMMER=jlink`
- allow specifying a custom OpenOCD command to bring the device to a halt state, as the default `reset halt` (which causes a second reset) is causing issues with the ICEPick JTAG routers in the CC26xx - CC13xx devices
- Use `halt` instead of `reset halt` for CC26xx / CC13xx boards in OpenOCD to avoid issues in flashing

### Testing procedure

```
make BOARD=cc2650-launchpad -C examples/default flash
```

Should now work. The same should still work for other cc26xx cc13xx boards.

### Issues/PRs references

Partially fixes: https://github.com/RIOT-OS/RIOT/issues/18750

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-13 00:51:31 +00:00
Marian Buschsieweke
8c055f0f3e
makefiles/utils/strings.mk: Fix version_is_greater_or_equal
The Makefile function `version_is_greater_or_equal` is used to check if
a version of GNU Make is at least the required one. However, it has
the built-in assumption the version numbers have to format x.y.z,
but Alpine Linux currently ships GNU Make 4.4. This results in
`$(call _pad_number,3,)` which runs `printf '$03d' ''` in the shell,
which is not valid.

This fixes the issue by making `_pad_number` more robust by fall back to
printing `0` with the given padding, if the number given to print is
empty.
2023-01-12 12:03:28 +01:00
Marian Buschsieweke
3e1dcf31cb
tools/openocd: Allow specifying a custom halt command
Typically, OpenOCD is already performing a reset on connect. A
`reset halt` to bring the target to a `halt` state for flashing will
result in the device going through a second reset cycle. This can be
problematic with some device, such as the CC26xx MCUs. For these
devices, an `OPENOCD_CMD_RESET_HALT := -c 'halt'` will avoid the second
reset that is causing the issues.
2023-01-10 21:59:56 +01:00
Marian Buschsieweke
7bb5232792
makefiles/tools/openocd-adapters: add XDS110 support
This adds the configuration to allow choosing the XDS110 used in
cc13xx-launchpad and cc26xx-launchpad boards via the
`OPENOCD_DEBUG_ADAPTER` variable.
2023-01-10 21:58:19 +01:00
Marian Buschsieweke
4a00835415
makefiles/cargo-targets.inc.mk: Fix RISC-V target
Update the list of target triples to match
`makefiles/arch/riscv.inc.mk`. This fixes compilation with toolchains
other than the obsolete toolchain that uses the incorrect
`riscv-none-embed` triple.
2023-01-09 20:36:52 +01:00
Benjamin Valentin
55b5c47bc8 cpu/esp32: add stdio_usb_serial_jtag 2023-01-09 00:51:27 +01:00
bors[bot]
21af24729e
Merge #19030 #19085
19030: tests/periph_timer_short_relative_set: improve test r=benpicco a=maribu

### Contribution description

Reduce the number lines to output by only testing for intervals 0..15 to speed up the test.

In addition, run each test case 128 repetitions (it is still faster than before) to give some confidence the short relative set actually succeeded.

### Testing procedure

The test application should consistently fail or succeed, rather than occasionally passing.

### Issues/PRs references

None

19085: makefiles/tests/tests.inc.mk: fix test/available target r=benpicco a=maribu

### Contribution description

`dist/tools/compile_and_test_for_board/compile_and_test_for_board.py` relies on `make test/available` to check if a test if available. However, this so far did not take `TEST_ON_CI_BLACKLIST` and `TEST_ON_CI_WHITELIST` into account, resulting in tests being executed for boards which they are not available. This should fix the issue.

### Testing procedure


#### Expected to fail

```
$ make BOARD=nrf52840dk -C tests/gcoap_fileserver test/available
$ make BOARD=microbit -C tests/log_color test/available
```

(On `master`, they succeed, but fail in this PR.)

#### Expected to succeed

```
$ make BOARD=native -C tests/gcoap_fileserver test/available
$ make BOARD=nrf52840dk -C tests/pkg_edhoc_c test/available
$ make BOARD=nrf52840dk -C tests/log_color test/available
```

(Succeed in both `master` and this PR.)

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-04 01:20:19 +00:00
Marian Buschsieweke
6352e4cec0
makefiles/tests/tests.inc.mk: fix test/available target
dist/tools/compile_and_test_for_board/compile_and_test_for_board.py
relies on `make test/available` to check if a test if available.
However, this so far did not take `TEST_ON_CI_BLACKLIST` and
`TEST_ON_CI_WHITELIST` into account, resulting in tests being executed
for boards which they are not available. This should fix the issue.
2023-01-03 12:53:35 +01:00
bors[bot]
f7ef90d213
Merge #19074
19074: cpu/esp8266: build the SDK bootloader from source r=benpicco a=gschorcht

### Contribution description

This PR is a takeover of PR #17043, which is rebased to the current master and includes some corrections that became necessary after rebasing.

**Copied from description of PR #17043:**

We had four versions of pre-built bootloaders for the esp8266 with different settings of logging and color logging. These bootloaders were manually built from the SDK and shipped with RIOT-OS source code. However there are more settings that affect the bootloader build that are relevant to the app or final board that uses this bootloader. In particular, flash size and flash speed is important for the bootloader to be able to load an app from a large partition table at the fastest speed supported by the board layout and flash chip.

Another example is the UART baudrate of the logging output from the bootloader. The boot ROM will normally start at a baud rate of 74880 (depending on the crystal installed), so it might make sense to keep the UART output at the same speed so we can debug boot modes and bootloader with the same terminal.

This patch builds the `bootloader.bin` file from the ESP8266 SDK source code. The code is built as a module (`esp8266_bootloader`) which at the moment doesn't generate any object code for the application and only produces a `bootloader.bin` file set to the `BOOTLOADER_BIN` make variable for the `esptool.inc.mk` to flash.

The code needs to be compiled and linked with custom rules defined in the module's Makefile since the `bootloader.bin` is its own separate application.

The `BOOTLOADER_BIN` variable is changed from a path relative to the `$(RIOTCPU)/$(CPU)/bin/` directory to be full path. This makes it easier for applications or board to provide their own bootloader binary if needed.

As a result of building the bootloader from source we fixed the issue of having a large partition table.

### Testing procedure

Use following command to flash the application with STDIO UART baudrate of 115200 baud.
```
BAUD=74880 USEMODULE=esp_log_startup make -C tests/shell BOARD=esp8266-esp-12x flash
```
Connect with a terminal programm of your choice (unfortunatly `picocom` and `socat` don't support a baudrate close to 74880), for example:
```
python -m serial.tools.miniterm /dev/ttyUSB0 74880
```
On reset, the `esp8266-esp-12x` node shows the ROM bootloader log output
```
 ets Jan  8 2013,rst cause:2, boot mode:(3,7) 

load 0x40100000, len 6152, room 16 
tail 8
chksum 0x6f
load 0x3ffe8008, len 24, room 0 
tail 8
chksum 0x86
load 0x3ffe8020, len 3408, room 0 
tail 0
chksum 0x79
```
as well as the second-stage bootloader built by this PR (`ESP-IDF v3.1-51-g913a06a9ac3`) at 74880 baudrate.
```
I (42) boot: ESP-IDF v3.1-51-g913a06a9ac3 2nd stage bootloader
I (42) boot: compile time 11:25:03
I (42) boot: SPI Speed      : 26.7MHz
...
I (151) boot: Loaded app from partition at offset 0x10000
```
The application output is seen as garbage since the `esp8266-esp-12x` uses 115200 as baurate by default.

To see all output at a baudrate of 74880 baud, you can use the following command:
```
CFLAGS='-DSTDIO_UART_BAUDRATE=74880' BAUD=74880 USEMODULE=esp_log_startup make -C tests/shell BOARD=esp8266-esp-12x flash
```

If the application is built without options, the ROOM bootloader output will be 74880 baud and the second stage bootloader and application output will be 115200 baud.

### Issues/PRs references

Fixes issue #16402

Co-authored-by: iosabi <iosabi@protonmail.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-03 00:44:24 +00:00
Gunar Schorcht
a71f457f23 makefile/tools/esptool.inc.mk: fix esp-qemu dependency 2022-12-31 14:10:57 +01:00
Gunar Schorcht
f23b20f91f cpu/esp: use FLASHFILE_POS for image position in flash
Instead of using a fixed position of the image file in the flash, the variable `FLASHFILE_POS` is used which allows to override the default position of the image in the flash at 0x10000.
2022-12-31 14:10:57 +01:00
iosabi
073b2209da cpu/esp8266: Build the SDK bootloader from source.
We had four versions of pre-built bootloaders for the esp8266 with
different settings of logging and color logging. These bootloaders were
manually built from the SDK and shipped with RIOT-OS source code.
However there are more settings that affect the bootloader build that
are relevant to the app or final board that uses this bootloader. In
particular, flash size and flash speed is important for the bootloader
to be able to load an app from a large partition table at the fastest
speed supported by the board layout and flash chip.

Another example is the UART baudrate of the logging output from the
bootloader. The boot ROM will normally start at a baud rate of 74880
(depending on the crystal installed), so it might make sense to keep
the UART output at the same speed so we can debug boot modes and
bootloader with the same terminal.

This patch builds the bootloader.bin file from the ESP8266 SDK source
code. The code is built as a module (esp8266_bootloader) which at the
moment doesn't generate any object code for the application and only
produces a bootloader.bin file set to the BOOTLOADER_BIN make variable
for the esptool.inc.mk to flash.

The code needs to be compiled and linked with custom rules defined in
the module's Makefile since the bootloader.bin is its own separate
application.

The `BOOTLOADER_BIN` variable is changed from a path relative to the
`$(RIOTCPU)/$(CPU)/bin/` directory to be full path. This makes it easier
for applications or board to provide their own bootloader binary if
needed.

As a result of building the bootloader from source we fixed the issue of
having a large partition table. Fixes #16402.
2022-12-22 12:18:34 +01:00
Teufelchen1
5c51686178 fuzzing: Add generic input reader 2022-12-15 15:13:18 +01:00
Teufelchen1
f7f9eddd9e fuzzing: Rename AFL flag to prevent spelling warning from AFL 2022-12-15 13:10:19 +01:00
Marian Buschsieweke
208bf7eef3
build system: improve MOST_RECENT_PORT=1 handling
Allow overriding the shell command used to auto-detect the TTY of a
board with `MOST_RECENT_PORT=1` via the `TTY_SELECT_CMD` variable.
The use case is to also detect Arduino Mega 2560 clones with cheap
USB UART bridges (for which the filter command may yield false
positives) while preferring genuine Arduino Mega 2560 boards (if
found) over the clones (as the filter for genuine boards does not yield
false positives).
2022-12-11 18:58:18 +01:00
Gunar Schorcht
3100345214 makefiles: add riotboot_dfu-util.mk to override board's dfu-util config
Boards that are shipped with a DFU bootloader define the `dfu-util` configuration in their `Makefile.include`. However, when `riotboot_dfu` is used as the DFU bootloader, the board's `dfu-util` configuration must be overridden by the configuration as required by `riotboot_dfu` to use it to flash applications. Therefore, all `dfu-util` configurations are defined as overridable in the board's `Makefile.include` and the configuration as required by `riotboot_dfu` is included before the board's `Makefile.include`.
2022-11-30 19:28:14 +01:00
Benjamin Valentin
826b2ae232 makefiles/gnu.inc.mk: fix "extraneous text after 'ifneq' directive"
When trying to compile `examples/hello-world` on my 465 MHz Mendocino
I got

/home/benpicco/dev/RIOT/makefiles/toolchain/gnu.inc.mk:29: extraneous text after 'ifneq' directive

Turns out the version of `make` on Archlinux32 is newer than that in
Ubuntu 22.04, which somehow ignored the extra parenthesis.

Turns out this (t)rusty old machine is still good for writing patches :D
2022-11-20 14:53:34 +01:00
Benjamin Valentin
b30efeeb65 makefiles/gnu.inc.mk: set flags based on compiler version 2022-11-19 23:14:54 +01:00
benpicco
e1aa925c35
Merge pull request #18913 from benpicco/macro-prefix-map
makefiles/cflags.inc.mk: don't include absolute path in __FILE__ macro
2022-11-18 16:43:35 +01:00
Benjamin Valentin
71b1689407 makefiles/cflags.inc.mk: don't include absolute path in __FILE__ macro 2022-11-15 15:28:54 +01:00
Marian Buschsieweke
7ce641f110
sys/malloc_tracing: add module to trace dyn memory management
Hooking into the existing wrappers for `malloc()`, `calloc()`,
`realloc()`, and `free()`, the new (pseudo) module `malloc_tracing`
prints out the calls to the given functions, the program counter of
the caller, as well as the return result.

The intent is to aid debugging double-frees, invalid frees, or memory
leaks.
2022-11-15 12:59:46 +01:00
Marian Buschsieweke
643aeda471
Merge pull request #18893 from maribu/makefiles/libc/picolibc.mk
makefiles/libc/picolibc.mk: fix compilation with modern binutils
2022-11-15 08:52:45 +01:00
chrysn
971a023a4c
Merge pull request #18904 from chrysn-pull-requests/posixly-correct-grep
makefiles: Use `grep -q` rather than `--quiet`
2022-11-14 12:54:54 +01:00
chrysn
269b33f01a makefiles: Use grep -q rather than --quiet
`--quiet` is a GNUism; Alpine's busybox grep only supports the minimal
-q option required by POSIX.
2022-11-14 09:51:19 +01:00
Marian Buschsieweke
c0e997a8e7
makefiles/libc/picolibc.mk: fix compilation with modern binutils
Modern binutils complain about segments with RWX permissions. While
this is indeed a bad habit, RIOT ignores segments permissions anyway.
(We do have a `mpu_noexec_ram` module to disable execution of all of
RAM, which would do so regardless of the segment permission.) So for
now, we can safely just disable the warning.

This fixes:

    /usr/lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld: warning: /home/maribu/Repos/software/RIOT/examples/default/bin/nucleo-f767zi/default.elf has a LOAD segment with RWX permissions
    collect2: error: ld returned 1 exit status
2022-11-12 17:09:11 +01:00
Marian Buschsieweke
8448aa33ae
makefiles/arch/cortexm.inc.mk: fix ASMFLAGS
Drop `CFLAGS_DBG` from `ASFLAGS` to fix

    make RIOT_CI_BUILD=1 CC_NOCOLOR=1 --no-print-directory -C /home/maribu/Repos/software/RIOT/tests/pkg_qdsa clean all
    rm -rf /home/maribu/Repos/software/RIOT/tests/pkg_qdsa/bin/samr21-xpro/pkg-build/qdsa
    Building application "tests_pkg_qdsa" for "samr21-xpro" with MCU "samd21".

    Assembler messages:
    Fatal error: unknown option `-ggdb'
    make[3]: *** [/home/maribu/Repos/software/RIOT/Makefile.base:176: /home/maribu/Repos/software/RIOT/tests/pkg_qdsa/bin/samr21-xpro/qdsa_asm/bigint_red.o] Error 1
    make[2]: *** [/home/maribu/Repos/software/RIOT/Makefile.base:31: ALL--/home/maribu/Repos/software/RIOT/build/pkg/qdsa/arm/asm] Error 2
    make[1]: *** [Makefile:11: all] Error 2
    make: *** [/home/maribu/Repos/software/RIOT/tests/pkg_qdsa/../../Makefile.include:803: pkg-build] Error 2

    Return value: 2
2022-11-11 23:11:07 +01:00
Benjamin Valentin
03bbd6badf pkg/tinyusb: implement stdio via CDC ACM 2022-11-09 12:06:36 +01:00
Benjamin Valentin
0bd67d98d9 cpu: always rely on stdio.inc.mk for default stdio selection 2022-11-09 10:42:47 +01:00
Marian Buschsieweke
0077e9ad70
makefiles/libc: fix wchar_t size warnings on LLVM
The test for the requirement of disabling wchar_t size warnings assumed
that $(CC) is used for linking, instead of $(LINK). With GCC $(LINK)
and $(CC) happen to be (in most cases) identical, but with LLVM they
are not. This results in issues with compiling with LLVM.
2022-11-07 15:02:03 +01:00
Marian Buschsieweke
67ba1a0cb7
makefiles/cflags.inc.mk: add -z noexecstack to link flags
GCC on some platforms does need an executable stack to generate
trampoline code, but use of nested functions is not allowed in
RIOT's code base anyway.
2022-11-07 15:02:03 +01:00
benpicco
ed1d8e0a3d
Merge pull request #18785 from maribu/boards/blxxxpill/periph_conf
boards/common/blxxxpill: Fix pin conflicts in periph_conf
2022-10-27 21:22:10 +02:00
Martine Lenders
9ae66beedf
Merge pull request #16156 from miri64/gnrc_sixlowpan_frag_sfr/feat/congure
gnrc_sixlowpan_frag_sfr: provide CongURE support
2022-10-27 15:01:07 +02:00
Marian Buschsieweke
16df27c51d
makefiles/cflags.inc.mk: Add -Wno-missing-field-initializers to CXXFLAGS
This allows including C headers from C++. It sadly reduced the
diagnostics on C++ code as well, were there warning may make sense as
unintended side effect. We may be able to drop that later on, when more
C APIs are properly wrapped in native C++ APIs, so that C headers do no
longer need to be compatible with C++ compilers.
2022-10-27 14:28:06 +02:00
Martine Lenders
30f990f789
gnrc_sixlowpan_frag_sfr: provide CongURE support 2022-10-25 18:38:36 +02:00
Marian Buschsieweke
b9b63da984
makefiles/tools/gdb.inc.mk: prefer $(target)-gdb over gdb-multiarch
In an ideal world everyone would just install `gdb-multiarch` and be
happy. However, some MCUs need magic GDB versions sprinkled with
unicorn-stardust-Espressif-patches...

Since there is little reason to have `$(target)-gdb` installed in
addition to `gdb-multiarch` if `gdb-multiarch` would work fine, let's
assume the user wants to use `$(target)-gdb` when present over
`gdb-multiarch`.

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2022-10-24 09:24:24 +02:00
Martine Lenders
a535e44cc3
Merge pull request #18770 from miri64/makefiles/enh/test-executor
build-system: add capability to execute scripts with custom executor
2022-10-20 07:52:03 +02:00
Martine Lenders
14b7abda95
build-system: add capability to execute scripts with custom executor 2022-10-19 13:58:19 +02:00
Benjamin Valentin
8553c8ff55 sys/tiny_strerror: add tiny_strerror_minimal 2022-10-18 23:30:15 +02:00
benpicco
0b2fbce906
Merge pull request #18299 from fabian18/preprocessor_successor
sys: preprocessor successor module
2022-10-17 22:42:27 +02:00
Fabian Hüßler
b4dcbba26d sys/preprocessor: add preprocessor module 2022-10-17 10:38:14 +02:00
benpicco
5c9715ae74
Merge pull request #18731 from maribu/sys/stdio_uart/onlcr
sys/stdio_uart: add stdio_uart_onlcr (pseudo-) module
2022-10-15 23:36:48 +02:00
Marian Buschsieweke
2c4d6bf160
Merge pull request #18749 from benpicco/bootterm
makefiles/tools/serial.inc.mk: add support for bootterm
2022-10-15 14:02:04 +02:00
Martine Lenders
53ed211fc9
Merge pull request #16175 from miri64/gnrc_sixlowpan_frag_sfr/enh/mark-ecn
gnrc_sixlowpan_frag_sfr: add support for queue-based ECN
2022-10-15 14:01:44 +02:00
Benjamin Valentin
2625f58774 makefiles/tools/serial.inc.mk: add support for bootterm 2022-10-15 00:20:09 +02:00
Martine Lenders
c94c32dce4
Merge pull request #18727 from miri64/gnrc/enh/explicit-pseudomodules
gnrc: make pseudo-modules explicit + documentation improvements
2022-10-14 17:39:39 +02:00
Benjamin Valentin
9eb3741dee makefiles/arch/avr8.inc.mk: fix detection of GCC 12 2022-10-13 12:48:44 +02:00
Jim Paris
d797c990d6
sys/stdio_uart: add stdio_uart_onlcr (pseudo-) module
Add USE_MODULE += "stdio_uart_onlcr" to enable it.
This is named after the "onlcr" stty flag, which does the same thing.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2022-10-13 12:08:34 +02:00
Martine Lenders
653d08281b
gnrc_sixlowpan_frag_sfr: add support for queue-based ECN 2022-10-12 18:02:18 +02:00
Karl Fessel
514325b8b3 sys/log: modularize log into log_color and log_printfnoformat
- log_color: make log_write nonstatic
 - log_printfnoformat
 - apply module split to Kconfig
2022-10-12 12:21:29 +02:00
Martine Lenders
f7510cfb9d
gnrc_nettype: improve documentation on modules made explicit 2022-10-12 11:27:27 +02:00
Martine Lenders
153f42d524
gnrc_dhcpv6: improve documentation on modules made explicit 2022-10-12 11:27:15 +02:00
Martine Lenders
c005566f35
gnrc: make all pseudomodules explicit 2022-10-12 11:26:19 +02:00
Martine Lenders
30e7891a6b
Merge pull request #18706 from miri64/pseudomodules/depr/gnrc_netif_cmd_lora
pseudomodules: document gnrc_netif_cmd_lora as deprecated
2022-10-07 19:16:06 +02:00
benpicco
24f7d2011a
Merge pull request #18701 from benpicco/sys/checksum-crc16_fast
sys/checksum: add CRC-16 implementation without lookup table
2022-10-07 12:31:23 +02:00
Marian Buschsieweke
213c35bb71
Merge pull request #18649 from maribu/sys/shell/cmds
sys/shell/cmds: fix shell_cmd_netif LoRaWAN integration
2022-10-07 12:19:57 +02:00
Martine Lenders
485c94c0a8
pseudomodules: document gnrc_netif_cmd_lora as deprecated 2022-10-07 12:17:38 +02:00
Benjamin Valentin
e313c56e94 sys/checksum: add CRC-16 implementation without lookup table 2022-10-06 17:43:20 +02:00
Martine Lenders
bb92b2b281
doc: add deprecation notice on deprecated pseudo-modules 2022-10-06 10:53:10 +02:00
benpicco
2b088f3910
Merge pull request #18671 from keestux/add-podman-support
Add podman support
2022-10-06 00:38:25 +02:00
Marian Buschsieweke
f02bc5791a
Merge pull request #18571 from maribu/sys/tiny_strerror
sys/tiny_strerror: add tiny `strerror()` implementation
2022-10-05 09:24:40 +02:00
Marian Buschsieweke
fd80c53a35
sys/shell/cmds: fix shell_cmd_netif LoRaWAN integration
Model the LoRaWAN integration to GNRC's netif command (ifconfig) as
submodule of it, namely `shell_cmd_gnrc_netif_lorawan`.

This should fix a regression introduced by
https://github.com/RIOT-OS/RIOT/pull/18355
2022-10-04 23:06:03 +02:00
Benjamin Valentin
49a85f4633 sys/checksum: add CRC-32 checksum
based on https://github.com/aeldidi/crc32
2022-10-04 15:40:53 +02:00
José Alamos
f022ac3e23
Merge pull request #17884 from Ollrogge/gnrc_lorawan1.1
gnrc/lorawan: add basic LoRaWAN 1.1 features
2022-09-30 11:29:55 +02:00
3ee3d1b9ac
Merge pull request #18562 from MrKevinWeiss/pr/removemips
cpu/mips: Remove all mips
2022-09-30 10:47:09 +02:00
Kees Bakker
83902ccce0 makefiles/docker.inc.mk: add support for podman
If podman is used for a docker build then use "--userns keep-id" instead
of "--user $(id -u)".
2022-09-29 20:59:42 +02:00
Ollrogge
12a4e1c1ec gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
Kees Bakker
234a6df95a makefiles/docker.inc.mk: use registry docker.io explicitly
When using podman instead of docker the registry is not set by default.
Docker has a builtin registry default "docker.io". Podman does not have a
default. By specifying the registry explicitly both tools can be used.
2022-09-28 22:49:07 +02:00
benpicco
c35a4ba577
Merge pull request #18621 from benpicco/strscpy
sys/string_utils: add strscpy()
2022-09-28 19:11:42 +02:00
MrKevinWeiss
6cad5d2477
cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
Marian Buschsieweke
e0a81fe945
makefiles/arch/riscv.inc.mk: Fix with BUILD_IN_DOCKER
With RISC-V being a relatively young toolchain, a lot of inconsistencies
between different toolchains are to be found that differ in the target
triple and the flags supported. This build system performs run-time
tests to detect the toolchain and supported flags.

With `BUILD_IN_DOCKER=1` issues arise, as this checks are performed
outside of the docker container. However, the host may have no RISC-V
toolchain installed or a different toolchain, so there is little reason
in performing this detection then. Instead, a hard coded target triple
and supported flags are provided when using `BUILD_IN_DOCKER=1`.
2022-09-27 10:43:39 +02:00
Benjamin Valentin
8870158609 libc: add to default modules 2022-09-26 19:06:46 +02:00
Marian Buschsieweke
d6a9e5b590
Merge pull request #18628 from benpicco/openocd-adapters-ftdi
tools/openocd: add generic FTDI adapter
2022-09-23 23:58:30 +02:00
Marian Buschsieweke
f03e71a509
Merge pull request #18631 from maribu/tools/avarice
tools/avarice: deduce debugger from AVRDUDE_PROGRAMMER
2022-09-23 20:36:00 +02:00
Marian Buschsieweke
7df2bc2072
tools/avarice: deduce debugger from AVRDUDE_PROGRAMMER
If `AVRDUDE_PROGRAMMER` is already set to a programmer that is also
capable of debugging, we can assume that typically the user will want
to use the same hardware for debugging. Thus, let `AVR_DEBUGDEVICE`
default to the matching hardware.
2022-09-23 13:41:27 +02:00
chrysn
ec5d75f965 makefiles: Remove duplicate cargo invocation
Back in 36a029c0, rather than being line wrapped, this was duplicated.
2022-09-23 02:05:32 +02:00
chrysn
babccfa947 makefiles: Add make info-rust target 2022-09-23 02:03:50 +02:00
chrysn
5f41839b3d build-info: Output CARGO_CHANNEL etc. 2022-09-23 02:03:23 +02:00
chrysn
9d7fd993aa make/info-build: Protect shell from parentheses in CFLAGS
As for why the `-e` is being removed, observe that the `-e` would
otherwise be printed; there is an [elaborate treatise] on what happens
there.

[elaborate treatise]: https://unix.stackexchange.com/questions/700675/why-is-echo-e-behaving-weird-in-a-makefile
2022-09-23 01:53:42 +02:00
Benjamin Valentin
f80b4557fd tools/openocd: add generic FTDI adapter 2022-09-22 17:49:34 +02:00
Marian Buschsieweke
1bdc1a5967
sys/tiny_strerror: add tiny strerror() implementation
`tiny_strerror()` is a drop-in replacement for `strerror()`, but
instead of a long help message it returns the much shorter macro name
matching the given number.

The (pseudo-)module `tiny_strerror_as_strerror` can be used to
replace all calls to `strerror()` with calls to `tiny_strerror()`.
2022-09-20 15:51:11 +02:00
benpicco
f03f5384c1
Merge pull request #18355 from maribu/sys/shell/cmds
sys/shell: make cmds submodules and add KConfig modeling
2022-09-19 21:07:23 +02:00
Marian Buschsieweke
e402f1d885
Merge pull request #18418 from maribu/cpu/stm32/periph/stm32_eth_tracing
cpu/stm32/periph_eth: Add stm32_eth_tracing
2022-09-18 22:19:34 +02:00
Marian Buschsieweke
c06335b71b
sys/shell: make cmds submodules
Previously `shell_commands` was a "catch-all" module that included
shell commands for each and every used module that has a shell
companion. Instead, the new `shell_cmds` module is now used to provide
shell commands as individually selectable submodules, e.g.
`cmd_gnrc_icmpv6_echo` now provides the ICMPv6 echo command (a.k.a.
ping).

To still have a "catch all" module to pull in shell commands of modules
already used, `shell_cmds_default` was introduced. `shell_commands`
depends now on `shell_cmds_default` for backward compatibility, but
has been deprecated. New apps should use `shell_cmds_default`
instead.

For a handful of shell commands individual selection was already
possible. Those modules now depend on the corresponding `cmd_%` module
and they have been deprecated.
2022-09-16 13:15:45 +02:00
Marian Buschsieweke
b2bcfabcfb
Merge pull request #18452 from maribu/makefiles/boards/stm32.inc.mk
makefiles/boards/stm32.inc.mk: improve stm32flash support
2022-09-15 00:29:33 +02:00
Marian Buschsieweke
44b62e879d
cpu/stm32/periph_eth: add stm32_eth_tracing
Add tracing support via GPIOs to trace the basic state of the Ethernet
peripheral. The following signals are provided:

- One GPIO pin is toggled on entry of the Ethernet ISR
- On TX start an GPIO is set, on TX completion it is cleared
- On RX complete an GPIO is set, once this is passed to the upper layer
  the GPIO is cleared again

In order to reduce the overhead, GPIO LL is used. By default the
on-board LEDs are used as tracing GPIOs. This makes it easy to debug
when the state machine gets stuck without the need to attach a scope or
logic analyzer.
2022-09-14 14:00:27 +02:00
benpicco
2917c0f51e
Merge pull request #18506 from gschorcht/cpu/esp32/add_esp32s2_cpu_support
cpu/esp32: add support for ESP32-S2
2022-08-30 21:24:36 +02:00
Marian Buschsieweke
0f13178085
Merge pull request #18533 from maribu/makefiles/arch/avr8.inc.mk
makefiles/arch/avr8.inc.mk: Fix compilation with GCC 12.2.0
2022-08-30 19:06:55 +02:00
Gunar Schorcht
ad9cdeb855 makefiles: undefine BOARD_VERSION in info-global.inc.mk 2022-08-30 15:08:39 +02:00
Marian Buschsieweke
7bd23069dc
makefiles/arch/avr8.inc.mk: Fix compilation with GCC 12.2.0
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523 for details
2022-08-30 14:26:40 +02:00
chrysn
6cfe240812 makefiles: Select suitable terminal when stdio_rtt is used
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2022-08-30 10:51:59 +02:00
chrysn
2c9e853aae
Merge pull request #18526 from chrysn-pull-requests/openocd-rtt
makefiles: Add openocd-rtt
2022-08-30 09:44:50 +02:00
chrysn
62a6d3c128 makefiles: Add openocd-rtt
JLink presumably has information about the device's RAM available
internally. Not passing the precise symbol area (which would be
available in the ELF file) because a) that'd make the terminal break
when the flashed firmware does not equal the built one, and b) that
would introduce a dependency from `term` to the ELF file that other
terminals don't have.
2022-08-30 09:34:22 +02:00
Marian Buschsieweke
78de9a3f53
makefiles/tools/serial.inc.mk: Improve PORT selection
When `stdio_cdc_acm` is used, assume `"RIOT-os\.org"` as vendor string
and `$(BOARD)` being used as model string. This is the default
behavior in RIOT since eaace28804
2022-08-29 16:39:25 +02:00
Dylan Laduranty
8dac70db69 makefiles/tools/dfu-util: add option to pass DFU_SERIAL
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2022-08-29 09:39:15 +02:00
MrKevinWeiss
0489630aa7
makefiles: quiet messages on CI
After introducing #18423 there are occasional messages that still happen.
These messages cause a diff output when testing with TEST_KCONFIG=1.
This then causes a failure when comparing make/kconfig modules and packages.
2022-08-22 11:35:56 +02:00
Leandro Lanzieri
2dd59236c8
Merge pull request #18423 from MrKevinWeiss/pr/disable/hashchecks
.murdock: disable hash checks of kconfig/make
2022-08-17 18:30:36 +02:00
MrKevinWeiss
29c6fecab3
makefiles/features_modules: ignore non-init periphs 2022-08-17 14:37:24 +02:00
Marian Buschsieweke
276ad5716a
sys/net/gnrc/netif: allow checking if a netdev is legacy or new API
A if `netdev_driver_t::confirm_send()` is provided, it provides the
new netdev API. However, detecting the API at runtime and handling
both API styles comes at a cost. This can be optimized in case only
new or only old style netdevs are in use.

To do so, this adds the pseudo modules `netdev_legacy_api` and
`netdev_new_api`. As right now no netdev actually implements the new
API, all netdevs pull in `netdev_legacy_api`. If `netdev_legacy_api` is
in used but `netdev_new_api` is not, we can safely assume at compile
time that only legacy netdevs are in use. Similar, if only
`netdev_new_api` is used, only support for the new API is needed. Only
when both are in use, run time checks are needed.

This provides two helper function to check for a netif if the
corresponding netdev implements the old or the new API. (With one
being the inverse of the other.) They are suitable for constant folding
when only new or only legacy devices are in use. Consequently, dead
branches should be eliminated by the optimizer.
2022-08-17 12:56:07 +02:00
Benjamin Valentin
2a3c8bf8e3 makefiles/suit: allow multiple SUIT_SECs 2022-08-16 22:30:27 +02:00
Marian Buschsieweke
08d88ee557
makefiles/boards/stm32.inc.mk: improve stm32flash support
Allow issuing a reset to bootloader sequence by abusing the RTS and
the DTR pins of a TTL adapter. This makes flashing via UART much
more convenient, as no jumpers need to be placed to select booting to
the bootloader / flash and no reset buttons need to be pressed.
2022-08-16 22:00:06 +02:00
MrKevinWeiss
99f4fd633e
makefiles: Prevent periph_init_mcg_lite module 2022-08-16 10:57:26 +02:00
Marian Buschsieweke
9efd6a3e52
Merge pull request #18298 from maribu/makefiles/info.inc.mk
build system: add info-kconfig-variables
2022-08-08 19:13:23 +02:00
Marian Buschsieweke
bf6d742017
build system: add info-kconfig-variables
This aids debugging issues with KConfig by being able to print all
`CONFIG_*` variables.
2022-08-08 08:15:15 +02:00
benpicco
cf745e954e
Merge pull request #18387 from gschorcht/cpu/esp32/cleanup_spi_flash_mode
cpu/{esp8266,esp32}: cleanup of SPI Flash configuration
2022-08-05 12:24:45 +02:00
Fabian Hüßler
9333970b77 gcoap/fileserver: make PUT and DELETE pseudomodules 2022-08-03 22:10:30 +02:00
Gunar Schorcht
be1764043d makefile/tools/esptool: use dio instead of qout or qio flash mode
If Quad SPI modes qout or qio are set by variable FLASH_MODE, esptool.py has to be called with parameter `--flash_mode dio` so that the first stage bootloader is always using Dual SPI mode.
2022-08-01 15:08:41 +02:00
Daniel Lockau
363cf8c546 makefiles/suit: avoid unwanted key creation trigger
This fixes a trigger of re-creation of an already existing SUIT
key when combining a build target with the clean target, e.g.
`make clean all`.
2022-07-20 12:35:33 +02:00
Martine Lenders
8bec9c1115
sock_dns_cache: move to dns_cache
Also piggy-back some fixes to the unittests and submodule handling
2022-07-18 15:27:58 +02:00
Benjamin Valentin
077a41a719 sock_dns: implement DNS cache 2022-07-13 23:23:52 +02:00
Martine Lenders
a8254d52b8
Merge pull request #16705 from miri64/gcoap_dns/feat/initial
gcoap_dns: initial import of a DNS over CoAP (DoC) client
2022-07-13 02:27:17 +02:00
Gunar Schorcht
a88cb32a18
Merge pull request #18236 from maribu/murdock
.murdock: print hash input when hashes mismatch
2022-07-12 06:45:34 +02:00
Marian Buschsieweke
de74c6acbd
.murdock: print hash input when hashes mismatch 2022-07-11 17:17:15 +02:00
chrysn
ebfa6f61d6 shell/democommands: Add example Rust module 2022-07-10 21:27:12 +02:00
chrysn
841e4deee5 lsm303agr: New sensor driver using external Rust crate
It is enabled by saul_default on microbit-v2.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2022-07-10 21:27:12 +02:00
chrysn
ba76c6ee65 Rust: Add crates-to-module adapter 2022-07-09 21:15:29 +02:00
chrysn
7ee66ad219 makefiles/cargo: Drop duplicate workaround remnants 2022-07-09 20:45:51 +02:00
Martine Lenders
107a2a0753
gcoap_dns: initial import of a DNS over CoAP client 2022-07-01 18:44:02 +02:00
benpicco
eada4f0b75
Merge pull request #18157 from benpicco/suit-key-dir
makefiles/suit: place keys in $XDG_DATA_HOME
2022-06-28 16:01:11 +02:00
benpicco
61d17d5601
Merge pull request #18248 from gschorcht/cpu/esp32/inverse_MCU_CPU_conditionals
cpu/esp32: invert MCU_* and CPU* conditionals
2022-06-23 21:41:31 +02:00
Gunar Schorcht
b6dc652d1d makefiles/tools/esptool.mk: inverse CPU* conditionals
The CPU* conditionals are inverted so that they can be tested for ESP8266. In all other cases the MCU is any ESP32x SoC
2022-06-23 12:56:56 +02:00
chrysn
be11978f7f
Merge pull request #18243 from chrysn-pull-requests/rust-nightly-selection
rust: Explicitly select nightly
2022-06-23 07:52:10 +02:00
chrysn
b9af16e42a
Merge pull request #18220 from chrysn-pull-requests/rust-err-early
makefiles/rust: Err early, provide suggestions
2022-06-22 19:17:26 +02:00
chrysn
5cde02177c rust: Explicitly select nightly
Examples have previously relied on the (really: some) nightly toolchain
to be the default. As that, in practice, is a problematic assumption,
the latest toolchain to use is now determined programmatically, and that
is set explicitly on the examples that use nightly.

Workaround-For: https://github.com/rust-lang/rustup/issues/3015
2022-06-22 12:07:45 +02:00
Marian Buschsieweke
d1317abc02
makefiles/tests: use FLASHFILE for hash comparision instead of ELFFILE
Let's consider firmwares as identical if their flash files are matching.
This will have the side effect that hash mismatches for ESP32 due to
different .debug sections in the ELFFILE are prevented, as for ESP32
the BINFILE is used.
2022-06-17 18:31:17 +02:00
chrysn
54fe5fc8c3 makefiles/rust: Extra checks to ensure a usable build environment
... and print actionable errors.

Closes: https://github.com/RIOT-OS/RIOT/issues/18200
2022-06-16 16:23:02 +02:00
chrysn
36a029c07a makefiles/rust: Line wrap for better readability 2022-06-16 16:15:22 +02:00
chrysn
d129f3dc31 makefiles/rust: Colorful error output 2022-06-16 16:14:39 +02:00
chrysn
95cef2229c makefiles/rust: Err before trying to build without having the libraries in place
This is also a workaround for Rust's [97685], but primarily to enhance
the error message by pointing out that -Zbuild-std is an option, and
generally presenting the error as RIOT usually does.

[97685]: https://github.com/rust-lang/rust/issues/97685
2022-06-16 16:14:34 +02:00
Francisco
e5c7e3b633
Merge pull request #18029 from haukepetersen/verbump_nimble_nrfx2022
pkg/nimble: version bump to NimBLE 1.5.0 RC1
2022-06-10 04:11:26 +02:00
c239f63cce
Merge pull request #18031 from fjmolinas/pr_pkg_quieter
pkg/pkg.mk: silence info if QUIETER
2022-06-09 11:37:21 +02:00
Hendrik van Essen
ccc795133f sys/shell: add pseudomodule shell_lock_auto_locking
Module to lock the shell after a given timeout of time x. When the
shell did not receive any input within time x, then the shell is
locked automatically.
2022-06-08 12:53:48 +02:00
Marian Buschsieweke
e706468a5a
makefiles/tools/serial.inc.mk: Use TTY_BOARD_FILTER
When `MOST_RECENT_PORT` is set to `1`, the most recently added USB
serial is selected. This is a crude but surprisingly effective filter.
However, for the CC2560-Launchpad this doesn't work, as it provides
two USB serials. The first USB serial interface is the targeted UART
bridge and the second controls the debugger. Since the second is added
a tiny fraction after the first, this reliably selects the wrong
interface. Allowing the board to filter USB serials first can avoid
this issue.

This is also useful as e.g. an STM Nucleo board can easily be told
apart from an `samr21-xpro` or an nRF52840dk using such filters.
2022-06-03 19:59:30 +02:00
Marian Buschsieweke
055a26d9d2
Merge pull request #17662 from fjmolinas/pr_default_modules_early_late
buildsystem: split default modules include early and late
2022-06-02 21:18:17 +02:00
benpicco
dd6b473a0f
Merge pull request #18138 from benpicco/makefiles/boot/riotboot-elffile
makefiles/boot/riotboot: set DEBUG_ELFFILE to slot0.elf
2022-06-02 16:10:09 +02:00
Hauke Petersen
068c4f1c3b pkg: add nrfx as package 2022-06-02 14:59:50 +02:00
Benjamin Valentin
5e52d15409 makefiles/suit: place keys in $XDG_DATA_HOME
Placing the SUIT key in the RIOT repository folder is dangerous as
a repo checkout is by most people considered a volatile location.
Since all important files are stored in git, deleting the entire folder
or it's contents is not an uncommon cleanup operation.

If the user is at that point unaware that SUIT key material is stored
in that folder, that key will then be lost.

Another workflow may involve multiple checkouts of the RIOT repository
to multiple folders to work on several features at the same time, or for
easy cross-referencing or splitting of off features from an integration
into a feature branch.
In that case each checkout would use it's own incompatible SUIT key.

To avoid all these pitfalls, place the SUIT keys outside the RIOT
repository in the $XDG_DATA_HOME directory.
2022-06-02 13:07:17 +02:00
Francisco Molina
b5197db03f buildsystem: split default modules include early and late
DEFAULT_MODULEs declared in defaultmodules_regular.inc.mk MAY only be
disabled at APPLICATION level or in BOARD/CPU Makefile.default. These
modules MAY have complex dependencies themselfs.

DEFAULT_MODULEs declared in defaultmodules_no_recursive_deps.inc.mk MAY be disabled
during dependency resolution. The MUST only have dependencies against
modules with no dependencies themselfs, and these dependencies must
be defined in makefiles/defaultmodules._deps.inc.mk
2022-06-02 12:56:59 +02:00
benpicco
e1e2b7c5b6
Merge pull request #17601 from gschorcht/cpu/esp32/upgrade_esp-idf_v4.4
cpu/esp32: Upgrade to ESP-IDF v4.4
2022-06-02 10:18:07 +02:00
benpicco
25d7234a1b
Merge pull request #16323 from fjmolinas/pr_uf2_riotboot_initial
makefiles/tools/uf2conv.inc.mk: partial riotboot support
2022-06-02 10:00:52 +02:00
benpicco
aab6bca16a
Merge pull request #18155 from benpicco/SUIT_VENDOR_DOMAIN
makefiles/suit: allow to overwrite SUIT_VENDOR_DOMAIN
2022-06-02 10:00:18 +02:00
benpicco
cb5e19beb5
Merge pull request #17979 from maribu/drivers/netdev_ieee802154
drivers/netdev_ieee802154: drop duplicate struct member
2022-06-02 00:47:56 +02:00
Gunar Schorcht
7945114f09 cpu/esp_common: esptool can detect the flash size 2022-06-01 13:31:00 +02:00
Gunar Schorcht
d2a4d6e3d3 cpu/esp32: compile bootloader from ESP-IDF v4.4 source 2022-06-01 13:31:00 +02:00
Benjamin Valentin
024d7171db makefiles/suit: allow to overwrite SUIT_VENDOR_DOMAIN
I think the intention was that SUIT_VENDOR_DOMAIN gets set to
$(SUIT_VENDOR) so it can be overwritten by the build system.

However, no such code was in place yet.
2022-06-01 13:18:00 +02:00
Francisco Molina
a945ea144f makefiles/tools/uf2conv.inc.mk: partial riotboot support
Individual files need to be converted to uf2 format, targets
flashing individual slots or the bootloader will work:

- riotboot/flash-slot%
- riotboot/flash-bootloader

'flash' also works by flashing both the bootloader and slot0
independently.

But not targets flashing combined/extended versions since conversion
of the blob is not possible with the uf2conv.py script.
2022-06-01 11:01:30 +02:00
Francisco Molina
f025c4cdeb makefiles/vars.inc.mk: export QUIETER 2022-06-01 10:48:34 +02:00
Benjamin Valentin
1111631c45 makefiles/tools: define DEBUG_ELFFILE and use it for debugging 2022-05-31 12:39:16 +02:00
Benjamin Valentin
1925c99436 makefiles/boot/riotboot: set DEBUG_ELFFILE to slot0.elf
When doing a `make debug` on a board with riotboot bootloader, the original
(non-offset) elf file gets selected.

This causes all ROM addresses to be at the wrong offset, leading to strange
debug behavior.

Set `DEBUG_ELFFILE` to the .elf file that already accounts for the bootloader
offset so the debugger gets the correct addresses.
2022-05-31 12:30:49 +02:00
Marian Buschsieweke
e796a7394e
makefiles/libc/picolibc.mk: Fix typo 2022-05-30 12:38:19 +02:00
Marian Buschsieweke
e79965e848
Merge pull request #18132 from maribu/makefiles/features_modules.inc.mk
build system: no periph_init for periph_gpio_ll*
2022-05-25 16:09:14 +02:00
Marian Buschsieweke
dc47528dda
build system: no periph_init for periph_gpio_ll*
None of the periph_gpio_ll* features provides or requires a periph_init
hook. Hence, blacklist them for periph_init conversion.
2022-05-24 11:50:52 +02:00
Benjamin Valentin
b3b8849f6b makefiles/suit: generate password-protected key file 2022-05-24 01:29:53 +02:00
chrysn
185dfea07f gcoap_fileserver: New module to serve VFS via CoAP 2022-05-22 16:36:21 +02:00
benpicco
82fd89fa89
Merge pull request #18040 from benpicco/vfs_util-hash
sys/vfs_util: add vfs_file_<hash>() functions and md5sum, sha1sum and sha256sum shell commands
2022-05-19 09:08:23 +02:00
benpicco
d7533fb855
Merge pull request #17701 from fjmolinas/pr_libcose_riot_crypto
pkg/libcose: add RIOT as crypto backend
2022-05-17 14:20:16 +02:00
Benjamin Valentin
ff27db9bce sys/shell: add sha256sum command 2022-05-17 11:32:25 +02:00
Benjamin Valentin
a250c2b5ad sys/shell: add sha1sum command 2022-05-17 11:30:52 +02:00
Benjamin Valentin
845450c663 sys/shell: add md5sum command 2022-05-17 11:30:52 +02:00
Francisco Molina
8b6ddca6e9 pkg/libcose: bump, set random function on init 2022-05-17 10:51:34 +02:00
benpicco
1e315c7308
Merge pull request #16748 from jia200x/pr/gnrc_netif/remove_netdev_event_isr_msg
gnrc_netif: use event loops by default to process ISR
2022-05-13 18:49:01 +02:00
Marian Buschsieweke
0fd544806a
Merge pull request #18098 from maribu/makefiles/arch/riscv.inc.mk
buildsystem: Improve RISC-V compilation handling with newer toolchain
2022-05-13 18:45:21 +02:00
Marian Buschsieweke
8c369a8d29
buildsystem: Improve RISC-V compilation handling with newer toolchain
Use -misa-spec=2.2 on newer toolchains, which allows passing the same
-march value to both the linker and the compiler even when binutils and
GCC support difference ISA specs.
2022-05-13 10:54:30 +02:00
8fc49b25f7 make: create cargo folders 2022-05-10 21:25:20 +02:00
Jose Alamos
38798cb877 gnrc_netif: use events instead of msg queue for ISR offload 2022-05-10 17:48:42 +02:00
6f52b90e58
cpu/cortexm_common: enable FPU on cortexm33 2022-05-05 21:16:10 +02:00
Karl Fessel
3680198619 ztimer: deprecate ztimer_now64 and ztimer_now_t 2022-05-04 15:57:57 +02:00
benpicco
b1715feb03
Merge pull request #17959 from benpicco/core-dummy
core: provide dummy implementation of thread and mutex for riotboot
2022-05-04 14:46:50 +02:00
fabian18
5db3ddd642
Merge pull request #17951 from maribu/makefiles/arch/riscv.inc.mk
build system: Fix compilation for RISC-V with newer GCC
2022-05-02 19:23:46 +02:00
Benjamin Valentin
8100203e95 core/thread, mutex: provide dummy implementation for riotboot
This is intended for the bootloader module where we don't enter thread
mode, so mutex must never attempt to switch context.

Instead use a simple busy wait that is enough to make the possible mutex
users (e.g. interrupt based SPI) in bootloader mode work.
2022-05-02 13:18:39 +02:00
Martine Lenders
b167d6931c
Merge pull request #17774 from fjmolinas/pr_nimble_auto_adv_extended
pkg/nimble/autoadv: add support for ext_adv
2022-04-27 16:44:46 +02:00
Francisco Molina
d474b8ff8a pkg/nimble/autoadv: add shell 2022-04-27 10:10:32 +02:00
Francisco Molina
1de00ba504 makefiles/pkg/nimble.adv.mk: add utility to assign adv instance 2022-04-27 08:22:58 +02:00
23b393e784
docker: don't export KCONFIG_ADD_CONFIG variable 2022-04-25 11:18:17 +02:00
Marian Buschsieweke
1fd4d41d76
driver/netdev_ieee802154: Make timestamp optional
Also remove duplicate struct member.
2022-04-22 14:33:56 +02:00
Francisco Molina
76ee54e69c makefiles: use memoized for EPOCH, also define for suit
APP_VER must also be defined for suit.inc.mk in case non-fw payloads
are used (e.g. no riotboot)

Use memoized so the shell call happens only if needed
2022-04-21 11:39:25 +02:00
Francisco Molina
ac5c316361 makefiles/suit.inc.mk: refactor file storage and naming
- move all generated manifests under $(BINDIR)/suit_files (this can be
overwritten.
- rename signed manifests so that they are of the form:
<somename>.<version>.bin, where <somename> is by default riot.suit.

This avoids cluterring BINDIR while as well having a naming scheme that
allows custom names for manifests addresssing different types of
payloads.
2022-04-21 11:39:25 +02:00
Francisco Molina
17c6717093 makefiles/boot/riotboot: refactor file storage and naming
- rename riotboot files so that they are of the form: slot<n>.<version>.bin
- move all generated files under $(BINDIR)/riotboot_files (this can be
  overwritten.
2022-04-21 11:39:25 +02:00
Francisco Molina
ce35647f6a makefiles: allow to override suit manifest payloads
This adds:

* SUIT_MANIFEST_BASENAME: allow for non slotfiles payloads to have
different names that slotfiles payloads.
* SUIT_MANIFEST_PAYLOADS: firmware payloads to be published with the
manifest.
* SUIT_MANIFEST_SLOTFILES: firmware payloads referenced by the manifest
in the form 'filename:[offset]:[comp_name]' as expected by
gen_manifest.py.

With this the same recipes suit/publish suit/notify can be used with
non slotfiles payloads.
2022-04-21 11:39:25 +02:00
Marian Buschsieweke
8eb3692b9d
makefiles/arch/riscv.inc.mk: improve error message
When no toolchain could be detected, provide a friendly message
instead.
2022-04-19 15:51:31 +02:00
Marian Buschsieweke
c89331f93b
build system: Detect more RISC-V target triples
Omitting the middle part of `riscv32-none-elf` is apparently legal and
done by Arch Linux.
2022-04-14 19:25:36 +02:00
Marian Buschsieweke
10f65f1631
build system: Fix compilation for RISC-V with newer GCC
A backward incompatible change in the RISC-V resulting in instructions
previously included by rv32imac to only be available with
rv32imac_zicsr. All RISC-V CPUs supported by RIOT are hence either
considered as rv32imac (from the old ISA spec point of view) or as
rv32imac_zicsr (from the new ISA spec point of view). This adds a
simple test if GCC understands rv32imac_zicsr and uses it then as march,
but uses rv32imac as march if not.
2022-04-14 16:52:48 +02:00
Keith Packard
b21e624280 cpu/arm7, arch/cortexm: Remove -fno-builtin flag
This flag disables all builtin functions provided by the compiler as
well as disabling all optimizations and error checking related to
standard C library functions. If you're using a C library which
conforms to the ANSI C standard, you want to leave these compiler
features enabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
2022-04-02 16:58:09 -07:00
Francisco
4f3d7c9e1f
Merge pull request #17853 from fjmolinas/pr_z1_socat
makefiles: socat set tty mode 8N1
2022-03-29 10:29:47 +02:00
Francisco Molina
a3ff566708 makefiles/tools/serial.inc.mk: socat set no parity 2022-03-28 08:53:27 +02:00
Francisco Molina
0819660303 sys/syscalls: add libc_gettimeofday
Conditionally implement gettimeofday() if module is included, this
avoids including ztimer64 even when not needed
2022-03-24 11:36:49 +01:00
Leandro Lanzieri
202fb261fe
Merge pull request #17811 from fjmolinas/pr_xtimer_dep_rework_simple
sys/*timer: rework dependecies to ease backend switch, prefer ztimer_xtimer_compat over xtimer_on_ztimer
2022-03-18 08:17:24 +01:00
Francisco Molina
9260cfb4f0 sys/xtimer: prefer ztimer_xtimer_compat 2022-03-17 14:37:40 +01:00
Francisco Molina
0b1453667e sys/xtimer-ztimer: rework dependecies to ease backend switch
This adds a xtimer_no_ztimer_default that is currently always
selected in Makefile, but that can be switched off in Kconfig.
Removing its inclusion will allow switching the default xtimer
backend to ztimer, while allowing for an easy way back.
2022-03-17 14:37:40 +01:00
Francisco Molina
8b532e8fb6 makefiles/docker.ink.mk: do not always pass CFLAGS to docker 2022-03-17 10:10:45 +01:00
Cenk Gündoğan
fa19b62cdb
gcoap/forward_proxy: add submodule 2022-03-11 14:53:17 +01:00
benpicco
08c2cf6b27
Merge pull request #17769 from gschorcht/cpu/esp32/gcc_8_4_0_espressif_tools
cpu/esp32: update to Espressif's precompiled ESP32 vendor toolchain with gcc 8.4.0
2022-03-11 09:30:23 +01:00
e59a6786a6
Merge pull request #17652 from kaspar030/split_core_lib
core: split out library code
2022-03-10 20:17:07 +01:00
b29a658555
Merge pull request #17719 from fjmolinas/pr_sys_posix_convert
sys/sema: add sema_ztimer64 to implement old api, deprecate sema
2022-03-10 15:36:06 +01:00
Francisco Molina
2e2daae5d0 sys/sema: use sema_ztimer64 to implement old sema api
This PR removes the old xtimer based implementation for sema. Since
this implementation used 64bit timeout, backweard compatibility is
kept by having `sema_wait_timed` be implemented by `ztimer64_usec`
which is enabled by selecting `sema_deprecated`

With this 64bit `sema` api is now deprecated.
2022-03-10 14:19:44 +01:00
chrysn
cd1c64c8ff
Merge pull request #17737 from maribu/dist/tools/usb-serial
dist/tools/usb_serial: Add tool for listing and filtering TTY interfaces
2022-03-10 13:19:58 +01:00
3db7c1150a core: split out library code
This commit splits core into it's scheduler/IPC part and into other code
that is either used or uses the scheduler, through defined APIs.
2022-03-09 21:43:05 +01:00
Marian Buschsieweke
b296ade6b2
dist/tools/usb-serial: Add ttys.py
- Provide a new tool to list and filter TTYs
- Change `Makefile.include` to use `$(RIOTTOOLS)/usb-serial/ttys.py`
  instead of `$(Q)$(RIOTTOOLS)/usb-serial/list-ttys.sh` to implement
  `make list-ttys`
- Extend `makefiles/tools/serial.inc.mk` to allow using the most recent
  port by passing `MOST_RECENT_PORT=1` as environment variable or
  parameter to make

Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2022-03-09 15:40:36 +01:00
Gunar Schorcht
395ec06c16 dist/tools/esptool: upgrade to v3.2 for ESP32 2022-03-08 09:31:42 +01:00
eec8b7a8d4
tree-wide: emulators: s/RUNTIME_TMP_DIR/EMULATOR_TMP_DIR 2022-03-04 13:44:51 +01:00
d425cbb2bf
makefiles/renode: use RUNTIME_TMP_DIR in EMULATOR_SERIAL_PORT 2022-03-04 13:34:18 +01:00
Leandro Lanzieri
c33cfdfaec
Merge pull request #17742 from gschorcht/cpu/esp/rename_esptool_dir
dist/tools: rename directory esptool to esptools to use it for multiple tools
2022-03-04 11:58:40 +01:00
Gunar Schorcht
cbbd02d520 dist/tools: rename esptool to esptools to use it for several tools
The directory `dist/tools/esptool` already contains a couple of ESP tools and not only esptool.py. As the location for a couple of ESP related tools, it is more clear to call it `esptools` instead of `esptool`.
2022-03-04 08:34:19 +01:00
Karl Fessel
415f9aa0ee make/emulate: use unix sockets with qemu 2022-03-03 17:15:50 +01:00
Dylan Laduranty
bd49ea91db
Merge pull request #17396 from fjmolinas/pr_docker_env_vars_allways
makefiles/docker.inc.mk: add DOCKER_ENV_VARS_ALWAYS
2022-03-02 22:02:02 +01:00