-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
runners: bossa: fix support for the Arduino Due #26866
Conversation
What command line are you now passing to bossac for arduino due? |
Using BOSSA 1.9.1+git:
This is with a symlink from poxysdk/.../bossac to the git build. The |
So it feels like there is some bug with bossa 1.9.x (tried both mainline - Version 1.9.1-14-g3532de8 Version 1.9.1). The both appear to flash, but than the board doesn't boot on Arduino Due. Works w/1.7.0 just fine. |
Yip. patformio has the same issue with the Due: platformio/platform-atmelsam/issues/78 |
@galak could you try patching in shumatech/BOSSA#111 and testing it against the Due? |
will Try. |
That seems to fix the issue. Worked up update to sdk w/latest bossa tree plus that patch: |
@nzmichaelh can you test this SDK version w/newer bossac + patch: builds.zephyrproject.org/zephyrproject-rtos/sdk-ng/247/zephyr-sdk-0.11.4-pr-247-setup.run |
Will test. Note that this needs to land before zephyrproject-rtos/sdk-ng/pull/247 is released. Without this PR, BOSSA 1.9.1+git will use offset zero and overwrite the bootloader. Also, fun fact: Arduino boards don't protect the bootloader. What's the SDK vs Zephyr compatibility policy? Can a user pick a recent SDK with an older release of Zephyr? If so we might need to rethink the BOSSA 1.9.1+git update. |
We have a version check w/regards to the SDK. I expect the SDK version that the newer bossa will be in is 0.12.0 and it will have other non-backward compatible changes in it. So we will require 0.12.0 as part of the zephyr 2.4 release is my expectation. |
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.
No objections to this PR, will leave it up to @galak / @nzmichaelh to sort out the details.
@galak I've tested the SDK build combined with #26866 and it works fine on the Arduino Nano 33 IOT:
|
Also, I have a follow up PR that changes the runner to use the built-in reset support instead of calling |
BOSSA takes the offset within flash memory, not the absolute address. This doesn't matter on most boards as the flash starts at zero but does matter on the Due as the flash starts at +512 KiB. Signed-off-by: Michael Hope <[email protected]>
BOSSA 1.9.1 and before an errror on `--help`, but the current git version returns 0. Handle both cases. Signed-off-by: Michael Hope <[email protected]>
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
I don't think this is stale -- @galak can you please take a look? |
The bossac runner uses the absolute load address as the flash offset, where it should be the actual flash offset. This is fine on most boards as the flash starts at address zero but fails on the Arduino Due the flash starts at address +512 KiB.
Change to use the offset. Tested on the adafruit_trinket_m0, adafruit_itsybitsy_m4_express, and arduino_due.
Related: zephyrproject-rtos/sdk-ng#234.
Also support sniffing
--help
on the git versions of bossac.