Thursday, 26 April 2018

Move a tag on a git Branch to a Different Commit

You might forget to do something before you tag a commit. Then you realize OMG I gotta make that small change or delete something etc. You would have a new commit after the tag you've just made so you want to move the tag to this new commit. Here is how.

  1. Delete the tag on any remote before you push
    git push origin :refs/tags/<tagname>
    
  2. Replace the tag to reference the most recent commit
    git tag -fa <tagname>
    
  3. Push the tag to the remote origin
    git push --tags

ref:
https://stackoverflow.com/questions/8044583/how-can-i-move-a-tag-on-a-git-branch-to-a-different-commit

Sunday, 8 April 2018


Some dependencies to install:

sudo apt-get install gperf
sudo apt-get install bison
sudo apt-get install texinfo
sudo apt-get install flex
sudo apt-get install help2man


Then follow the github steps:
https://github.com/pfalcon/esp-open-sdk

ref:
https://github.com/pfalcon/esp-open-sdk

Thursday, 5 April 2018

Using USBTinyISP

Try to just use avrdude so that things can be automated with Python scripts.

- Flash Bootloader

  1. Put a fresh AVR chip (such as an Atmega328) into the Arduino in the correct orientation
  2. Remove the jumper from the USBtinyISP
  3. Plug in the USBtiny to USB
  4. Plug the Arduino into DC or USB so it is powered
  5. Plug the 6 pin cable from the USBtinyISP into the Arduino so that pin 1 mark is lined up with the red wire on the cable
  6. Start up Arduino IDE
  7. Select the chip/Arduino you are using in the Tools->Board menu
  8. Do not select a COM/Serial port
  9. Select Tools->Burn Bootloader->w/USBtinyISP
  10. The USBtinyISP red LED should light up. It will take a minute or two to program the chip
  11. When it is done, the IDE will tell you it has completed and the red LED will be off.

########################

The above method needs to be updated with pure avrdude so the process could be automated. Or, maybe no bootloader is needed if we are using USBTinyISP.

More tests coming...



- Flash arduino sketch

(1) Put the jumper back on the USBTinyISP, unplug power supply (USB cable) connected to Arduino.

(2) Plug the 6 pin cable from the USBtinyISP into the Arduino so that pin 1 mark is lined up with the red wire on the cable


Arduino should now be powered from USBTinyISP.

(3) avrdude -c usbtiny -p atmega328p -U flash:w:blink.hex

Probably need sudo
OR, install the udev rule. Check:
https://learn.adafruit.com/usbtinyisp/avrdude


###################################################################

ref:
https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide/using-avrdude
https://learn.adafruit.com/usbtinyisp/user-manual
https://learn.adafruit.com/usbtinyisp/avrdude
https://www.arduino.cc/en/Hacking/Programmer