-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sam0_common: use size_t len for I2C transfers (fixes #19008) #19009
Merged
benpicco
merged 1 commit into
RIOT-OS:master
from
ant9000:pr/sam0_common_i2c_size_t_issue
Dec 5, 2022
Merged
sam0_common: use size_t len for I2C transfers (fixes #19008) #19009
benpicco
merged 1 commit into
RIOT-OS:master
from
ant9000:pr/sam0_common_i2c_size_t_issue
Dec 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
Area: cpu
Area: CPU/MCU ports
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
labels
Dec 4, 2022
benpicco
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Dec 4, 2022
benpicco
approved these changes
Dec 5, 2022
Thank you for the fix! |
benpicco
added
the
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
label
Dec 5, 2022
You're welcome! |
Backport provided in #19019 |
bors bot
added a commit
that referenced
this pull request
Dec 12, 2022
19019: sam0_common: use size_t len for I2C transfers (fixes #19008) [backport 2022.10] r=maribu a=maribu # Backport of #19009 See description in #19008 . I modified `_read` and `_write` in `cpu/sam0_common/periph/i2c.c` in order to use the declared `len` parameter. 19020: makefiles/tools/gdb.inc.mk: prefer $(target)-gdb over gdb-multiarch [backport 2022.10] r=maribu a=maribu # Backport of #18784 ### Contribution description 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`. ### Testing procedure ``` USEMODULE=esp_jtag make BOARD=esp32-ethernet-kit-v1_2 PROGRAMMER=openocd OPENOCD=openocd-esp32 debug -C examples/default ``` In `master`: ``` /home/maribu/Repos/software/RIOT/dist/tools/openocd/openocd.sh debug /home/maribu/Repos/software/RIOT/examples/default/bin/esp32-ethernet-kit-v1_2/default.elf ### Starting Debugging ### Open On-Chip Debugger v0.11.0-snapshot (2022-10-21-10:40) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Reading symbols from /home/maribu/Repos/software/RIOT/examples/default/bin/esp32-ethernet-kit-v1_2/default.elf... Remote debugging using :3333 Remote 'g' packet reply is too long (expected 180 bytes, got 420 bytes): 00040040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000004004096fec51c2500060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ``` With this PR: ``` /home/maribu/Repos/software/RIOT/dist/tools/openocd/openocd.sh debug /home/maribu/Repos/software/RIOT/examples/default/bin/esp32-ethernet-kit-v1_2/default.elf ### Starting Debugging ### DBG="xtensa-esp32-elf-gdb", GDB="xtensa-esp32-elf-gdb", DBG_FLAGS="-q -ex "tar ext :3333" " Open On-Chip Debugger v0.11.0-snapshot (2022-10-21-10:40) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Reading symbols from /home/maribu/Repos/software/RIOT/examples/default/bin/esp32-ethernet-kit-v1_2/default.elf... Remote debugging using :3333 0x40000400 in ?? () (gdb) start The program being debugged has been started already. Start it from the beginning? (y or n) y Temporary breakpoint 1 at 0x400d0024: file /data/riotbuild/riotbase/examples/default/main.c, line 37. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /home/maribu/Repos/software/RIOT/examples/default/bin/esp32-ethernet-kit-v1_2/default.elf [esp32.cpu0] Target halted, PC=0x400D0024, debug_reason=00000001 Set GDB target to 'esp32.cpu0' Temporary breakpoint 1, main () at /data/riotbuild/riotbase/examples/default/main.c:37 37 { (gdb) show arch The target architecture is set to "auto" (currently "xtensa"). (gdb) quit A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) y Detaching from program: /home/maribu/Repos/software/RIOT/examples/default/bin/esp32-ethernet-kit-v1_2/default.elf, Remote target [Inferior 1 (Remote target) detached] ``` ### Issues/PRs references #18359 (comment) 19040: CI: add bors.toml from master r=kaspar030 a=kaspar030 19041: CI: update murdock yml [backport 2022.10] r=kaspar030 a=kaspar030 # Backport of #19022 Co-authored-by: Antonio Galea <antonio.galea@gmail.com> Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de> Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
bors bot
added a commit
that referenced
this pull request
Dec 13, 2022
19019: sam0_common: use size_t len for I2C transfers (fixes #19008) [backport 2022.10] r=kaspar030 a=maribu # Backport of #19009 See description in #19008 . I modified `_read` and `_write` in `cpu/sam0_common/periph/i2c.c` in order to use the declared `len` parameter. Co-authored-by: Antonio Galea <antonio.galea@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: cpu
Area: CPU/MCU ports
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
Type: bug
The issue reports a bug / The PR fixes a bug (including spelling errors)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See description in #19008 . I modified
_read
and_write
incpu/sam0_common/periph/i2c.c
in order to use the declaredlen
parameter.