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

1615 Commits

Author SHA1 Message Date
Teufelchen1
791d4e3a4d buildsystem: Always expose CPU_RAM_BASE & SIZE flags 2023-06-20 12:16:06 +02:00
bors[bot]
829af7c105
Merge #19703 #19724 #19735
19703: cpu/sam0_eth: interrupt based link detection/auto-negotiation r=benpicco a=benpicco



19724: dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable r=benpicco a=fabian18



19735: nrf5x_common: Clear I2C periph shorts r=benpicco a=bergzand

### Contribution description

The I2C peripheral's shortcuts are used with the read and write register to automatically stop the I2C transaction or to continue with the next stage.

With simple I2C read and write bytes these shorts are not used, but are also not cleared by the function in all cases, causing it to use the shortcut configuration set by a previous function call. This patch ensures that the shorts are always set by the read and write functions

### Testing procedure

Should be possible to spot with a logic analyzer and the I2C periph test. Maybe the HIL test can also detect it :)

### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-06-14 12:34:33 +00:00
bors[bot]
5e7c6c2ff7
Merge #19697 #19725
19697: drivers/sx127x: reduce use of floats r=benpicco a=maribu

### Contribution description

Convert the floating point arithmetic to integer arithmetic.


19725: buildsystem: add target debug-client r=benpicco a=fabian18



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-06-13 19:08:40 +00:00
Fabian Hüßler
17d0e586c5 dist/tools/openocd: add OPENOCD_SERVER_ADDRESS variable 2023-06-13 21:04:27 +02:00
bors[bot]
c463bc9c11
Merge #18156
18156: pkg/opendsme: add initial support for IEEE 802.15.4 DSME time-slotted MAC r=jia200x a=jia200x



Co-authored-by: Jose Alamos <jose@alamos.cc>
2023-06-13 12:11:07 +00:00
Fabian Hüßler
c76a192eb8 openocd: support target debug-client 2023-06-10 01:03:30 +02:00
Fabian Hüßler
4e1ac37400 buildsystem: add target debug-client 2023-06-10 00:04:56 +02:00
Benjamin Valentin
94353145a2 shell/cmds: add genfile command 2023-06-08 13:11:43 +02:00
Marian Buschsieweke
5cc92304df
makefiles/toolchain/gnu.inc.mk: fix compilation
The `--param=min-pagesize=0` needed since GCC 12 is still needed with
GCC 13. This time at least the message is more meaningful:

     note: source object is likely at address zero

This is something that is not expected in a userspace app, but with
bare metal MCUs and often flash or memory mapped I/O starting from
address zero, this warning prevents legitimate code from compiling.
2023-06-03 20:10:56 +02:00
Jose Alamos
a6648a2c7f
sys/shell/commands/sc_opendsme: add gts commands 2023-05-31 16:31:27 +02:00
Jose Alamos
d7b51c687b
opendsme: add initial support 2023-05-31 16:31:24 +02:00
bors[bot]
993c10a2a2
Merge #19556 #19662
19556: tools/mspdebug: fix `make debug` and `make debugserver` r=aabadie a=maribu

### Contribution description

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

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


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

### Contribution description

removes a unnecessary use of float

### Testing procedure

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

### Issues/PRs references

#19614 

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

- `make debug` now starts both mspdebug and GDB, no need to
  run `make debugserver` prior to `make debug` anymore
- `make debug` no longer flashes the target to not waste flash erase
  cycles
- GDB mutliarch support is added
- support for selecting a debug adapter by its serial is added
2023-05-24 17:00:38 +02:00
08fdb23185
sys/evtimer: remove support for xtimer backend 2023-05-24 09:53:33 +02:00
bors[bot]
f3150120f7
Merge #17425
17425: cpu/rpx0xx: initial PIO support r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
2023-05-23 07:02:45 +00:00
Fabian Hüßler
e69a0bea07 makefiles: add makefile to generate header file from PIO program 2023-05-23 08:49:37 +02:00
bors[bot]
975f150383
Merge #19621 #19622 #19623 #19626 #19627
19621: sys: add Kconfig support for clif r=MrKevinWeiss a=aabadie



19622: sys: add some missing kconfig + adapt related tests when possible r=aabadie a=aabadie



19623: pkg/libbase58: add kconfig support r=MrKevinWeiss a=aabadie



19626: sys/gnrc_lorawan: remove deprecated tx port option r=aabadie a=aabadie



19627: makefiles/pseudomodules: remove deprecated event_thread_lowest module r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-20 07:13:34 +00:00
558d7dd8f2
makefiles/pseudomodules: remove deprecated event_thread_lowest module 2023-05-19 16:15:10 +02:00
f25731e88a
make/usb_board_reset: define {preflash,term}-delay when necessary 2023-05-18 21:41:54 +02:00
Marian Buschsieweke
0747f5816c
sys/shell: Add coreclk command to shell_cmd_sys
The coreclk shell command now prints the CPU frequency in Hz, which
can be useful for boards with RC generated CPU frequency (e.g.
RP2040, FE310, or MPS430Fx1xx MCUs allow this) which may quite a bit
off the target frequency.
2023-05-16 10:58:06 +02:00
5f3a9de7fa
treewide: fix path to ztimer test applications 2023-05-13 19:08:38 +02:00
Fabian Hüßler
92c50cc5ed makefiles: add pseudomodules to automatically start PIO programs 2023-05-12 23:03:05 +02:00
Fabian Hüßler
cea57ef1f2 tools/pioasm: Add PIO assembler pioasm 2023-05-12 23:03:05 +02:00
090150ec86
makefiles/app_dirs.inc.mk: add tests/net subdirectory 2023-05-12 16:36:38 +02:00
8e165cf2e2
makefiles/app_dirs.inc.mk: add tests/cpu subdirectory 2023-05-12 10:30:11 +02:00
9af8b9d763
makefiles/app_dirs.inc.mk: add tests/build_system subdirectory 2023-05-11 14:30:50 +02:00
bors[bot]
d362a8d697
Merge #19565 #19568 #19574
19565: tests: move core related applications to their own tests/core/ folder r=maribu a=aabadie



19568: tests: move remaining driver related applications to tests/drivers r=maribu a=aabadie



19574: cpu/stm32/periph_gpio: reset PU/PD for ADC channels r=maribu a=gschorcht

### Contribution description

This PR provides a small fix that is relevant when a GPIO has been used as input/output with a pull resistor before it is initialized as an ADC channel.

The PU/PD configuration has to be `0b00` for analog outputs which is corresponds to the reset state. However, if the GPIO is not in the reset state but was used digital input/output with any pull resistor, the PU/PD configuration has also to be reset to use it as ADC channel.

### Testing procedure

- Green CI
- The `periph_adc` test application should still work for any board that supports the `periph_adc` feature.

### Issues/PRs references



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-05-11 10:11:37 +00:00
bors[bot]
f4fa6bb809
Merge #19484
19484: makefiles/arch/msp430.inc.mk: Fix compilation issues with GCC 12 r=maribu a=maribu

### Contribution description

This fixes the following compilation issues:

    /home/maribu/Repos/software/RIOT/cpu/msp430fxyz/periph/gpio.c: In function 'gpio_periph_mode':
    /home/maribu/Repos/software/RIOT/cpu/msp430fxyz/periph/gpio.c:95:15: error: array subscript 0 is outside array bounds of 'msp_port_isr_t[0]' [-Werror=array-bounds]
       95 |         sel = &(isrport->SEL);
          |               ^~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

by adding `CFLAGS += --param-min-pagesize=0` for GCC 12 (same issue as already fixed for AVR).

and:

    /usr/lib/gcc/msp430-elf/12.2.0/../../../../msp430-elf/bin/ld: warning: /home/maribu/Repos/software/RIOT/cpu/msp430_common/ldscripts/xfa.ld contains output sections; did you forget -T?

by adding the missing `-T`.

### Testing procedure

The following should still work:

- `make BOARD=msb-430 -C examples/hello-world`
- `make BOARD=msb-430 -C tests/xfa flash test`

### Issues/PRs references

None

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-10 17:52:04 +00:00
5621985353
makefiles/app_dirs.inc.mk: add tests/core subdirectory 2023-05-10 15:41:36 +02:00
bors[bot]
c7f750a880
Merge #19566 #19570
19566: tests: move sys related applications to their own tests/sys/ folder r=aabadie a=aabadie



19570: boards/p-l496g-cell02: fix UART_DEV(2) configuration r=aabadie a=gschorcht

### Contribution description

This PR fixes the configuration of `UART_DEV(2)`. RX and TX pin were reversed in configuration. The TX pin is connected to PB6 instead of PG10 and the RX pin is connected to PG10 instead of PB6, see [schematic](https://www.st.com/content/ccc/resource/technical/layouts_and_diagrams/schematic_pack/group2/f5/28/1b/e1/55/12/4d/3c/mb1261-cell02-b06-schematic/files/mb1261-cell02-b06-schematic.pdf/jcr:content/translations/en.mb1261-cell02-b06-schematic.pdf), page 14.

### Testing procedure

The UART interface at STMOD+ or PMOD connector should work.

### Issues/PRs references

Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-05-10 13:02:19 +00:00
31ac82030e
makefiles/app_dirs.inc.mk: add tests/sys subdirectory 2023-05-10 10:33:33 +02:00
d6914573b6
makefiles/app_dirs.inc.mk: add tests/bench subdirectory 2023-05-10 09:49:39 +02:00
bors[bot]
cf7ef55b8d
Merge #19490
19490: sys/shell/gnrc_netif: don't always build lora options with ifconfig r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-09 12:46:59 +00:00
Marian Buschsieweke
b86366e34e
makefiles/toolchain: Fix incorrect assumptions on address space layout
GCC 12 gives out of bounds warnings when the resulting address is out
of bounds of what GCC assumes to be the valid address space. It seems
that by default the address 0x0 is not considered valid (which would
be a NULL pointer and typically not mapped in a userspace behind an MMU
scenario), but in fact is valid on bare metal hardware. At least on
AVR and MSP430 this needs to be set. On many Cortex M MCUs 0x0 is also
a valid address (e.g. often the flash is mapped there), but seemingly
for them `--param=min-pagesize=0` is already the default. In any case,
it won't hurt to set it explicit for them as well.
2023-05-08 15:42:40 +02:00
Marian Buschsieweke
b123f1071a
cpu/msp430_common: Fix linking with binutils 2.40
An `INSERT AFTER` directive no longer can refer to a different linker
script included with `-T path/to/script.ld`. Instead, this adds wrapper
linker scripts that just `INCLUDE` the three individual linker scripts.
This way, the xfa.ld can safely refer back to sections defined in
the vendor linker script.

For some reason, this approach cause the exact issue it fixes for
binutils 2.40 with the binutils in the CI. We stick with the old
linker flags with binutils prior 2.40 to be compatible with both
conflicting behaviors.

The best approach would be to come up with something that works across
different versions of binutils; but no such solution materialized.
2023-05-08 15:40:26 +02:00
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