Skip to content

Instantly share code, notes, and snippets.

@TimMcMahon
Last active February 1, 2023 03:11
Show Gist options
  • Save TimMcMahon/22d7a3895988b627187bde3cf344d126 to your computer and use it in GitHub Desktop.
Save TimMcMahon/22d7a3895988b627187bde3cf344d126 to your computer and use it in GitHub Desktop.
anduril_ubuntu_instructions

Ubuntu 18.04

These are personal notes for flashing an Emisar D4V2 Ti with a KR4 nofet driver using E21A emitters.
anduril.noctigon-kr4-nofet.hex will be used.

Caution:

  1. You could brick your D4V2 if the pogo pin adapter from intl-outdoors isn't aligned properly. I bricked my D4V2 Sand.
  2. Don't install the wrong firmware (e.g. anduril.emisar-d4v2.hex on a D4V2 Ti with a KR4 nofet driver) or you may destroy the emitters.
  1. Install avrdude and other required stuff
sudo apt-get install flex byacc bison gcc libusb-dev libc6-dev
sudo apt-get install gcc-avr avr-libc binutils-avr
sudo apt-get install avrdude avrdude-doc
  1. Get the latest firmware
    Go to https://code.launchpad.net/~toykeeper/flashlight-firmware/fsm
    Under Recent Revisions, click the latest version
    Click download tarball

  2. Extract the firmware to ~/fsm

cd Downloads
tar xzvf \~toykeeper_flashlight-firmware_fsm-r490.tgz 
cd \~toykeeper/flashlight-firmware/
mv fsm ~/.
  1. Make hex files
cd ~/fsm/ToyKeeper/spaghetti-monster/anduril
make
  1. Test connection
    Connect usbasp device with pogo pins to pads on the head of the flashlight.
    And then run:
sudo avrdude -c usbasp -p t1634 -n
  1. Flash the firmware
    Connect usbasp device with pogo pins to pads on the head of the flashlight.
    And then run while holding pins for 15-30 seconds:
sudo avrdude -c usbasp -p t1634 -u -Uflash:w:anduril.noctigon-kr4-nofet.hex 
@TimMcMahon
Copy link
Author

~/projects/gabe-anduril2/ToyKeeper/spaghetti-monster/anduril $ sudo avrdude -p attiny1616 -c serialupdi -P /dev/ttyUSB0 -Uflash:w:anduril.wurkkos-ts10.hex

avrdude: UPDI link initialization OK
avrdude: Device is in SLEEP mode
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: Entering NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9421 (probably t1616)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: input file anduril.wurkkos-ts10.hex auto detected as Intel Hex
avrdude: reading input file anduril.wurkkos-ts10.hex for flash
avrdude: writing 9562 bytes flash ...

Writing | ################################################## | 100% 2.56s

avrdude: 9562 bytes of flash written
avrdude: verifying flash memory against anduril.wurkkos-ts10.hex

Reading | ################################################## | 100% 1.35s

avrdude: 9562 bytes of flash verified
avrdude: Leaving NVM programming mode

avrdude done.  Thank you.

~/projects/gabe-anduril2/ToyKeeper/spaghetti-monster/anduril $ sudo avrdude -p attiny1616 -c serialupdi -P /dev/ttyUSB0  -Uflash:w:anduril.sofirn-sp10-pro.hex

avrdude: UPDI link initialization OK
avrdude: Device is in SLEEP mode
avrdude: NVM type 0: 16-bit, page oriented write
avrdude: Entering NVM programming mode
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9421 (probably t1616)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: input file anduril.sofirn-sp10-pro.hex auto detected as Intel Hex
avrdude: reading input file anduril.sofirn-sp10-pro.hex for flash
avrdude: writing 9278 bytes flash ...

Writing | ################################################## | 100% 2.47s

avrdude: 9278 bytes of flash written
avrdude: verifying flash memory against anduril.sofirn-sp10-pro.hex

Reading | ################################################## | 100% 1.31s

avrdude: 9278 bytes of flash verified
avrdude: Leaving NVM programming mode

avrdude done.  Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment