[Lab] arduino programming methodology

Trevyn Watson trevyn at dybydx.ca
Sun Aug 7 21:54:43 EDT 2011


I don't remember if I've used it with the ATMega168 or 328 specifically, 
but it should work fine. What I meant was that I've never used it with 
the Arduino bootloader and a program loaded onto the chip using the 
Arduino environment. When I used the Dragon I was writing C in AVR Studio.

Even if you want the debugging features, there's no need to switch 
chips. The Arduino board itself is a reasonably good development board, 
and it can be used just as a support board for programming the 328 using 
C (or even assembly) through AVR Studio or your favourite IDE.

On 07/08/2011 14|51, Darcy Whyte wrote:
> Hi Trevyn,
>
> Thanks. Funny I just came across that article. It looks like a lot
> of fidgeting but I think it could very well be worth it if one is to do
> much Arduino coding.
>
> So when you say you've used it but not for arduino do you mean with the
> same chip that's in the Arduino?
>
> I mean, this is a big enough deal that if its easier to debug on another
> chip, it's worth changing to that platform despite the fact that I've
> already got some arduinos and spent some time with them.
>
> Darcy
>
>
> On Sun, Aug 7, 2011 at 2:40 PM, Trevyn Watson <trevyn at dybydx.ca
> <mailto:trevyn at dybydx.ca>> wrote:
>
>     Yeah, debugging is one area where Arduino falls a bit short, which
>     is unfortunate since it's aimed at people new to programming.
>
>     However, there is an option:
>
>     AVRs support a protocol called DebugWIRE, which uses the reset pin
>     as a two-way communication port to get debugging info into and out
>     of the chip. You need a piece of hardware to interface DebugWIRE to
>     your computer. The cheapest at the moment is the AVR Dragon,
>     available at Digikey: http://bit.ly/o5jlke. It supports a vast
>     number of AVRs, and  a few useful programming modes in addition to
>     DebugWIRE - HVPP (useful if you screwed up the fuses on a chip),
>     JTAG, and ISP (for loading the Arduino bootloader or using your AVR
>     without it).
>
>     The Dragon interfaces with AVR Studio and gives you direct control
>     over the registers including IO, and the ability to single-step
>     through your programs. I've used it, but never with an Arduino. I
>     found a blog post that explains very thoroughly what it is and how
>     to do it:
>     https://husks.wordpress.com/__2010/02/21/modify-an-arduino-__for-debugwire/
>     <https://husks.wordpress.com/2010/02/21/modify-an-arduino-for-debugwire/>
>
>
>
>     On 07/08/2011 12|37, Darcy Whyte wrote:
>
>         I worked on Baby Drawbot a bit this morning.
>
>         I find that the method of streaming debug information into the
>         serial
>         monitor is pretty poor.
>
>         Are there any methods of:
>
>         1) using an emulator so we can do tracing and have better
>         problem solving?
>
>         2) a way of tapping into the processor to get real time information
>         about what's going on (aside from those silly serial writes).
>
>
>
>
>
>
>
>         _________________________________________________
>         Lab mailing list
>         Lab at artengine.ca <mailto:Lab at artengine.ca>
>         http://artengine.ca/mailman/__listinfo/lab
>         <http://artengine.ca/mailman/listinfo/lab>
>
>
>     _________________________________________________
>     Lab mailing list
>     Lab at artengine.ca <mailto:Lab at artengine.ca>
>     http://artengine.ca/mailman/__listinfo/lab
>     <http://artengine.ca/mailman/listinfo/lab>
>
>



More information about the Lab mailing list