Is there any way to turn on matching brackets?

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

Hi Freaks,

Is there any way to turn on matching brackets in AVR Studio? I have a program that is very long and has multiple if-else-if statements and even with proper indentation, it got confusing to keep track of which closing bracket corresponds to which opening brace.

Thanks.

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

Quote:
Is there any way to turn on matching brackets in AVR Studio?
No. You can load your program into Codevision evaluation, maybe ImageCraft also, for checking.

Or you may want to use programmer's notepad (PN) which comes with winAvr. (never used it myself)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Along with John's suggestions you can try (free!) Code::Blocks or Eclipse.

The downside to all of these is that source-line debugging is not really supported.

With AVR Studio, you cannot perform simple look-ups on functions for definitions. Nor can you do the same thing for variables. Nor many of the other way-cool features that any other modern source code editor provides.

Okay, there is auto-indent and keyword coloring. Be still my racing heart. :evil:

Unfortunately, the editor in AVR Studio is, well, somewhat simple minded. I have heard of no plans to improve it. Nor are there any plans to move to Eclipse (which, by the way, Atmel supports for the AVR32). *sigh* :(

Well, AVR Studio is free. Ya get whats ya pays fer!

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

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

Quote:
Well, AVR Studio is free. Ya get whats ya pays fer!
...
Engineering seems to boil down to: Cheap. Fast. Good. Choose two.

Isn't this a bit of oversimplified view of things?

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

Other free IDEs have features like that. I really miss them when I have to use AVR Studio. I can always import a file into MPLAB, of course. :)

Leon Heller G1HSM

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

leon_heller wrote:
Other free IDEs have features like that. I really miss them when I have to use AVR Studio. I can always import a file into MPLAB, of course. :)
You don't 'have to' use AVRStudio anymore than you 'have to' keep recommending Microchip products.

Smiley

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

What do you suggest I use for AVR development instead of AVR Studio? I suppose I could use Rowley's excellent CrossWorks, I already use that for MSP430 and ARM chips.

Why not try MPLAB for yourself and see what you are missing?

Leon Heller G1HSM

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

Thanks, guys.

I will try Eclipse. I wonder if you can do that in MSVC++.

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

I never liked Eclipse much previously, but XMOS bases their XDE on it, and it isn't bad when one gets used to it. It does highlight matching parentheses and braces, with a little box on the one matching the one the cursor is on. I prefer the way MPLAB and the Rowley CrossStudio IDEs do it: the former highlights them both in yellow and the latter puts a vertical line between them which darkens and extends sideways if they aren't lined up.

Leon Heller G1HSM

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

stu_san wrote:

Well, AVR Studio is free. Ya get whats ya pays fer!
Stu

No, it’s not free, you pay for it buying Atmel chips.

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

TFrancuz wrote:
stu_san wrote:

Well, AVR Studio is free. Ya get whats ya pays fer!
Stu

No, it’s not free, you pay for it buying Atmel chips.
Aaaand you're *not* going to pay for it if you use some other IDE? :? You will end up buying someone's chips, regardless of the tools you use.

I think, for me, the real answer for using AVR Studio lies in the source-line debugger. I haven't ever tried gdb or any of the GUI front-ends, but I've never heard rave reviews. I haven't heard about the debugging environment in the other IDE/compiler sets, but it seems odd that everyone talks about porting their object back to AVR Studio for debugging. For me, the single tool environment is more important than the editor.

Now if Atmel would release the JTAG command set so we could build our own source-line debugger plug-in to ... :wink: On the other hand, with all the (lack of) help the GCC effort gets, this may not be such a great idea. :evil:

npat_avr wrote:
I wonder if you can do that in MSVC++.
Yes, you can. Search the forum with the the keywords Visual C and I'm sure it will come up. Same comments about the debugger, though.

Stu

Engineering seems to boil down to: Cheap. Fast. Good. Choose two. Sometimes choose only one.

Newbie? Be sure to read the thread Newbie? Start here!

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

Eclipse works very well for debugging at the source code level, it actually uses gdb. I'm not sure if it has been ported to the AVR, though. This is what it looks like:

http://www.leonheller.com/XMOS/Eclipse.GIF

It's debugging an XC program for an XMOS chip.

The Rowley CrossStudio IDE is much nicer than AVR Studio for debugging, but it isn't "free".

Leon Heller G1HSM

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

There are at least two GDB back-ends that work with the AVR. They are Simulavr (simulator) and AVaRICE (JTAG, debugWire).

Simulavr has very limited support for mostly older AVR models; for this reason, if you're using a newer AVR device either of the simulators (V1 or V2) included with AVR Studio are much preferable.

AVaRICE works with the original JTAGICE, the JTAGICE mkII, and the AVR Dragon. It does not work with simpler bit-bashing JTAG probes. It supports a wider array of AVR models than Simulavr, but the list is still not quite as extensive as those supported by AVR Studio. When using the original JTAGICE, AVaRICE's AVR part support is not as extensive as it is when working with the AVR Dragon or JTAGICE mkII, due to the limited capabilities inherent in the original JTAGICE's firmware. When using the AVR Dragon, the currently released version of AVaRICE still adheres to the 32K Flash limitation that was recently removed from AVR Studio.

Stu, the command protocol for communicating between the JTAGICE (or JTAGICE mkII) and the PC is documented by Atmel. It ought to be sufficient for writing any PC debugging software that communicates via Atmel's tools. The missing link, however, is documentation of the protocol between the JTAGICE and the AVR itself. This missing documentation makes it more difficult to target the simpler bit-bashing JTAG devices.

Unfortunately, I still haven't seen a GDB front-end that visually presents the AVR's internals as well as AVR Studio.

...In addition to all this, IAR's AVR tools include their own integrated front-end for the JTAGICE, JTAGICE mkII, and friends.

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

Quote:

Simulavr has very limited support for mostly older AVR models; for this reason, if you're using a newer AVR device either of the simulators (V1 or V2) included with AVR Studio are much preferable.

Just to note that there's a C++ re-write of simulavr that seems to be currently maintained and they are adding some of the more "modern" AVRs to it (including the ubiquitous 48/88/168)
Quote:

Unfortunately, I still haven't seen a GDB front-end that visually presents the AVR's internals as well as AVR Studio.

There's an add-on for simulavr (who's name escapes me as I'm still on Vegas time so it's about 05:45 for me right now) but I thought it did a pretty good job of showing the AVR "internals". I'm pretty sure I found it as a result of a link in the simulavr documentation.

EDIT: add-on is simulavr-disp and is used with --disp-prog

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

Quote:
Just to note that there's a C++ re-write of simulavr that seems to be currently maintained and they are adding some of the more "modern" AVRs to it (including the ubiquitous 48/88/168)

It's also worth mentioning the new simavr project from buserror. It's gaining features almost daily, and can now do some nice visualisations via GTKWave.

For me, the missing link in an Eclipse based development environment is an I/O register view as found in AVR Studio. Have been looking through the avr-eclipse plugin source for inspiration, but looks like a steep learning curve! (If only Atmel could point some of their AVR32 Eclipse guys at that plugin & contribute some updates...)