Hi, I am working in a company and we are trying to make our own copy of Arduino MKR Zero board so that we can integrate extra electronics into the board while at the same time being able to upload sketches just like the original Arduino MKR Zero board. I have posted on Arduino forum before regarding higher-level questions (my posts can be found here and here). Thanks for the answers, these were very helpful.
I have a few more questions regarding the details about uploading a bootloader to Arduino MKR Zero. I have never done something like this in the past and so please correct me in my assumptions where I am wrong.
Which bootloader files to upload? I can find the bootloader files at the GitHub, but I am not sure if it is the correct files, if it is then do I have to upload both .bin and .hex files?
As far as I understand from this post on Arduino form, I need to use Atmel-ICE Kit and upload the bootloader using SWD. So, if I have an Atmel-ICE kit then I can use that kit along with Arduino IDE and upload the bootloader to my own Arduino MKR Zero board? or, do I need to have extra software (e.g. Atmel Studio) to be able to upload the bootloader?
Is there a way of uploading the bootloader to Arduino MKR Zero without using a programmer like Atmel-ICE?
Is there a guide available which I can follow to burn the bootloader for Arduino MKR Zero? I know the Arduino as ISP and Arduino Bootloaders but it is only for Arduino board with ATmega, 32U4 or ATtiny while Arduino MKR Zero uses SAM D21.
Any information regarding uploading the bootloader to an Arduino MKR Zero will be very helpful
Which bootloader files to upload? I can find the bootloader files at the GitHub, but I am not sure if it is the correct files, if it is then do I have to upload both .bin and .hex files?
Not having ever done it with a fresh chip (I have done it to my MKR Zero after accidentally "bricking" it though), I can't say for sure, but the board definition only specifies the .bin file:
Maybe someone else here can provide a more definitive answer.
chaitanya_:
As far as I understand from this post on Arduino form, I need to use Atmel-ICE Kit
There are several options. The Atmel ICE should work great. You can also use any CMSIS-DAP compliant programmer/debug probe. There are other options beyond the Atmel ICE.
You can also use a spare SAMD board as a programmer using this nice Arduino library:
chaitanya_:
So, if I have an Atmel-ICE kit then I can use that kit along with Arduino IDE and upload the bootloader to my own Arduino MKR Zero board?
Yes. Just do this:
Tools > Board > Arduino SAMD (32 bits ARM Cortex-M0+) Boards > Arduino MKR Zero
Tools > Programmer > Atmel-ICE
Tools > Burn Bootloader
chaitanya_:
do I need to have extra software (e.g. Atmel Studio) to be able to upload the bootloader?
You don't need it, but you can use it if you prefer. The Arduino IDE is using bossac, which is the command line tool for BOSSA: https://www.shumatech.com/web/products/bossa
there is also a GUI tool.
Certainly more lightweight than that beast Atmel/Microchip Studio!
chaitanya_:
Is there a way of uploading the bootloader to Arduino MKR Zero without using a programmer like Atmel-ICE?
Yeah, as I explained above.
chaitanya_:
Is there a guide available which I can follow to burn the bootloader for Arduino MKR Zero? I know the Arduino as ISP and Arduino Bootloaders but it is only for Arduino board with ATmega, 32U4 or ATtiny while Arduino MKR Zero uses SAM D21.
Hi Pert! Thank you so much for a fast and such detailed response.
I think I have all the information I needed, I will follow your guide to upload the bootloader.