Home › Forums › TinyG › TinyG Support › MKII and Ubuntu – can't get it working
- This topic has 5 replies, 2 voices, and was last updated 11 years, 1 month ago by Riley.
-
AuthorPosts
-
August 25, 2013 at 10:57 pm #4422mattheweplerMember
Hi all,
I’m trying to update my TinyG Firmware and bought the AVR MKII programmer to flash the chip. I’ve done everything I can think of to get it working but have thus far failed.
I’ve installed avrdude on my Linux laptop running Ubuntu and believe I have all dependencies working. I have nothing but the MKII plugged into my machine. The TinyG board is receiving ~24VDC.
When I run a typical avrdude command, I get this error:
user@user-ThinkPad-T60:~/Desktop/tinyg/firmware/tinyg$ sudo avrdude -c avrispmkII -p x192a3 avrdude: stk500v2_command(): error in CMD_XPROG_SETMODE: Unknown avrdude: stk600_xprog_program_enable(): CMD_XPROG_SETMODE(XPRG_MODE_PDI) failed avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check. avrdude: stk500v2_command(): error in CMD_XPROG: Unknown avrdude: stk600_xprog_program_disable(): XPRG_CMD_LEAVE_PROGMODE failed avrdude done. Thank you.
Any suggestions of where to start? The end-goal is to flash the latest tinyg.hex file and the xboot.h file, which I don’t have on my board (a rare ‘green’ v7).
Matt Epler
Brooklyn, NYAugust 29, 2013 at 9:58 pm #4432RileyKeymasterI have not programmed via Ubuntu for a LONG time. I did write this up a while back and its still on our old wiki. If you want to take a shot at this I think that would be a good idea:
http://www.synthetos.com/wiki/index.php?title=Installing_TinyG
You can skip over the md5sum bit. Also change your chip to the x193a3 vs the 265 which is listed on that page. Let me know if that gets you going. I do not have access to Ubuntu at the moment. If not I will try to get a box up and going and see.
August 29, 2013 at 10:56 pm #4437RileyKeymasterOk I lied. I installed a Ubuntu vm tonight and got it programming with the AVRISPKMK II.
This is what I did. Exact steps.
wget https://github.com/synthetos/TinyG/raw/edge/firmware/tinyg/default/tinyg.hex
Then I installed all the packages you need..
sudo apt-get install avrdude avr-libc avrprog screen md5deep
Then I just tried to program it…
ril3y@ubuntu:~$ sudo avrdude -c avrispmkII -P usb -p x192a3 -U flash:w:tinyg.hex
avrdude: usb_open(): cannot read serial number “error sending control message: Connection timed out”
avrdude: usb_open(): cannot read product name “error sending control message: Connection timed out”avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9744
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: reading input file “tinyg.hex”
avrdude: input file tinyg.hex auto detected as Intel Hex
avrdude: writing flash (97478 bytes):Writing | ################################################## | 100% 5.62s
avrdude: 97478 bytes of flash written
avrdude: verifying flash memory against tinyg.hex:
avrdude: load data flash data from input file tinyg.hex:
avrdude: input file tinyg.hex auto detected as Intel Hex
avrdude: input file tinyg.hex contains 97478 bytes
avrdude: reading on-chip flash data:Reading | ################################################## | 100% 3.25s
avrdude: verifying …
avrdude: 97478 bytes of flash verifiedavrdude done. Thank you.
You will notice I did get a few “errors” trying to read serial number etc. But everything works. That is not required.
Hope that helps.
Riley
August 30, 2013 at 6:54 am #4441RileyKeymasterBTW those instructions install and updated TinyG. Not the bootloader. I can give you the flags for avrdude to install the bootloader if you want.
Riley
September 21, 2013 at 6:14 pm #4564mattheweplerMemberRiley,
Thanks so much for this. I finally wrapped up a job and have time to sit down with this again.
I followed your instructions and got this output:
user@user-ThinkPad-T60:~$ sudo avrdude -c avrispmkII -P usb -p x192a3 -U flash:w:tinyg.hex
avrdude: stk500v2_command(): error in CMD_XPROG_SETMODE: Unknown
avrdude: stk600_xprog_program_enable(): CMD_XPROG_SETMODE(XPRG_MODE_PDI) failed
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.avrdude: stk500v2_command(): error in CMD_XPROG: Unknown
avrdude: stk600_xprog_program_disable(): XPRG_CMD_LEAVE_PROGMODE failedavrdude done. Thank you.
September 24, 2013 at 7:09 am #4594RileyKeymasterI suspect that you might have an too old version of avrdude? Are you using the one that comes with the Arduino IDE? Or just “apt-get” style? If so try the Arduino one.
Riley
-
AuthorPosts
- You must be logged in to reply to this topic.