-
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
dist/tools/openocd: fix parsing of flash bank base #19620
Conversation
Since 80fc9fabc66a0bc767467fa14c703e5a9f340cd3 the format of the `flash list` command changed to a more human readable multi-line variant. Technically, the change is white-space only. Still, the current approach of parsing them with awk, sed and cut doesn't like the new multi-line format. The parsing is now delegated into a python script that is compatible across OpenOCD versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code change is good and I like the approach of using Python for parsing the output of "flash list". I tested this on nucleo-l476rg for which I have an issue when testing tests/riotboot
with the latest openocd version. With this PR it works on old and latest OpenOCD. It is also working on both OpenOCD versions with nrf52840dk.
ACK
bors merge |
19620: dist/tools/openocd: fix parsing of flash bank base r=aabadie a=maribu ### Contribution description Since [80fc9fabc66a0bc767467fa14c703e5a9f340cd3] the format of the `flash list` command changed to a more human readable multi-line variant. Technically, the change is white-space only. Still, the current approach of parsing them with awk, sed and cut doesn't like the new multi-line format. The parsing is now delegated into a python script that is compatible across OpenOCD versions. [80fc9fabc66a0bc767467fa14c703e5a9f340cd3]: openocd-org/openocd@80fc9fa 19636: sys: model ecc, evtimer, pipe and shell_lock in kconfig r=aabadie a=aabadie 19639: tests/net/gnrc_mac_timeout: add automated test r=aabadie a=aabadie Co-authored-by: Marian Buschsieweke <[email protected]> Co-authored-by: Alexandre Abadie <[email protected]>
Build failed (retrying...): |
bors merge |
Already running a review |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Thx :) |
Contribution description
Since 80fc9fabc66a0bc767467fa14c703e5a9f340cd3 the format of the
flash list
command changed to a more human readable multi-line variant. Technically, the change is white-space only. Still, the current approach of parsing them with awk, sed and cut doesn't like the new multi-line format. The parsing is now delegated into a python script that is compatible across OpenOCD versions.Testing procedure
Should now work even with an fresh OpenOCD build from git
Issues/PRs references
Found while looking into #14576