Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Avrdude problems...

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
32 postsPage 1 of 31, 2, 3
32 postsPage 1 of 31, 2, 3

Avrdude problems...

Post by jocke » Tue Jan 16, 2007 10:30 pm

Post by jocke
Tue Jan 16, 2007 10:30 pm

Hi everybody!

I've tried to download the example.c hex-file to the cm-5 with avrdude and the line:
avrdude -p atmega128 -P /dev/ttyS0 -c stk500 -U flash:w:example.hex

When I have the cm-5 in program-mode i get this line:
avrdude: stk500_getsync(): not in sync: resp=0x30

Then I just get a lot of timeouts...

If I set the cm-5 to a different mode I'm just getting a different resp value.
I've tried with the stk500v2 programmer a.s.o

What is the correct settings for:
* The baudrate
* Half-duplex/Full-duplex

What am I doing wrong?

Thanks, Jocke!
Hi everybody!

I've tried to download the example.c hex-file to the cm-5 with avrdude and the line:
avrdude -p atmega128 -P /dev/ttyS0 -c stk500 -U flash:w:example.hex

When I have the cm-5 in program-mode i get this line:
avrdude: stk500_getsync(): not in sync: resp=0x30

Then I just get a lot of timeouts...

If I set the cm-5 to a different mode I'm just getting a different resp value.
I've tried with the stk500v2 programmer a.s.o

What is the correct settings for:
* The baudrate
* Half-duplex/Full-duplex

What am I doing wrong?

Thanks, Jocke!
jocke
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Tue Jan 16, 2007 1:00 am

Post by billyzelsnack » Tue Jan 16, 2007 10:34 pm

Post by billyzelsnack
Tue Jan 16, 2007 10:34 pm

I've been using the robot terminal to transfer the hex file.

I hope you figure this out though because it would be a lot nicer way of doing it.
I've been using the robot terminal to transfer the hex file.

I hope you figure this out though because it would be a lot nicer way of doing it.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by jocke » Tue Jan 16, 2007 10:53 pm

Post by jocke
Tue Jan 16, 2007 10:53 pm

That would be an option, but I'm running linux...
That would be an option, but I'm running linux...
jocke
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Tue Jan 16, 2007 1:00 am

Post by billyzelsnack » Tue Jan 16, 2007 11:27 pm

Post by billyzelsnack
Tue Jan 16, 2007 11:27 pm

The process when using robot terminal is..

Hold down #
Press and release the reset button on the CM-5.
Up pops a prompt that you can do various things with.
Type 'load' and hit return and it gives you a message.
Then transmit the file.
Then hit reset on the CM5 before you send anymore data.

Maybe avrdude is expecting a different bootloader?
The process when using robot terminal is..

Hold down #
Press and release the reset button on the CM-5.
Up pops a prompt that you can do various things with.
Type 'load' and hit return and it gives you a message.
Then transmit the file.
Then hit reset on the CM5 before you send anymore data.

Maybe avrdude is expecting a different bootloader?
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by rustyarmor » Wed Jan 17, 2007 12:00 am

Post by rustyarmor
Wed Jan 17, 2007 12:00 am

I think the CM5 uses the xmodem or zmodem protocol for uploading to the bootloader. this means you don't really need robot terminal.
havent tried this but this is the theory..

just use minicom to communicate with the serial port connected to CM5 at 57kbps

to upload the flash hex file to the boot loader you first press and hold "#" and the red button on CM5 . it will enter the boot loader. enter the word "load" just like it says in the book and then in minicom "Alt-S" and then use the upload command using zmodem or xmodem

http://www.linux.com/howtos/Remote-Seri ... ole-HOWTO/
I think the CM5 uses the xmodem or zmodem protocol for uploading to the bootloader. this means you don't really need robot terminal.
havent tried this but this is the theory..

just use minicom to communicate with the serial port connected to CM5 at 57kbps

to upload the flash hex file to the boot loader you first press and hold "#" and the red button on CM5 . it will enter the boot loader. enter the word "load" just like it says in the book and then in minicom "Alt-S" and then use the upload command using zmodem or xmodem

http://www.linux.com/howtos/Remote-Seri ... ole-HOWTO/
rustyarmor
Robot Builder
Robot Builder
User avatar
Posts: 19
Joined: Fri Oct 20, 2006 1:00 am

Post by billyzelsnack » Thu Jan 18, 2007 3:52 am

Post by billyzelsnack
Thu Jan 18, 2007 3:52 am

Did anyone get anywhere with this?
Did anyone get anywhere with this?
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by jocke » Thu Jan 18, 2007 4:52 pm

Post by jocke
Thu Jan 18, 2007 4:52 pm

I will try with the minicom tonight... I'll post the result!
I will try with the minicom tonight... I'll post the result!
jocke
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Tue Jan 16, 2007 1:00 am

Post by billyzelsnack » Thu Jan 18, 2007 6:32 pm

Post by billyzelsnack
Thu Jan 18, 2007 6:32 pm

Cool. Let me know all the settings if it works. I'll probably go ahead and write a little command line app to do it directly.
Cool. Let me know all the settings if it works. I'll probably go ahead and write a little command line app to do it directly.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by jocke » Thu Jan 18, 2007 8:00 pm

Post by jocke
Thu Jan 18, 2007 8:00 pm

Hmm... The minicom connected succesfully to the CM-5, I was able to get into the bootloader, tried to send the hex file with the protocol zmodem, didn't work, tried with the xmodem protocol, didn't work... Finally I tried to send the file with the ascii protocol... Sucessfully downloaded 4,7kb!

But now the CM-5 is stucked in the bootloader..! The CM-5 doesn't respond... When I start the CM-5 the power led shines, nothing more... When I send strings from my computer over the serialport the Rx and Tx leds usually blinks, but now they don't! It's dead...

How can I get it running again?
Hmm... The minicom connected succesfully to the CM-5, I was able to get into the bootloader, tried to send the hex file with the protocol zmodem, didn't work, tried with the xmodem protocol, didn't work... Finally I tried to send the file with the ascii protocol... Sucessfully downloaded 4,7kb!

But now the CM-5 is stucked in the bootloader..! The CM-5 doesn't respond... When I start the CM-5 the power led shines, nothing more... When I send strings from my computer over the serialport the Rx and Tx leds usually blinks, but now they don't! It's dead...

How can I get it running again?
jocke
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Tue Jan 16, 2007 1:00 am

Post by billyzelsnack » Thu Jan 18, 2007 8:11 pm

Post by billyzelsnack
Thu Jan 18, 2007 8:11 pm

Try it from scratch again and before you do anything make sure and hit the red reset button after the download.

Also maybe try uploading the original bioloid hex file. It's in one of the directories somewhere. The example hex file really doesn't do much and none of the lights do anything either.
Try it from scratch again and before you do anything make sure and hit the red reset button after the download.

Also maybe try uploading the original bioloid hex file. It's in one of the directories somewhere. The example hex file really doesn't do much and none of the lights do anything either.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by Bullit » Thu Jan 18, 2007 9:27 pm

Post by Bullit
Thu Jan 18, 2007 9:27 pm

Just send the hex file as text. Its not XModem or ZModem. Its not compressed at all its just a text file. If you want to use avrdude you need to replace the bootloader which requires adding wires to the cm-5 to access the spi port to erase the ATMega128 (bootloader fuse is write locked). Bear in mind the bioloid application uses the bootloader to save poses to the flash so changing the bootloader will break the boiloid application as well.
Just send the hex file as text. Its not XModem or ZModem. Its not compressed at all its just a text file. If you want to use avrdude you need to replace the bootloader which requires adding wires to the cm-5 to access the spi port to erase the ATMega128 (bootloader fuse is write locked). Bear in mind the bioloid application uses the bootloader to save poses to the flash so changing the bootloader will break the boiloid application as well.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by jocke » Thu Jan 18, 2007 9:56 pm

Post by jocke
Thu Jan 18, 2007 9:56 pm

The problem is that I can't connect to the CM-5 anymore...
The problem is that I can't connect to the CM-5 anymore...
jocke
Robot Builder
Robot Builder
User avatar
Posts: 10
Joined: Tue Jan 16, 2007 1:00 am

Post by billyzelsnack » Thu Jan 18, 2007 9:58 pm

Post by billyzelsnack
Thu Jan 18, 2007 9:58 pm

Ok. Excellent. That makes it easy enough to have the upload happen if my app detects that the hex file has changed.

Now I just need to figure out how to tell the CM5 to reset AND without disturbing the newly uploaded program.
Ok. Excellent. That makes it easy enough to have the upload happen if my app detects that the hex file has changed.

Now I just need to figure out how to tell the CM5 to reset AND without disturbing the newly uploaded program.
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Thu Jan 18, 2007 10:07 pm

Post by billyzelsnack
Thu Jan 18, 2007 10:07 pm

So you can't connect in a term program now? If you can, what happens when you hold down # and hit the CM5 reset? (maybe try a few times)
So you can't connect in a term program now? If you can, what happens when you hold down # and hit the CM5 reset? (maybe try a few times)
billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Post by billyzelsnack » Thu Jan 18, 2007 10:08 pm

Post by billyzelsnack
Thu Jan 18, 2007 10:08 pm

billyzelsnack
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 618
Joined: Sat Dec 30, 2006 1:00 am

Next
32 postsPage 1 of 31, 2, 3
32 postsPage 1 of 31, 2, 3