Author Topic: AVR studio vs. C  (Read 4316 times)

0 Members and 1 Guest are viewing this topic.

Offline Cristi_NeaguTopic starter

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
AVR studio vs. C
« on: May 07, 2010, 02:44:01 PM »
Hello.

I started really learning C these days. I also know that the language used by AVR studio is very similar to C. I was wondering how far this resemblance goes. For starters, can i define structs in AVR studio?

What other things i can and can't do in AVR studio as opposed to standard C?

Thanks.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: AVR studio vs. C
« Reply #1 on: May 07, 2010, 02:49:30 PM »
AFAIK, AVR Studio is just an IDE. You can use it to program in assembler or in C.

Offline Cristi_NeaguTopic starter

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
Re: AVR studio vs. C
« Reply #2 on: May 07, 2010, 02:53:21 PM »
So, does that mean that whatever goes in C, also goes in AVR studio when writing a program for the Axon?

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
    • Current projects
Re: AVR studio vs. C
« Reply #3 on: May 07, 2010, 05:06:29 PM »
AVR studio "is" C. You're probably using the same compiler as the one used by AVR Studio to compile C.

Offline Benn

  • Jr. Member
  • **
  • Posts: 20
  • Helpful? 0
Re: AVR studio vs. C
« Reply #4 on: May 07, 2010, 06:10:15 PM »
Cristi: "C" is a programming language, like others: java, pascal, C++, etc...
AVR is an IDE: Integrated development environment, like: MPLab, Micro, and many other. Those IDEs help you to write, debug and program your uC, using C language or Assembler.
P.S: esti cumva roman?:D

Offline tim_wang

  • Jr. Member
  • **
  • Posts: 32
  • Helpful? 0
Re: AVR studio vs. C
« Reply #5 on: May 07, 2010, 09:58:43 PM »
Hello.

I started really learning C these days. I also know that the language used by AVR studio is very similar to C. I was wondering how far this resemblance goes. For starters, can i define structs in AVR studio?

What other things i can and can't do in AVR studio as opposed to standard C?

Thanks.

You can define structures in AVR studio the same way you declare it using any other IDE such as Visual C++.

The main limitation of compiling code using AVR studio for an Atmel is the microcontroller's limited memory and storage compared to a PC.

Offline Cristi_NeaguTopic starter

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 5
Re: AVR studio vs. C
« Reply #6 on: May 07, 2010, 11:03:49 PM »
Cristi: "C" is a programming language, like others: java, pascal, C++, etc...
AVR is an IDE: Integrated development environment, like: MPLab, Micro, and many other. Those IDEs help you to write, debug and program your uC, using C language or Assembler.
P.S: esti cumva roman?:D

Da... sunt roman :P

As far as i know, an IDE also implies a compiler. If it doesn't have a compiler, it's just an editor.

From what i understand from you guys, AVR studio uses C syntax, only with different libraries (be it AVRlib, or Webbot's library) to make life easier when programming for a microcontroller as opposed to a computer.

Thanks for the replies.

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: AVR studio vs. C
« Reply #7 on: May 08, 2010, 05:25:54 PM »
AVR studio has integrated an Assembly compiler but you can add the C compiler that you use for Axon...
Simple as this...

AVR studio is far from "just" an IDE... It's a debugger and a very very good one...
You can do anything... scope variables, see how pin, registers and so on are changing....
What goes in and what out...

Axon code IS compatible with AVR Studio C code yes... If you use WinAVR and GCC of course...

Anyways, I don't thing any of us, use IAR... It costs only 3000$.... *sarcasm...
Or he is a professional and I'm just not aware...

Or even better a pirate... well that's acceptable... but nobody is going to yell it....

So... that's pretty much it...
For whom the interrupts toll...

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: AVR studio vs. C
« Reply #8 on: May 09, 2010, 02:33:15 AM »
I believe you are asking about the compiler, not really the language or the IDE?

There are many C compilers, and they all compile C differently (there is a standard but no one follows it).

99% of everyone that programs an AVR uses the gcc compiler, and AVR Studio is compatible with gcc. If you program the $50 Robot or the Axon microcontroller, you are using the gcc compiler.

http://gcc.gnu.org/

Offline PAT_McUser

  • Jr. Member
  • **
  • Posts: 32
  • Helpful? 1
  • I just started with robitic.
Re: AVR studio vs. C
« Reply #9 on: May 15, 2010, 07:54:02 AM »
AVR Studio is a IDE for C. There are many other IDE's, for example Eclipse (for C/C++) or the Borland/Codegear IDE's or even some microsoft produkts. You can chose the compiler that is best in your eye. The AVR STudio is very buggy in my eyes, it replays the line of the error, but there is no linecount in the program (that should be fixed). I think eclipse is very good, but I also use AVR Studio and Proton (a normal editor wich ony color the text, no compiling, no errorcheck, nothing else, but it has linenumberation ;-) ).

Go on and test some C IDE's maybe you find some very very good (bether than eclipse) IDE and thell thes to us.

LG Patrick
I just started with robitic.

PS.: you have to sorry my bad english.

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,208
  • Helpful? 15
  • Hardware and Firmware Designer
    • The Hellinic Robots Portal
Re: AVR studio vs. C
« Reply #10 on: May 15, 2010, 10:48:56 AM »
AVR studio is a IDE for programming AVR micro-controllers...
The integrated language is Assembly... The fact that you integrate GCC is something else....

As an IDE for programming micro-controllers is very very good, you have many tools for different AVR families, a most useful debugger, it connects directly to programmer, if you have something official or official compatible of course, and generally there some many many many goodies in there most of them you never gonna use...

If you get warnings or errors you can be redirected to them... If that's so then why is line count so crucial...
It helps but it's not a necessity....
Then again you can write C/C++ code in a notepad if you feel so...
But don't judge so quickly especially if you are new somewhere...
For whom the interrupts toll...

Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: AVR studio vs. C
« Reply #11 on: May 15, 2010, 11:34:27 AM »
There are times having a few more options to show line numbers or the like would help.  Or a goto line command.  However for me it has never been that big of a deal as it does show you the current line and column number in the status bar at the bottom of the window. 

Prior to using AvrStudio for my AVR development I mostly used Programmers Notepad which was installed as part of WinAvr.  This also works very well. 

Kurt

Offline greywanderer012345

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
Re: AVR studio vs. C
« Reply #12 on: August 10, 2012, 03:54:44 PM »
I use Eclipse for android programming and avrstudio for mcu. What's really missing in avrstudio is autocomplete, program outline views, andthings like going to the declaration of a variable in the rightclick menu. I havent written anything big enough for an mcu to get very lost, but these navigation tools will eventually lead me to program in eclipse and only debug in avrstudio.

Does anyone know if there is a good avr plugin for eclipse?

 


Get Your Ad Here