Reformed ex-PIC user needs help moving to AVR...

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I've given up with PICs and seen the light...

I've installed AVR STudio 4.08 and WinAVR which seems to be ok. I'm a bit concered by reported bugs in the current gcc-avr release. I have bought an STK500 and it seems fine, but I haven't downloaded anything to it yet... I've read the books, the data sheets & lots of documents from this excellent site...

So, my questions:

1. Is there an up-to-date document that describes how to fully integrate gcc-avr & make with AVR Studo, or if there a better way (e.g. using AtmanAVR).

2. Do I need a JTAG interface? - I note that Olimex have a nice one (http://www.olimex.com/dev/avr-jt...) or is the default serial cable to the STK500 enough?

3. What is the best way to program? Using the STK500 or something else?

4. When I'm debugging using AVR Studio, what should I be generating from the compiler? coff? extcoff? nasty-hacking-cough? There seems to be some confusion (from my viewpoint) as it depends on the compiler/AVRStudio versions - what should I use?

5. Are the bugs in the current compiler serious?

I must say, that AVRs seem so much more sensible when I look at them now compared to PICS - the real winner for me was that AVR Studio is much nicer than MPLAB, and the availability of gcc-avr vs. the rather crippled PICC Lite. BTW. I'm a professional programmer in real life, so I get sensitive about compiler,debugger and IDE limitations.

Thanks

Nick

Nicko

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

I can't answer all your questions but can a few.

I think integration between AVRStudio and WinAVR isn't there for the 4.x versions of Studio. At least it wasn't last time I checked because you couldn't link in outside programs. You can, however with 3.56. I used to use AVRGCC with Studio 3.56 a lot - it supported projects and made it quick and easy to open the individual files and edit them and such.

But then I went to WinAVR and only use Studio to push down the hex files through the STK500 ISP connection. You don't need JTAG unless your application specifically requires it with boundary scans and such. I do all of my programming with the ISP and it works great for me. One thing about the JTAG interface - it comes enabled by default on at least some of the JTAG-enabled chips. If you aren't using it, be sure you set the AVR fuse to disable it otherwise you end up with funny behavior on one of your I/O ports. That one has tripped up a number of people - myself included.

To program a device in circuit, the STK works as good as the more simple ISP programmers. The STK just gives you the option to program chips on board, do parallel programming, play with switches and LED, etc. If all you will be doing is ISP, you can save a few bucks by just getting an ISP programmer. The STK is a superset of the ISP programmer's functions.

The coff stuff is better answered by someone else. My projects are all straighforward enough that I don't need to step through code to debug.

Please note - this post may not present all information available on a subject.

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

nickds1 wrote:

I've given up with PICs and seen the light...


Welcome to the club !

Quote:

1. Is there an up-to-date document that describes how to fully integrate gcc-avr & make with AVR Studo, or if there a better way (e.g. using AtmanAVR).

I recommend you to use Programmers NotePad to work with avr-gcc. It comes with the WinAvr distribution. This document would be helpful.

Quote:

2. Do I need a JTAG interface? - I note that Olimex have a nice one (http://www.olimex.com/dev/avr-jt...) or is the default serial cable to the STK500 enough?

IMO the STK500 is enough.

Quote:

3. What is the best way to program? Using the STK500 or something else?

The STK500. You can use the STK500 to program a device placed in one of the STK500 socket, or you can program an AVR which is in a boar, using the ISP interface.

Quote:

4. When I'm debugging using AVR Studio, what should I be generating from the compiler? coff? extcoff? nasty-hacking-cough? There seems to be some confusion (from my viewpoint) as it depends on the compiler/AVRStudio versions - what should I use?

Pass on this. I use LEDs and the serial port for debugging.

Quote:

5. Are the bugs in the current compiler serious?

No. I've been using avr-gcc for several years, and haven't found a compiler bug. I think the same applies to the other AVR compilers.

Regards,
Alejandro.
http://www.ocam.cl

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

Quote:
4. When I'm debugging using AVR Studio, what should I be generating from the compiler? coff? extcoff? nasty-hacking-cough? There seems to be some confusion (from my viewpoint) as it depends on the compiler/AVRStudio versions - what should I use?

The documentation in the WINAVR package addresses that, and how to set it up, easy to follow step by step directions.

[Edit] The step by step installation doc I was thinking about can be found @

http://winavr.sourceforge.net/do...

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

Quote:

2. Do I need a JTAG interface? - I note that Olimex have a nice one (http://www.olimex.com/dev/avr-jt...) or is the default serial cable to the STK500 enough?

If you have an STK500 you are prety much covered regarding the programming of the devices.
A JTAG is usefull to help in debugging, especially if you have a lot of "interraction" with the "outside world" . This is a place where the AVR Studio simulator can not help much.

IMHO the more debug tools you have the better :D

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

Let me add that having an stk500 is good... I have one... but for a project like a robot or other standalone gizmo, it is nice to get a ready to go dev board with an isp connector and put your program in it. Take a look at ERE Co Mega32 dev board up in the tools section...... inexpensive.....

Imagecraft compiler user