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

43818 Commits

Author SHA1 Message Date
cbca7ca149
Makefile.dep: include each sys included module deps if available 2023-06-15 10:24:45 +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
Benjamin Valentin
2a255ff3e8 cpu/sam0_eth: interrupt based link detection/auto-negotiation 2023-06-14 14:21:52 +02:00
e5d25e0b04
nrf5x_common: Clear I2C periph shorts
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
2023-06-14 10:37:24 +02:00
bors[bot]
61d7c4028e
Merge #19734
19734: drivers/pcf857x: allow to define PCF857x_BASE_ADDR at compile time r=maribu a=hugueslarrive



Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-06-14 07:38:17 +00:00
Hugues Larrive
85e41a1f18 drivers/pcf857x: allow to define PCF857x_BASE_ADDR at compile time 2023-06-14 05:38:20 +02:00
bors[bot]
650bef6085
Merge #19729
19729: cpu/qn908x/periph_i2c: allow internal pull-up on SCL r=maribu a=maribu

### Contribution description

Allow the board config to specify use of external or external pull-up resistor on the SCL up. Default to the internal pull-up, two weak pull ups in parallel are preferable over no pull-up.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-13 22:16:46 +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]
1dbaf9e162
Merge #19732
19732: SUBSYSTEMS.md: add @maribu r=maribu a=maribu



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-13 15:58:48 +00:00
Marian Buschsieweke
6f5727cbc3
SUBSYSTEMS.md: add @maribu 2023-06-13 15:03:01 +02:00
Marian Buschsieweke
98b38399df
cpu/qn908x/periph_i2c: enable internal pull-up on SCL
Always enable the internal pull-up on the SCL line to always have a
functional I2C bus. This may increase power consumption where an
external pull up is present as well. But let's wait for a real world
use case where this would help to extend battery life before making
this configurable.

This fixes https://github.com/RIOT-OS/RIOT/issues/19021
2023-06-13 14:43:36 +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
bors[bot]
e2c5ea0009
Merge #19730 #19731
19730: boards/qn9080dk: fix periph conflict r=maribu a=maribu

### Contribution description

- Document which I2C/SPI/UART peripheral maps to which FLEXCONN IP block to easily detect potential overlap
- Switch conflict between SPI and I2C peripheral by using a different FLEXCONN for I2C


19731: boards/qn9080dk: update doc on flashing r=maribu a=maribu

### Contribution description

- update the doc on the internal programmer firmware:
    - not only switching to J-Link, but also just updating it does improve reliability of flashing
- give hints in how to get the ~~shitty~~ wonderful update process working
- update notes on OpenOCD requirements


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-13 10:59:31 +00:00
Marian Buschsieweke
92a891aa2f
boards/qn9080dk: update doc on flashing
- update the doc on the internal programmer firmware:
    - not only switching to J-Link, but also just updating it does
      improve reliability of flashing
- give hints in how to get the ~~shitty~~ wonderful update process
  working
- update notes on OpenOCD requirements
2023-06-12 21:29:07 +02:00
Marian Buschsieweke
8e8f424922
boards/qn9080dk: fix periph conflict
- Document which I2C/SPI/UART peripheral maps to which FLEXCONN IP
  block to easily detect potential overlap
- Switch conflict between SPI and I2C peripheral by using a different
  FLEXCONN for I2C
2023-06-12 21:10:27 +02:00
Marian Buschsieweke
826095d56e
drivers/sx127x: reduce use of floats 2023-06-12 13:54:06 +02:00
bors[bot]
0fdea67238
Merge #19723
19723: dist/tools/openocd: add RTT port variable r=maribu a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-06-12 10:23:49 +00:00
bors[bot]
63f537facd
Merge #19727
19727: SUBSYSTEMD.md: add @kaspar030 to core, Rust, build system, CI & timers r=bergzand a=kaspar030



Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-06-12 08:09:35 +00:00
62c3fe470d SUBSYSTEMD.md: add @kaspar030 to core, Rust, build systemk, CI & hl timers 2023-06-12 10:04:01 +02: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
Fabian Hüßler
dbfb0ea76a dist/tools/openocd: add RTT port variable 2023-06-09 23:49:35 +02:00
bors[bot]
0e09b43f6d
Merge #19580
19580: board: add Adafruit Grand Central M4 Express support r=maribu a=gschorcht

### Contribution description

This PR provides the support for Adafruit Grand Central M4 Express board. The main features of the board are:

- ATSAMD51 Cortex M4 running at 120 MHz
- 1MB Flash
- 256 KB RAM
- external 8 MB QSPI Flash storage
- Micro SD Card slot connected to SPI

### Testing procedure


### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-06-09 18:21:01 +00:00
Gunar Schorcht
3d9d93e0cd board: add Adafruit Grand Central M4 Express support 2023-06-09 16:28:19 +02:00
bors[bot]
ed95055dab
Merge #19722
19722: tools/jlink.sh: start gdb server with setsid r=maribu a=OlegHahm

Adopted from openocd script in order to prevent killing the gdb server upon SIGINT.

Thanks to `@maribu` for the pointer.

### Contribution description

Prevent gdb server from being killed by SIGINT when using jlink for debugging.

### Testing procedure

Debug any arbitrary RIOT application on a board where jlink is supported as a programmer and `PROGRAMMER` is set to `jlink` by calling `make debug`. Hit Ctrl-C. The program debugging should get interrupted but can be continued via `continue`.

Co-authored-by: Oleg Hahm <oleg@riot-os.org>
2023-06-09 13:48:07 +00:00
Oleg Hahm
30e1d3ef8a tools/jlink.sh: start gdb server with setsid
Adopted from openocd script in order to prevent killing the gdb server
upon SIGINT.
2023-06-09 15:33:14 +02:00
bors[bot]
35d3896d47
Merge #19706
19706: boards/olimex-msp430-h2618: add new board r=maribu a=maribu

### Contribution description

This adds support of the Olimex MSP430-H2618 board. This board has plenty of RAM and ROM for an MSP430 board (even more than the z1), but still is easily obtainable.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-09 05:09:49 +00:00
Marian Buschsieweke
498668af02
boards: drop unused INFOMEM define 2023-06-08 23:42:50 +02:00
Marian Buschsieweke
d28d4cdfa3
boards/olimex-msp430-h2618: add new board 2023-06-08 23:42:50 +02:00
Marian Buschsieweke
97857d2740
cpu/msp430_common: add support for MSP432F2618 2023-06-08 23:42:50 +02:00
bors[bot]
98370beb4f
Merge #19721
19721: nanocoap, gcoap: homogenize name of the module r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-06-08 19:03:32 +00:00
bors[bot]
2268caa811
Merge #19212 #19360 #19401 #19645 #19720
19212: shell/rtc: use rtc_tm_normalize() to sanitize input r=benpicco a=benpicco



19360: gcoap: make use coap_build_reply() in gcoap_resp_init() r=benpicco a=benpicco



19401: shell/cmds: add genfile command r=benpicco a=benpicco



19645: sys/isrpipe: Replace xtimer with ztimer_usec r=benpicco a=MrKevinWeiss



### Contribution description

Getting ready for the xtimer dep.


### Testing procedure

Green murdock, there is no explicit test for isrpipe but since it runs xtimer compat it should operate the same.

### Issues/PRs references



19720: tests: remove unnecessary use of floating point r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-06-08 16:02:09 +00:00
Benjamin Valentin
d4042eedde gcoap: homogenize name of the module 2023-06-08 16:33:05 +02:00
Benjamin Valentin
661829f43f nanocoap: homogenize name of the module 2023-06-08 16:29:12 +02:00
Benjamin Valentin
7634f4c7e9 tests/unittests: avoid float in tests-bloom 2023-06-08 15:53:03 +02:00
Benjamin Valentin
5e0e9bedec tests/bloom_bytes: use fixed point to calculate result 2023-06-08 15:52:48 +02:00
Benjamin Valentin
aba5e9bcde gcoap: make use coap_build_reply() in gcoap_resp_init() 2023-06-08 15:29:03 +02:00
bors[bot]
d7e4f939c2
Merge #19695
19695: drivers/hih6130: avoid using floats r=maribu a=maribu

### Contribution description

- avoid using floating point arithmetic
- use ztimer instead of xtimer
- use fmt to print fixed point numbers in the test app


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-08 13:02:12 +00:00
Marian Buschsieweke
bb366c476a
drivers/hih6130: avoid using floats 2023-06-08 14:33:38 +02:00
Benjamin Valentin
e2b03af211 tests/vfs_default: enable genfile command 2023-06-08 13:12:15 +02:00
Benjamin Valentin
94353145a2 shell/cmds: add genfile command 2023-06-08 13:11:43 +02:00
Marian Buschsieweke
6df03ecb93
cpu/msp430_common: update vendor header files 2023-06-08 09:50:41 +02:00
bors[bot]
72914bb197
Merge #19717
19717: boards/rpi-pico: update openocd.cfg file r=aabadie a=dylad

### Contribution description

This PR fixes the use of openOCD to flash a rpi-pico board.
Currently on master, trying to flash this board with openOCD (v12) and a CMSIS-DAP probe fails.
with this PR, it now works as expected (even debugging)
Moreover, the configuration file used by RIOT is now deprecated on openOCD v12 so changes it while we're at it.


master:
```
### Flashing Target ###
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
swd
Warn : rp2040-core0.cfg configuration file is deprecated and will be
       removed in the next release. Use following parameters instead:
          -c 'set USE_CORE 0' -f target/rp2040.cfg
Warn : Transport "swd" was already selected
adapter speed: 4000 kHz

Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E46170D59B552B2C
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 4000 kHz
Info : SWD DPIDR 0x0bc12477
Error: [rp2040.cpu] Could not find MEM-AP to control the core
Warn : target rp2040.cpu examination failed
Info : starting gdb server for rp2040.cpu on 0
Info : Listening on port 37347 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* rp2040.cpu         cortex_m   little rp2040.cpu         unknown

Error: [rp2040.cpu] Could not find MEM-AP to control the core
Error: [rp2040.cpu] Debug AP not available, reset NOT asserted!

make: *** [/home/dylan/work/RIOT/examples/blinky/../../Makefile.include:855: flash] Error 1
make: Leaving directory '/home/dylan/work/RIOT/examples/blinky'
```

with this PR:
```
### Flashing Target ###
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
swd
Warn : Transport "swd" was already selected
adapter speed: 4000 kHz

Info : Using CMSIS-DAPv2 interface with VID:PID=0x2e8a:0x000c, serial=E46170D59B552B2C
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 4000 kHz
Info : SWD DPIDR 0x0bc12477, DLPIDR 0x00000001
Info : SWD DPIDR 0x0bc12477, DLPIDR 0x10000001
Info : [rp2040.core0] Cortex-M0+ r0p1 processor detected
Info : [rp2040.core0] target has 4 breakpoints, 2 watchpoints
Info : [rp2040.core1] Cortex-M0+ r0p1 processor detected
Info : [rp2040.core1] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for rp2040.core0 on 0
Info : Listening on port 40985 for gdb connections
Info : starting gdb server for rp2040.core1 on 0
Info : Listening on port 39901 for gdb connections
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* rp2040.core0       cortex_m   little rp2040.cpu         running
 1  rp2040.core1       cortex_m   little rp2040.cpu         running

[rp2040.core0] halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
[rp2040.core1] halted due to debug-request, current mode: Thread 
xPSR: 0xf1000000 pc: 0x000000ee msp: 0x20041f00
Info : Found flash device 'win w25q16jv' (ID 0x001540ef)
Info : RP2040 B0 Flash Probe: 2097152 bytes `@0x10000000,` in 32 sectors

Info : Padding image section 2 at 0x10003190 with 112 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x10003200 .. 0x1000ffff
auto erase enabled
wrote 12800 bytes from file /home/dylan/work/RIOT/tests/leds/bin/rpi-pico/tests_leds.elf in 1.516848s (8.241 KiB/s)

verified 12688 bytes in 0.089461s (138.503 KiB/s)

shutdown command invoked
Done flashing
```

### Testing procedure

Flash a `rpi-pico` board using openOCD.

### Issues/PRs references
None.


Co-authored-by: dylad <dylan.laduranty@mesotic.com>
2023-06-08 06:35:30 +00:00
bors[bot]
ed3b894389
Merge #19713
19713: nanocoap: clean up coap_iterate_option(), make it public r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-06-07 22:54:15 +00:00
dylad
bec9dee0b5 boards/rpi-pico: update openocd.cfg file
Signed-off-by: dylad <dylan.laduranty@mesotic.com>
2023-06-07 18:58:30 +02:00
Benjamin Valentin
030d0c84d6 examples/gcoap_block_server: add stm32f7508-dk to Makefile.ci 2023-06-07 18:33:57 +02:00
bors[bot]
517abc787a
Merge #19705
19705: boards/z1: fix broken clock configuration r=maribu a=maribu

### Contribution description

The MSP430F2xx family has on RSEL bit more than the MSP430x1xxx family. The first commit updates the clock calibration accordingly.

df5c319978 from https://github.com/RIOT-OS/RIOT/pull/19558 broke the clock configuration of the Z1 by relying on the incorrect documentation of what clock is actually used. Closely reading the convoluted clock initialization code revealed that no XT2 crystal is present (as also indicated by some comments in `board.c`), contradicting the `#define MSP430_HAS_EXTERNAL_CRYSTAL 1` in the `board.h`.

The second commit should restore behavior (but with calibrated DCO than hard coded magic numbers).


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-06-07 15:48:27 +00:00
Benjamin Valentin
923c9a32ef nanocoap: clean up coap_iterate_option(), make it public 2023-06-07 16:07:17 +02:00
Marian Buschsieweke
971dc880f6
boards/z1: fix broken clock configuration
df5c319978 from
https://github.com/RIOT-OS/RIOT/pull/19558 broke the clock
configuration of the Z1 by relying on the incorrect documentation of
what clock is actually used. Closely reading the convoluted clock
initialization code revealed that no XT2 crystal is present (as also
indicated by some comments in `board.c`), contradicting the
`#define MSP430_HAS_EXTERNAL_CRYSTAL 1` in the `board.h`.

This now should restore behavior (but with calibrated DCO than
hard coded magic numbers).
2023-06-07 15:45:44 +02:00