Using AVR Studio with WinAVR compiler

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

I'm now using AVR Studio 4.12 to debugg and Programmers Notepad 2 to write my code in. I use PN 2 and WinAVR compiler to make my elf file.

Does sombody now how I can setup use AVR Studio 4.12 with WinAVR compiler. So I dont need to jump between PN and AVR Studio to debug.

Another quastion:
What is the difference between WinAVR and AVR GCC that is now included in AVR Studio ?

I have been using WinAVR and it works great!
But I will not risk that my code will have som compiler failure if I change to AVR GCC ?

Thanks :)

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

1. AVR-GCC is not included in AVR Studio.

2. WinAVR is a package of software for developing applications for AVRs. It's central part is the AVR-GCC compiler, but there are several other utilities also. One You might have encountered is the Mfile utility to edit makefiles in a somewhat user friendly manner.

3. To be able to use Studio to edit and build Your AVR applications You need to install the 4.12 version of Studio, and the current version of WinAVR (200502something...). If everything works out alright You just start Studio, set up a new project in Studio by selecting the Project menu, New project. Select AVR GCC as project type and give the project a name. Maybe You want to create an initial source file here in this dialog, but it is not necessary - You can add existing files to the project, or create new ones, later. Studio will take care of the makefile behind the scenes, so You don't have to write one Yourself. Click Next and select Your debug platform (probably AVR Simulator) and the AVR device model. Click Finish and You're done! The project is set up, and You can start editing Your code. Then build Your project form the Build menu, and run the simulator from the Debug menu. (Studio has taken care of building the ELF/DWARF-2 debug data behind the scenes).

Quote:
But I will not risk that my code will have som compiler failure if I change to AVR GCC ?

As You already have installed WinAVR then You have the AVR-GCC compiler, and it is this same compiler that will be run by Studio. (As I just said: AVR Studio does not contain any C compiler, it just knows how to talk to a AVR-GCC compiler if it finds one).

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

Hi Johan

Thank for your replay!

I just got news letter from Atmel:

Quote:

- Integrated AVR GCC compiler
Integrated development with any AVR GCC compiler is now supported with AVR Studio. WinAVR or any other AVR GCC compiler must be downloaded and installed separately, but with IDE support in AVR Studio you can easily and fast get started with C code development and debugging.

It seems that AVR GCC compiler in included in version AVR Studio 4.12 RC1 (build 452) !

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

No! What they are saying is that AVR Studio will "integrate" any AVR-GCC compiler it finds. You must have a separate installation of AVR-GCC.

Notice the passage

Quote:
WinAVR or any other AVR GCC compiler must be downloaded and installed separately

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

toti,

In your first post you said you are using PN/avr-gcc and that you also have Studio 4.12 (hopefully RC3!). In that case (because you already have Studio 4.12 and WinAVR(inc arm-gcc)) you don't have to DO anything to make a GCC project inside Studio apart from start Studio, go to the Project menu, select "new project" and for "Project type" select "AVR GCC", enter a name in the "project name" box and if you don't already have some C files for it leave the "create initial file" box ticked. But if you do already have some C (I think you DO!) then untick that box and [next]. Either select a debugger or "simulator" and also identify the AVR CPU you are programming for. Then [finish]

Now in the project list at the left right click "source files" and select "add existing source files...".

You are now ready to select a build option from the build menu.

You can edit the files inside Studio now by double-clicking them in the project list - so you no longer need to use Programmers Notepad. When you do select "build" Studio will execute C:\WinAVR\utils\bin\make.exe for you (and this will in turn execute your existing avr-gcc)

Cliff

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

Thanks for your advise!

I tried to take one of my project and compiled in AVR Studio with AVR-GCC. Everything works perfectly and now I don’t need to jump back and forward between AVR Studio and Programmers Notepad.

But I sill want to use PN when I need to read source code and relax with my laptop in the couch 8)

Programers Notepad is a great editor and has a lot of features for coders.

PS. What do you meen by (hopefully RC3!) ?

Best regards
From the gay that is clamping up the steep programmers hill with out falling ;)

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

toti wrote:
PS. What do you meen by (hopefully RC3!) ?

Simply that there have been a number of releases of "Studio V4.12" but the one everyone should be using at this stage is Release Candidate 3 which is also identified as Build 454

So if you look in the Help-About menu and the bottom left says "Build 454" then you are fine but if it's less than 454 then visit:

http://www.atmel.no/beta_ware/

Cliff

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

Thanks Cliff

I have following
AVR Studio 4.12.452 Release Candidate 1
GUI Version 4, 12, 0, 451

So I need to update to 4.12.452 Release Candidate 3 !