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

boards/rpi-pico: specify needed args when using jlink flasher #19537

Merged
merged 1 commit into from
May 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/rpi-pico/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
CPU_MODEL := RP2040
PORT_LINUX ?= /dev/ttyUSB0

ifeq ($(PROGRAMMER),jlink)
JLINK_DEVICE = RP2040_M0_0
FLASHFILE = $(ELFFILE)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
FLASHFILE = $(ELFFILE)

I think it should even work like this, as the ELF file is the default flash file anyway. Please squash / amend directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, I share some doubts here. When I played with J-link before this PR, it defaults to .bin file and flashing doesn't work. (Because I didn't provide the flash memory offset I guess) so I add to pass FLASHFILE manually during the make flash command.
But maybe I'm wrong here. I'll try again tonight. I left my rpi-pico board at home.

Copy link
Member Author

Choose a reason for hiding this comment

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

This should be the culprit.

Copy link
Member

Choose a reason for hiding this comment

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

OK, let's merge this as is. I can rebase #19541 on top of that and drop this line again there, as then the ELF file would indeed be the default.

Copy link
Member Author

Choose a reason for hiding this comment

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

As you wish. I've removed the waiting for PRs label.
I'll also try to test #19541 to see if there is any breakage.

endif