How can a hex file with bootloader be generated and saved for an ATtiny board?
The boards.txt file by Spence shows following relevant part:
attinyx5opti.name=ATtiny45/85 (Optiboot)
attinyx5opti.upload.tool=avrdude
attinyx5opti.upload.protocol=arduino
attinyx5opti.upload.speed=19200
attinyx5opti.bootloader.tool=avrdude
attinyx5opti.bootloader.unlock_bits=0xFF
attinyx5opti.bootloader.lock_bits=0xFF
attinyx5opti.bootloader.file=optiboot/optiboot_{build.mcu}_{build.f_cpu}.hex
attinyx5opti.build.core=tiny
attinyx5opti.build.board=AVR_ATTINYX5
attinyx5opti.build.export_merged_output=false
attinyx5opti.bootloader.extended_fuses=0xFE
The relevant part in his platform.txt file shows:
## Save hex
recipe.hooks.savehex.presavehex.1.pattern.windows="{runtime.platform.path}/delete_merged_output.bat" {build.export_merged_output} "{build.path}\{build.project_name}.with_bootloader.hex"
recipe.hooks.savehex.presavehex.2.pattern.windows=cmd /C copy "{build.path}\{build.project_name}.lst" "{sketch_path}"
recipe.hooks.savehex.presavehex.1.pattern.linux=chmod +x "{runtime.platform.path}/delete_merged_output.sh"
recipe.hooks.savehex.presavehex.2.pattern.linux="{runtime.platform.path}/delete_merged_output.sh" {build.export_merged_output} "{build.path}/{build.project_name}.with_bootloader.hex"
recipe.hooks.savehex.presavehex.3.pattern.linux=cp "{build.path}/{build.project_name}.lst" "{sketch_path}"
recipe.hooks.savehex.presavehex.1.pattern.macosx=chmod +x "{runtime.platform.path}/delete_merged_output.sh"
recipe.hooks.savehex.presavehex.2.pattern.macosx="{runtime.platform.path}/delete_merged_output.sh" {build.export_merged_output} "{build.path}/{build.project_name}.with_bootloader.hex"
recipe.hooks.savehex.presavehex.3.pattern.linux=cp "{build.path}/{build.project_name}.lst" "{sketch_path}"
recipe.output.tmp_file={build.project_name}.hex
recipe.output.save_file={build.project_name}.{build.variant}.hex
But when I try and export the compiled binary, following text shows in verbose output at the end of the compiled output:
C:\Users\Erik Arckens\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.2.3/delete_merged_output.bat false C:\Users\ERIKAR~1\AppData\Local\Temp\arduino_build_329590\ATtiny_Analog_Write.ino.with_bootloader.hex
cmd /C copy C:\Users\ERIKAR~1\AppData\Local\Temp\arduino_build_329590\ATtiny_Analog_Write.ino.lst C:\Users\Erik Arckens\Google Drive\documents\Arduino\ATtiny_Analog_Write
1 file(s) copied.