Go Down

Topic: MiniCore Bootloader Hex File Update and Location (Read 745 times) previous topic - next topic

markwright041

After using MiniCore to make changes to bootloaders and upload them on boards, I am still confused a bit.

Once I choose my target chip with desired settings and then hit "Burn Bootloader", by the magic of Arudino IDE a bootloader is uploaded on the MCU. When I went to the MiniCore bootloaders folder:
C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\1.0.3\bootloaders\

I noticed that Date modified of all bootloader hex files are unchanged!

So, if no changes are applied to any of the bootloader files, then how does changing settings in Arduino IDE take effect?

I am mainly looking for my custom bootloader hex file location, so I don't have to use Arduino IDE every time to upload the bootloader hex file, and rather just use my Atmel ICE programmer to upload the bootloader hex file on my future boards.

Does anyone know where does MiniCore store that bootloader hex file just before uploading it to a board?

Thanks

hansibull

Arduino IDE does not apply any changes to the bootloader hex files. When you choose your option in the tools menu (MCU, clock frequency) these parameters decide which hex file is uploaded and which fuses is sat. If you want to understand more of what's going on, have a look inside the boards.txt file; that's where all the magic happens.

If you want to burn the bootloader without Arduino IDE you can use your ICE together with avrdude.
MightyCore -  ATmega1284, mega644, mega324, mega164, mega32, mega16, mega8535
Github.com/MCUdude/MightyCore

MiniCore - ATmega8, mega48, mega88, mega168, mega328
Github.com/MCUdude/MiniCore

westfw

Quote
if no changes are applied to any of the bootloader files, then how does changing settings in Arduino IDE take effect?
Usually "burn bootloader" will select from one of several pre-built .hex files based on the "board" settings, perhaps with different "upload" settings, and/or "fuse" settings.  (You could use the same bootloader binary for "16MHz external clock" and "8 MHz internal clock" if you change the fuses and upload speed.)


Quote
Does anyone know where does MiniCore store that bootloader hex file just before uploading it to a board?
You said "C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\1.0.3\bootloaders\" - that should be it.  You can turn on "verbose" for uploading in the preferences and check the output to be sure.


markwright041

Usually "burn bootloader" will select from one of several pre-built .hex files based on the "board" settings, perhaps with different "upload" settings, and/or "fuse" settings.  (You could use the same bootloader binary for "16MHz external clock" and "8 MHz internal clock" if you change the fuses and upload speed.)

You said "C:\Users\User\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\1.0.3\bootloaders\" - that should be it.  You can turn on "verbose" for uploading in the preferences and check the output to be sure.


Oh, I see. I thought fuse and upload settings were part of the hex file being uploaded. Thanks for clarifying that.




Arduino IDE does not apply any changes to the bootloader hex files. When you choose your option in the tools menu (MCU, clock frequency) these parameters decide which hex file is uploaded and which fuses is sat. If you want to understand more of what's going on, have a look inside the boards.txt file; that's where all the magic happens.

If you want to burn the bootloader without Arduino IDE you can use your ICE together with avrdude.
Thanks for your help. now the whole uploading process makes more sense.



Go Up