Skip to content
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

makefiles/sam0: fix debugging with edbg #12653

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Nov 6, 2019

Contribution description

OpenOCD should always be included for debugging if JLinkExe is not used.

Testing procedure

run make BOARD=samr21-xpro debug

Issues/PRs references

fixes #12652

@benpicco benpicco added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 6, 2019
@benpicco benpicco requested a review from miri64 November 6, 2019 14:40
@benpicco benpicco added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Nov 6, 2019
@miri64 miri64 added the Platform: ARM Platform: This PR/issue effects ARM-based platforms label Nov 6, 2019
@@ -47,9 +47,7 @@ endif
# this board uses J-Link for debug and possibly flashing
ifeq ($(PROGRAMMER),jlink)
include $(RIOTMAKE)/tools/jlink.inc.mk
endif

else
# this board uses openocd for debug and possibly flashing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indented.

OpenOCD should *always* be included for debugging if JLinkExe is not used.

fixes RIOT-OS#12652
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change make debug works again for samr21-xpro

[mlenders@sarajevo RIOT]<3 git log --oneline -1
756cab9385 (HEAD) makefiles/sam0: fix debugging with edbg
[mlenders@sarajevo RIOT]<3 BOARD=samr21-xpro make -C examples/gnrc_networking debug
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/gnrc_networking'
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/openocd/openocd.sh debug /home/mlenders/Repositories/RIOT-OS/RIOT/examples/gnrc_networking/bin/samr21-xpro/gnrc_networking.elf
### Starting Debugging ###
Open On-Chip Debugger 0.10.0+dev-00910-g4dbcb1e7 (2019-06-17-16:24)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Reading symbols from /home/mlenders/Repositories/RIOT-OS/RIOT/examples/gnrc_networking/bin/samr21-xpro/gnrc_networking.elf...
Remote debugging using :3333
__set_PRIMASK (priMask=1) at include/vendor/cmsis_gcc.h:414
warning: Source file is more recent than executable.
414	  __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory");
(gdb) ^CQuit
(gdb) quit

@miri64
Copy link
Member

miri64 commented Nov 6, 2019

(and make flash as well)

@benpicco
Copy link
Contributor Author

benpicco commented Nov 6, 2019

This also slipped into the 2019.10 release 😳
Will there be a bugfix release before 2020.01?

@benpicco benpicco merged commit 8c181d8 into RIOT-OS:master Nov 6, 2019
@benpicco benpicco deleted the sam0-fix-opencd-debug branch November 6, 2019 15:04
@miri64
Copy link
Member

miri64 commented Nov 6, 2019

That's up to @kb2ma. Will there be a 2019.10.1 release (also potentially with other bug fixes)?

@kb2ma
Copy link
Member

kb2ma commented Nov 6, 2019

I don't recall a guideline on the topic of point releases, so I'll review past instances for some context. Certainly this fix is worth of a backport so that a user at least could use a fresh checkout of the '2019.10-branch' branch, so please do that and I would be happy to merge it.

Ahhh, release management -- the gift that keeps on giving. ;-)

@benpicco
Copy link
Contributor Author

benpicco commented Nov 6, 2019

Hm, how should I interpret the output of

Traceback (most recent call last):
  File "dist/tools/backport_pr/backport_pr.py", line 19, in <module>
    from agithub.GitHub import GitHub
  File "/home/benpicco/.local/lib/python3.7/site-packages/agithub/__init__.py", line 3, in <module>
    from agithub.base import VERSION
  File "/home/benpicco/.local/lib/python3.7/site-packages/agithub/base.py", line 18, in <module>
    VERSION = get_version(root='..', relative_to=__file__)
  File "/home/benpicco/.local/lib/python3.7/site-packages/setuptools_scm/__init__.py", line 150, in get_version
    parsed_version = _do_parse(config)
  File "/home/benpicco/.local/lib/python3.7/site-packages/setuptools_scm/__init__.py", line 113, in _do_parse
    "use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
LookupError: setuptools-scm was unable to detect version for '/home/benpicco/.local/lib/python3.7/site-packages'.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

I just did pip3 install agithub because that package was missing.

@miri64
Copy link
Member

miri64 commented Nov 6, 2019

@benpicco what is the context?

@miri64
Copy link
Member

miri64 commented Nov 6, 2019

I don't recall a guideline on the topic of point releases, so I'll review past instances for some context. Certainly this fix is worth of a backport so that a user at least could use a fresh checkout of the '2019.10-branch' branch, so please do that and I would be happy to merge it.

There were instances of bug-fixing releases in the past see e.g. 2018.10.1 (and it was also discussed for 2019.04, IIRC, maybe @MrKevinWeiss give more info on that). I think all in all it's up to the severity of the bug and if the release manager sees their job done after the major release or not (there were release managers in the past that specifically opted out to not have bug fix releases).

@benpicco
Copy link
Contributor Author

benpicco commented Nov 6, 2019

@miri64 oh sorry, that was the backport_pr.py script.

@kb2ma
Copy link
Member

kb2ma commented Nov 7, 2019

Thanks for the retrospective, @miri64. Yes, I saw 2018.10.1, which looks to have been triggered by a serious security issue, #10739.

If I understand correctly, the current issue includes all the sam*-xpro and arduino-zero boards. This is painful, but I don't think it rises to the need for a point release. I think the backport to 2019.10-branch is good enough. If someone doesn't want to mess with git, they can just download it from the GitHub interface.

I have added this topic to my release debrief for the upcoming assembly. Based on that, I plan to add a couple of sentences on this subject to the release guidelines for future reference.

@kb2ma
Copy link
Member

kb2ma commented Nov 11, 2019

Backport provided in #12685

@kb2ma
Copy link
Member

kb2ma commented Nov 11, 2019

Went ahead and created the backport to keep things moving.

@fjmolinas fjmolinas added this to the Release 2020.01 milestone Jan 15, 2020
@fjmolinas fjmolinas removed this from the Release 2020.01 milestone Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system 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 Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

samr21-xpro: Can't use make debug anymore
4 participants