Skip to content

west: runners: bossac: Honor --erase flag #81894

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

Conversation

petejohanson
Copy link
Contributor

Instead of unconditionally erasing the whole target, add support for using the common --erase flag.

This tweak is needed to avoid the bossac runner from erasing the whole chip every time it's run, helping preserve things like settings stored to flash when using them on samd21, for example.

Copy link
Collaborator

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

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

I agree with the change, but the default behavior changes now. This should be added to the migration guide.

@petejohanson
Copy link
Contributor Author

I agree with the change, but the default behavior changes now. This should be added to the migration guide.

Will do. Also noticed the test failure, will work on fixing that up.

@petejohanson petejohanson force-pushed the runners/add-bossac-erase-flag branch 2 times, most recently from 64a62d3 to 393d98a Compare November 25, 2024 21:12
@petejohanson
Copy link
Contributor Author

I agree with the change, but the default behavior changes now. This should be added to the migration guide.

Added a note to the migration guide, fixed the existing tests, and added a new one for the --erase option.

@petejohanson petejohanson requested a review from pdgendt November 25, 2024 21:13
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Nov 25, 2024
@petejohanson petejohanson force-pushed the runners/add-bossac-erase-flag branch from 393d98a to 6edddd9 Compare November 25, 2024 21:32
pdgendt
pdgendt previously approved these changes Nov 25, 2024
@fabiobaltieri
Copy link
Member

fabiobaltieri commented Nov 25, 2024

@nandojve should the bossac runner be under SAM in the maintaners file?

fabiobaltieri
fabiobaltieri previously approved these changes Nov 25, 2024
@nandojve
Copy link
Member

Hi @petejohanson ,

All the changes on BOSSAC will be carefully checked and this takes times due to complexity around.

@fabiobaltieri ,

should the bossac runner be under SAM in the maintaners file?

makes sense.

@petejohanson
Copy link
Contributor Author

Hi @petejohanson ,

All the changes on BOSSAC will be carefully checked and this takes times due to complexity around.

Understood. I appreciate you reviewing and testing when you have time.

Copy link
Member

@nandojve nandojve left a comment

Choose a reason for hiding this comment

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

Hi @petejohanson ,

In the meantime, you can check and update documentation here.

SAM Boot Assistant (SAM-BA)

A few questions about the use of this.
My main question is what you need to do exaclty?

@petejohanson petejohanson dismissed stale reviews from fabiobaltieri and pdgendt via 18e186d December 7, 2024 07:04
@petejohanson petejohanson force-pushed the runners/add-bossac-erase-flag branch from 6edddd9 to 18e186d Compare December 7, 2024 07:04
Instead of unconditionally erasing the whole target, add
support for using the common --erase flag.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
@petejohanson petejohanson force-pushed the runners/add-bossac-erase-flag branch from 18e186d to 3947525 Compare December 7, 2024 07:07
@petejohanson petejohanson requested a review from nandojve December 8, 2024 01:12
@nandojve
Copy link
Member

Hi @petejohanson ,

Just do mention that the bootloader developed to SAM4L needs a "full erase", which is not an issue. This board will be a reference #83310.

@fabiobaltieri fabiobaltieri merged commit 27615a7 into zephyrproject-rtos:main Dec 22, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Documentation area: West West utility Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants