Author Topic: Upgrading micronucleus and installing a program all at once  (Read 2338 times)

twomiletower

  • Newbie
  • *
  • Posts: 1
Upgrading micronucleus and installing a program all at once
« on: November 12, 2019, 04:44:21 pm »
Hi! Bit of an unusual one here: a friend's project requires a micronucleus bootloader that doesn't have the 5-second programming delay at startup.

What we didn't realise is upgrading the bootloader also erases the program memory.

We realised this *after* sealing about a half-dozen Digisparks inside glued enclosures with only a USB cable poking out - no means to connect the reprogramming pin to ground to put the program back on it afterwards.

My question is this: is it possible to simulataneously upgrade the micronucleus bootloader while also writing a compiled program to the chip? It'd save us a lot of time and hassle if we can. My best guess is compiling our program code and somehow merging it with micronucleus-1.11-entry-jumper-pb0-upgrade (the firmware we're using, without the startup delay), and then using micronucleus --upgrade to write it all to the Attiny85 at once. Or something like that.

Quite how we do this I have no idea. Any help would be appreciated (not that we're not aware this is partly our own stupidity, but, hey, life lesson I guess).