mist-devel / mist-board

Core sources and tools for the MIST board
439 stars 81 forks source link

Suggest BOSSA instead of SAM.BA or Sam_I_Am #159

Open dkerfoot opened 2 years ago

dkerfoot commented 2 years ago

Firmware update stalled. After 15 minutes I turned off and back on again - borked.

Not having any pre-Win 10 pcs anymore, I tried to get SAM.BA and Sam_I_Am working on a Ubunto on a stick and a RPI3. Very frustrating.

Found BOSSA by searching RasPi applications for SAM-BA. Installed the GUI and command line and ran and was flashed in a minute. Much, much easier

It also has binaries for Windows and Mac and worked perfectly under Windows 10.

BOSSA Basic Open Source SAM-BA Application from Shumatech

gyurco commented 2 years ago

Good to know an alternative solution exists. For Atmel's SAM-BA, the last usable is 2.1x, the 3.xx are horribly complicated for the simple task of unbricking.

harbaum commented 2 years ago

Excellent find! Feel free to send a PR with some instructions.

dkerfoot commented 2 years ago

Thrilled to be paying back in a small way Till!

I'll test it on my Mac (worked great with both Win 10 and on my Pi3) and write up some directions in the next couple of days.

It really was super easy. Both Win10 and the Pi automatically recognised the MiST and selected the proper chip.

It might be good if it were attempted with a non-pi Linux machine by someone...

retrofun commented 1 year ago

BOSSA works for me on my current debian/testing system.

I had to install the packages libwxgtk3.0-gtk3-dev and libreadline-dev to compile the code from https://github.com/shumatech/BOSSA

Then flashing MiST with the firmware.bin file via BOSSA GUI worked:

Command line tools work, too:

bossac:

mist@localhost:/tmp/BOSSA$ bin/bossac -i
Device       : AT91SAM7S256
Version      : v2.2 Jun 05 2007 10:59:13
Address      : 0x100000
Pages        : 1024
Page Size    : 256 bytes
Total Size   : 256KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
BOD          : false
BOR          : false
mist@localhost:/tmp/BOSSA$ bin/bossac -w /tmp/mist-devel.mist-firmware/firmware.bin
Write 216968 bytes to flash (848 pages)
[==============================] 100% (848/848 pages)
Done in 11.374 seconds

bossash:

mist@localhost:/tmp/BOSSA$ bin/bossash
Press Ctrl-D or enter "exit" to end session.
Enter "help" to display a command list.
bossa> connect /dev/ttyACM0
Connected to device on /dev/ttyACM0
bossa> info
Device       : AT91SAM7S256
Version      : v2.2 Jun 05 2007 10:59:13
Address      : 0x100000
Pages        : 1024
Page Size    : 256 bytes
Total Size   : 256KB
Planes       : 1
Lock Regions : 16
Locked       : none
Security     : false
BOD          : false
BOR          : false
bossa> write /tmp/mist-devel.mist-firmware/firmware.bin
Write 216968 bytes to flash (848 pages)
[==============================] 100% (848/848 pages)
Write successful
spicyjack commented 1 month ago

I just used bossa from Homebrew on my M2 Macbook Air to unbrick my MiST box, so it definitely works on Apple Silicon Macs.

@retrofun's bossac command line commands above (bossac -w firmware.bin) in a Terminal window was all that was needed.

$ brew info bossa
==> bossa: stable 1.9.1 (bottled), HEAD
Flash utility for Atmel SAM microcontrollers
https://github.com/shumatech/BOSSA
Installed
/opt/homebrew/Cellar/bossa/1.9.1 (7 files, 312.6KB) *
  Poured from bottle using the formulae.brew.sh API on 2024-05-29 at 19:03:56
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/b/bossa.rb
License: BSD-3-Clause
EmmanuelKasper commented 1 month ago

I have documented using Samba on Linux here: https://github.com/mist-devel/mist-board/wiki/Updating-the-IO-Controller-Via-Bossa-Under-Linux, will add a note that is works on Mac too via brew.

spicyjack commented 1 month ago

I just added separate but related macOS instructions on that page...

https://github.com/mist-devel/mist-board/wiki/Updating-the-IO-Controller-Via-Bossa-Under-Linux-&-MacOS#installing-on-macos