Skip to main content
Topic: BP with STK500 firmware in Atmel Studio 6? (Read 13345 times) previous topic - next topic

BP with STK500 firmware in Atmel Studio 6?

Hello,

I was wondering why the Buspirate with the stk500 firmware doesn't work directly with Atmel Studio 6.

Does anyone know of any open source firmware that would work with Studio 6? I've seen the Pololu USB AVR Programmer but unfortunately it's not open source. I'd really like to use the direct programming support in Atmel Studio but I'd hate to buy another hardware if instead I can work with the hardware I already have.

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #1
Hi Xykon,

Are there any errors or anything? Maybe a version number needs to be increased to work with the latest Atmel studio?

The stk500v2 firmware we ported to the Bus Pirate came from this open source (GPL) project:
http://www.tuxgraphics.org/electronics/ ... 5101.shtml
Got a question? Please ask in the forum for the fastest answers.

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #2
I just figured it out... the BP firmware returns AVRISP_2 as identification while Studio 6 expects STK500_2 instead. I changed that and it's working fine as long as I keep the ISP Clock setting at 115,2 kHz or lower.

Code: [Select]
Index: main.c
===================================================================
--- main.c (revision 1941)
+++ main.c (working copy)
@@ -103,12 +103,12 @@
                msg_buf[1] = STATUS_CMD_OK; // 0x00
                msg_buf[2] = 8; //len
                //strcpy((char *)&(msg_buf[3]),"AVRISP_2"); // note: this copied also the null termination
-                msg_buf[3] = 'A';
-                msg_buf[4] = 'V';
-                msg_buf[5] = 'R';
-                msg_buf[6] = 'I';
-                msg_buf[7] = 'S';
-                msg_buf[8] = 'P';
+                msg_buf[3] = 'S';
+                msg_buf[4] = 'T';
+                msg_buf[5] = 'K';
+                msg_buf[6] = '5';
+                msg_buf[7] = '0';
+                msg_buf[8] = '0';
                msg_buf[9] = '_';
                msg_buf[10] = '2';           
  answerlen=11;

 

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #3
I ran some more tests today and it's working really great.

I just wonder if you should generally modify the identification or provide yet another alternate firmware in the BP package specifically patched for Atmel Studio. I would guess those who use avrdude for programming would use the main firmware anyways so just patching the stk500 version might be OK for most users. For those who still use avrdude with the stk500 firmware, I'm sure there is a setting to support either identification...

I still have an attiny2313 based avr programmer, now it might be interesting to see if I can get it to work as a serial port so I can use it with Studio 6 as well... right now it "only" supports libusb drivers and works with avrdude... this looks like a promising starting point: http://www.recursion.jp/avrcdc/index.html

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #4
Hi Xykon,
Thanks for the investigation and fix. I made a new revision r1948 with your fix. The latest version is available in SVN.  This patch works with avrdude using STK500V2 as programmer. This issue is tracked at http://dangerousprototypes.com/track/view.php?id=27

Could you please verify this with Atmel Studio 6 ?

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #5
I'm in the hospital until the 21st. I will test your patch as soon as possible though. Maybe someone else can give it a try as well?

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #6
I just checked the latest svn and can confirm it's working fine in Atmel Studio 6 (and probably 5 as well but I don't have it installed anymore).

It's just important to keep the ISP clock at 115,2 kHz or lower or you'll get errors!


Re: BP with STK500 firmware in Atmel Studio 6?

Reply #7
Thanks everyone, this will go out in a beta release package today.
Got a question? Please ask in the forum for the fastest answers.

Re: BP with STK500 firmware in Atmel Studio 6?

Reply #8
Just a quick note, as I arrived here way way after the posting, but in case someone else hits it;

I ran into the same problem today, july 2015. I spent quite a bit of time chasing it down, but I could see the source had the needed update. It took me a while to realize this was put in the beta in august 2012, and the beta was never moved to the actual release :|
Anyhow, finally found the beta files, and applied and woohoo (it worked)!

https://code.google.com/p/dangerous-pro ... p&can=2&q=