1

I'd like to disable the trinket 10-second bootloader when powered up, so it will just begin running the program. I would still like to be able to press the reset button to re-program it.

I found an edited version of the bootloader here. Currently, I am using an Arduino Uno and the 'repair the bootloader' sketch to load the hex to the trinket. The default hex is hard coded in the images.cpp file and the same hex is included in the Adafruit bootloader GitHub as trinketgemma_v1.hex.

How can I compile the forked copy to get the final compiled hex that can be burnt into the trinket?

Update:

I get this error when I upload to the board, how did you flash yours?

Setting fuses  Set Low Fuse to: F1 -> A000  Set High Fuse to: D5 -> A800  Set Ext Fuse to: 6 -> A400
Verifying fuses...
    Low Fuse: 0xF1 is 0xF1
    High Fuse: 0xD5 is 0xD5
    Ext Fuse: 0x6 is 0x6


Setting fuses


Verifying flash...
verification error at address 0x14C0 Should be 0x33 not 0x5F
Failed to verify chip

The fuses are set correctly, but it cannot verify the flash. The supplied Adafruit hex looks like about 93 lines of:

":2000000093CA15C0EBCA13C012C011C010C00FC00EC00DC00CC00BC00AC009C008C0112422\n"

Where the updated, compiled hex is about 181 lines of:

":100000005FCA5FCA5FCA5FCA5FCA5FCA5FCA5FCAA8\n"

Does the length of each line matter? The output of a successful flash looks like:

Verifying fuses...
    Low Fuse: 0xF1 is 0xF1
    High Fuse: 0xD5 is 0xD5
    Ext Fuse: 0x6 is 0x6


Setting fuses

Verifying flash...
    Flash verified correctly!
Verifying fuses...

Fuses verified correctly!
*OK!*
  • Looks like you can just replace the hex in the images.cpp, with the hex in flash_me_xv.hex. Though you have to encapsulate every line between a " and \n". Also make sure to change the fuses in image.cpp (correct value can be found here) (PS nice to see someone using my code) – Gerben Jan 28 '17 at 12:37
  • @Gerben I tried just replacing the hex, however, it says there is an error verifying the flash. I updated the post with more info. – EatonChips Jan 29 '17 at 5:00
  • I used the makefile to upload the boot loader. – Gerben Jan 29 '17 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.