-
Notifications
You must be signed in to change notification settings - Fork 119
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
migrate all boards upload tool from bossac 1.8 to 1.9 and auto-generate boards.txt #319
Conversation
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.
bossac19 is very dangerous if you forget the --offset
argument. The default is 0x000, and so it will wipe the bootloader. and the fuses The default was incompatibly changed from 1.8 to 1.9.
thanks @dhalbert luckily we did specific Sum up: we are still good, since offset is specified for all boards. |
We could fork bossac and protect against this. I am mostly worried about people using the installed bossac manually and then bricking their boards. |
Arduino user won't probably using bossac manually, I have never run bossac manually before as well. However, in case of bricking, is it possible to erase and re-flash the bootloader ? Update: just realized that bossac is just a bootloader client 🤦, user would need an jlink to reflash bootloader |
isnt the bootloader fuse protected against writing to 0x0 by accident? |
If BOOTPROT is set, then the bootloader will be protected. But if the offset is zero (the default), it appears to use the ERASE ALL command, and sets the fuses to all ones: shumatech/BOSSA#99 (comment). |
huh and BOOTPROT doesnt listen to that? |
It doesn't overwrite the bootloader, but it does overwrite the fuses with all ones (apparently). I can try this myself. |
I have done more reading on this, bossac 1.9 only erase-all if Line 161 in 6bc12c9
IMHO, we don't really need to worry about user manual execution of the command. Actually bossac 1.9 will probably be downloaded in user arduino15 already since it is an dependency tool required by Arduino mbed core. Mine have all 1.7, 1.8 and 1.9 |
@dhalbert @ladyada in order to minimize the mistake in manual addition of a board e.g incorrect offset for samd21/samd51. I have added the makeboard.py script The generated boards.txt does fix some existing typo. The diff may look large but it is mostly macro arrangement in the |
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.
@ladyada I made some highlight for the changes in generated boards.txt , please check out if you have time and/or if it makes sense to you. Let me know if you want to make any changes to the script/generated boards.txt
I used bossac v1.9.1 to write a .bin at offset zero, with |
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.
i like we have makeboards.py - it will be very very helpful given the large qty of PCBs!
thank you @dhalbert for helpful information and hand-on testing. I am glad we got everything covered safely now. |
Thanks for this thread: is there a new boards |
@dansteingart we reverted the bossac back to 1.8 due to 1.9 compatible issue with macos #323 . And we won't upgrade it back until the issue is fixed by bossac. If you are using aarch64, you could try to install 1.7.8 instead. I am working on manual way to install bsp for aarch64 user (but in middle of other works just now). |
Thanks: apologies for the dumb question but how do I override the bossac chain? I’ve replaced the library in the package.json install, and I can compile correctly, but something is still looking for 1.8
|
copy your bossac binary to following path of arduino15, create middle folder if needed:
|
if adafruit/arduino-board-index#98 is approved then aarch64 will just work with 1.7.10 without any hassle. |
Also do a bit of testing with actual hardware feather m0, feather m4, proxlight trinkey all seem to work well.