Can "bossac" brick my ItsyBitsy m4 bootloader?

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

Fumbling around today, trying to get away with not getting out the J-link, and I tried to install a binary file onto my ItsyBitsy M4...

Tried this command.

Code: Select all

 bossac -e -w -v -b ..\AtmelStart.bin
The shell returned the erase was OK, after 5 seconds, and then froze. My COM3 instance was lost.

I guess I naively thought that the SAMD would protect the bootloader segment, does that sound right?

Double tap is not working. So I'm thinking it's time to reinstall the bootloader, can someone point me to how to do that?

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »


User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by adafruit_support_carter »

Possible. If you're using a version newer than 1.9.0. Not specifying the offset can erase the bootloader. Some info here:
https://learn.adafruit.com/welcome-to-c ... sa-2978786

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

Oh-oh ... my bad. I took a look at an assoicated makefile for the project, and saw bossac being invoked with an offset.

Code: Select all

PS C:\Users\randa> bossac --version
Basic Open Source SAM-BA Application (BOSSA) Version 1.9.1-17-g89f3556
Flash programmer for Atmel SAM devices.
Copyright (c) 2011-2018 ShumaTech (http://www.shumatech.com)

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

Let me try an get setup to fix this ...
Last edited by rando on Tue Oct 04, 2022 6:45 pm, edited 1 time in total.

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

rando wrote: Tue Oct 04, 2022 6:36 pm I had the necessaries to follow this Microchip AVR Studio based solution...

https://learn.adafruit.com/how-to-progr ... mel-studio

But I'm getting a lot of errors on the SAMD51 Chip ID'ing incorrectly. Everything is updated, latest version.

IMG_0203.jpg
IMG_0203.jpg (76.33 KiB) Viewed 279 times
It's bouncing around on exactly what should be the correct chip #?

Screenshot 2022-10-04 180447.jpg
Screenshot 2022-10-04 180447.jpg (224.06 KiB) Viewed 279 times
or

Screenshot 2022-10-04 181730.jpg
Screenshot 2022-10-04 181730.jpg (307.13 KiB) Viewed 279 times

J-Link commander is rational however ...

Code: Select all

Cortex-M0 identified.
J-Link>connect
Device "ATSAMD51G19A" selected.


Connecting to target via SWD
InitTarget() start
InitTarget()
InitTarget() end
InitTarget() end
Found SW-DP with ID 0x2BA01477
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0x41003000
CPUID register: 0x41003003. Implementer code: 0x41 (ARM)
Unknown core, assuming Cortex-M0
Found Cortex-M0 r0p3, Little endian.
Identified core does not match configuration. (Found: Cortex-M0, Configured: Cortex-M4)
FPUnit: 0 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ 41003000
Cortex-M0 identified.
J-Link>

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

Can anyone help me use the J-link cli interface to handle the fuses correctly and reinstall the boot-loader?

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

rando wrote: Tue Oct 04, 2022 6:47 pm Can anyone help me use the J-link cli interface to handle the fuses correctly and reinstall the boot-loader?
Thanks!


User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

Success! I carefully re-seated all the connections on my sketchy bread-board setup.

Here's the important section ... be sure to scroll way down to specific instructions for the "itsy bitsy M4."

https://learn.adafruit.com/how-to-progr ... mel-studio

https://cdn-learn.adafruit.com/assets/a ... 1548441869

The correct device signature is 0x60060005.

The rest of the instructions are correct, just follow methodically one by one.

The uf2 binary I loaded onto the board I built myself from source in a WSL instance.

Screenshot 2022-10-04 222238.jpg
Screenshot 2022-10-04 222238.jpg (332.99 KiB) Viewed 266 times

User avatar
rando
 
Posts: 110
Joined: Thu Jan 20, 2011 2:03 pm

Re: Can "bossac" brick my ItsyBitsy m4 bootloader?

Post by rando »

Final comment: I didn't do anything to re-protect the boot area, as part of the procedure, I think that's handles by the uf2 friendly binary.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”