BUTTLOAD Programmer - V3.0 RELEASE

Go To Last Post
333 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI Dean,

Guess I'd best put in my order for an STK600, then.

Thank you for looking into the feasibility of the PDI XButtLoader!

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Guess I'd best put in my order for an STK600, then.

Can't these be programmed through jtag also?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm trying to get started using buttload with avr studio, and not having any luck. It's working correctly if I use avrdude - I can read the info on the target device (another butterly) just fine (I have not tried writing yet). But when I try to connect AVR studio using Tools->Program AVR->Connect dialog, I always get "Connect failed" (whichever platform I select).

Is Buttload compatible with Avr Studio 4.17? Am I missing something? I know that the cables and hardware are ok since it all works with avrdude....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome on AVRfreaks.net, rkc.

Read Dean's excellent manual on ButtLoad: it's all in there. ButtLoad works flawlessly with AVRStudio.

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have read the manual, several times, and I think I'm following all the steps. It's working fine with avrdude but avr studio just won't recognise it. I must be missing someting obvious but I don't know what it could be.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will get back to you tomorrow and see if I can help you out. But now it's bedtime here.

Tada

Nard

Edit: some homework for you
1. According to Dean's documentation, what programmer should be selected in AVRstudio ?
2. What version of AVRstudio are you using ?
3. To what Comport-number did you connect ButtLoad ?
4. And what baudrate do you select for ButtLoad ?

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
I will get back to you tomorrow and see if I can help you out. But now it's bedtime here.

Tada

Nard

Edit: some homework for you
1. According to Dean's documentation, what programmer should be selected in AVRstudio ?
2. What version of AVRstudio are you using ?
3. To what Comport-number did you connect ButtLoad ?
4. And what baudrate do you select for ButtLoad ?

Manual says avrisp, though I also tried stk500 (since for avrdud stk500v2 seems to be the preferred choice).

I'm using AVRStudio 4.17

It's connected on com1 (as verified using the -P setting on avrdude) and at 115200 (again I checked this using avrdude -b). The baud rate selection box in the connect dialog is disabled (though it does read 115200....) - I don't know why.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Manual says avrisp, though I also tried stk500 (since for avrdud stk500v2 seems to be the preferred choice).

You use "AVR prog..." - the top entry on the Tools menu. Do not use the "Connection" dialog or try to pick any of the programmers it supports - that won't work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

You use "AVR prog..." - the top entry on the Tools menu. Do not use the "Connection" dialog or try to pick any of the programmers it supports - that won't work.

No, it's supposed to implement the STK500 V2 protocol, and thus should work when you choose Connect... > AVRISP.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dean,

Did that change then? I'm sure I used to use it with AVR Prog... ?

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Dean,

Did that change then? I'm sure I used to use it with AVR Prog... ?

Cliff

You need to use AVR Prog to load ButtLoad into your butterfly via the preloaded Butterfly bootloader, but once that's in place, ButtLoad uses the STK500v2 protocol (and always has).

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Right - I used AVR prog to get buttload onto the butterfly - that part worked fine. It's just getting AVR studio to talk to buttload that I can't get to work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To rkc:
When Buttoad displays

AVRISP MODE

, scrolling, it's waiting for your action. Press the joystick, and then ButtLoad displays

*ATAVRISP MODE*

, scrolling, so with the Stars ;)
At this point you can press the connect dialog in AVRStudio, as shown in attached picture. Mine connects to Com5 as you can see.

Nard

Attachment(s): 

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh, and it's very handy that you can setup ButtLoad to startup in *ATAVRISP MODE*. See the manual.

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had the scrolling *avrisp mode* with the stars, but it still won't connect. Are you using version 4.17 or avr studio or something earlier?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

4.16 build 638

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Needed to register AGAIN :(
I will install 4.17 and let you know what the result is

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Running 4.17 build 666: works like a charm.

So now it's your turn to tell us exactly what you do/select. Don't assume things, but check them. Be precise in what you do/write.

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Running 4.17 build 666: works like a charm.

So now it's your turn to tell us exactly what you do/select. Don't assume things, but check them. Be precise in what you do/write.

Nard

Ok...

I connect serial cable from com1 to buttload butterfly, and ISP cable from buttload butterfly to target butterfly. I use the menu on the buttload butterfly to enter *avrisp mode*" - and "*AVRISP MODE*" with asterisks is scrolling across the screen.

Using avrdude I confirm that all seems to be working:

C:\rkc>avrdude -c stk500v2  -p m169 -P com1 -U lock:r:con:h

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.06s

avrdude: Device signature = 0x1e9405
avrdude: reading lock memory:

Reading | ################################################## | 100% 0.02s

avrdude: writing output file "con"
0x2f

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Now swithing to AVR studio (4.17 build 666), without changing anything on the butterfly, I select Tools->Program AVR->Connect. A dialog appears saying "Select AVR Programmer"

I select AVRISP in the left hand list, COM1 (or auto, both fail) on the RHS list. The Baud rate dropdown shows 115200 but it's disabled so I can't select it. I click connect, and after a short pause, it goes back to the Select AVR Programmer dialog, but this time the title reads "Connect failed - Select AVR programmer". At this point I am stuck...

Thanks

Richard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Okay. Thanks for the detailed description.

I followed your procedure.
By default, AVRStudio selects AVRISP mkII. That's the wrong one ! See snapshot.
Select AVRISP, and choose the correct Com-port. Baudrate is grey'ed out. See snapshot.
That results here in snapshot 3. Take notice of what AVRStudio reports in the title-bar.

After closing the programmer window, and doing the same procedure again, AVRStudio selects by default AVRISP mkII. Which is the wrong one ! Apparently it doesn't remember that AVRISP is the active programmer.

Nard

Attachment(s): 

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pling !! :idea: :idea: :idea:

Richard, check your Com1-settings ! If HW handshake is enabled .. :roll: ... got it ?

Nard

PS IIRC no handshake is fine. My Buttload runs on USB .... therefor I am not sure about handshake for genuine RS232

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The plot thickens...

I installed avr studio on a second machine, and it connects fine with buttload there. But I can't see any difference between the com1 settings on the two machines, and as I say avrdude connects ok on either machine so it does not appear that the com port is damaged.

I made up a new serial cable with pin 6 connected to pin 4 and 7 to 8, in addition to the usual 3 wires, but it didn't make any difference.

Thanks for your persistence on this. It's not a catastrophe if I have to use avrdude or my other machine, but it would be nice to get to the bottom of it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Aha, ... PC dependant. Nasty kind of error as one doesn't expect something like that.
Hmmm. Is the primary machine (the troublemaker) a notebook perhaps ?
You need to realise that the RS232-converter on the Butterfly is made up with a few transistors, resistors and diodes. And notebooks use lower voltages on their RS232 lines than desktop PC's. Still within RS232-spec, but too low for Butterfly's converter.

Consider the use of a FT232R to connect your ButtLoad with the PC. Schemeatics and such on Dean's site and mine: http://www.aplomb.nl/TechStuff/BLBF/BLBF.html

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The machine that fails is indeed a notebook, and it seems to be using 5v on the serial output where the desktop uses 10v, so you are almost certainly right. However, it's strange that both avrdude and avrprog are able to work ok.

It seems to be timing related (which could in turn be voltage-related, of course) since according to portmon the reads are getting timeout errors.

I could go down the USB route to use buttload on the notebook, but it's probably going to be easier just to either use the desktop, or to use avrdude (depending on whether I need to see a human-readable interpretation of the fuse flags or not...)

Thanks again for all your help on this

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're welcome.

I am not familiar enough with AVRdude, but could it be a baudrate-issue ?

I did the transit from RS232-ButtLoad to USB-ButtLoad, and I am so glad I did: no more power-issues: ButtLoad is powered with 3.3V made by the FT232R. And runs on every computer :)

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I did the transit from RS232-ButtLoad to USB-ButtLoad, and I am so glad I did: no more power-issues: ButtLoad is powered with 3.3V made by the FT232R. And runs on every computer Smile

Nard, do you still use your ButtLoad programmer regularly? I've always wondered how may are actually "in the field", and not just tried out for a day or two and turfed.

Also, with the latest LUFA release, you can turn any USB AVR into an AVRISP-MKII, so there's an easier way to go USB with a homebrew programmer. Perhaps I'll have a got at some point at porting over (and cleaning up) ButtLoad, so I can retain the PC-less programming mode.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW, just to note that from my laptop I had a situation where avrdude could connect to an attached STK500 that Studio simply failed to find/connect too. So I guess Studio is more "finicky" about connecting to UART over USB-RS232 for some reason?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Dean,

I use(d) it when working with AVRStudio. And since most of what I do is in Bascom, it hasn't been used that much. But when used, I loved it. The bleeps, the led and remembering the extensive debug-period :lol:

Right now I am spoiled: A Dragon (in lair), and my latest: the STK600.
(And don't tell anyone .... I am seeing a bit of sea ... uhm ... C)

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cliff wrote:

Quote:
So I guess Studio is more "finicky" about connecting to UART over USB-RS232 for some reason?
Those USB-RS232-converters have low output-voltages as notebooks' RS232. The effect looks consistent, now we need Jörg for the explanation.

Nard

A GIF is worth a thousend words   She is called Rosa, lives at Mint17.3 https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe the writers of AVR Studio should look at how avrdude's serial port IO is done...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I get the following warning when compiling ButtLoad

Main.c:267: warning: function declared 'noreturn' has a 'return' statement

I gather that thisis due to return being used to exit from infinite loops [for(;;) loop].
The compiler complains that this function has no return.

Whilst this is obviously no drama, I like to have no warnings. Have I done something wrong or is this normal?

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm a zero warnings guy also. Interestingly, I don't get that warning when compiling the SVN code (which should be near-identical, since I haven't played with the code in several years now) even though the main function still has the "noreturn" attribute.

In any case, you should be able to just remove the "return 0;" statement from the end of the main() function to make the compiler happy.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

Pages