Go Down

Topic: Bootloader Differences? (Read 2654 times) previous topic - next topic

lemming

Nov 03, 2017, 04:50 am Last Edit: Nov 03, 2017, 04:58 am by lemming
I'm looking at burning a standard arduino bootloader to a couple of Adafruit zero clones and would like to know the difference between the various bootloaders.

I note in  the latest IDE there are two versions of bootloader that I am interested in with four files total:

samd21_sam_ba.bin   6,504 bytes
samd21_sam_ba.hex   18,333 bytes
samd21_sam_ba_genuino.bin   6,504 bytes
samd21_sam_ba_genuino.hex   18,333 bytes

Despite the respective bin and hex files being the same size, the linux 'diff' command shows that they are different.
Can anyone tell me what the practical differences are between the two bootloaders? (not at the bit level but functionally)

To further complicate matters cmaglie said that the latest bootloaders could be downloaded from:
 https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders/zero

The files and sizes in that git repository are listed below:

samd21_sam_ba.bin   41,219 bytes
samd21_sam_ba.hex   135,341 bytes
samd21_sam_ba_genuino.bin   41,435 bytes
samd21_sam_ba_genuino.hex   135,558 bytes

Note the large increase in file size. Have these bootloaders heaps more features than the IDE versions and if so what are they?

 

MartinL

#1
Nov 03, 2017, 09:35 am Last Edit: Nov 03, 2017, 09:37 am by MartinL
Hi lemming,

If you follow the link you provided and click on the "samd21_sam_ba.bin" or the "samd21_sam_ba_genuino.bin" files, you'll find that the executable file sizes are both 6.35KB: https://github.com/arduino/ArduinoCore-samd/blob/master/bootloaders/zero/samd21_sam_ba.bin.

This is consistent with the fact that the Zero reserves 8K of flash for the bootloader itself.

lemming

#2
Nov 03, 2017, 10:24 am Last Edit: Nov 03, 2017, 10:25 am by lemming
Thanks Martin, but my question was  what is the difference in operation between samd21_sam_ba.bin and samd21_sam_ba_genuino.bin (and the same for the .hex variants).

Also your answer further begs the question about the Github bootloader versions that are much bigger than the 8K you mention.
 

MartinL

Hi lemming,

Quote
Thanks Martin, but my question was  what is the difference in operation between samd21_sam_ba.bin and samd21_sam_ba_genuino.bin (and the same for the .hex variants).
Looking at Github I can only see that the both bootloaders' binaries are 6.35KB and both hex files are 17.9KB.

I think the only difference between the respective Arduino and Genuino bootloaders, is that they use different USB PID numbers.

cmaglie

#4
Nov 03, 2017, 10:39 am Last Edit: Nov 03, 2017, 10:42 am by cmaglie
EDIT: @lemming

the difference is the USB VID/PID and the LED pins mapping, see the boards_definition_*.h files for details.
for example: https://github.com/arduino/ArduinoCore-samd/blob/master/bootloaders/zero/board_definitions_arduino_zero.h

About the difference in size, I don't see any difference in size in the github hosted files:

https://github.com/arduino/ArduinoCore-samd/blob/master/bootloaders/zero/samd21_sam_ba.bin

you can see by yourself that the .bin is 6.5KB as expected.
C.

lemming

Thanks Cristian,

My mistake with the sizes. I right clicked on the github links and clicked "Save link as.." (linux OS). It saved the files but much bigger than they should be. Don't know what is in them. I should have imported the whole Git repository instead. Have done so now and the file sizes are correct.

Cheers

Go Up