How to use avr-libc in Atmel Studio ?

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

I tried Atmel Studio, I found it like CodeBlocks - an IDE.

 

When I used CodeBlocks, I need to install gcc and set the path in it.

 

So, my question is, need I install gcc and avr-libc library in Atmel Studio before I write c++ program for Atmega MCU ?

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

MianQi wrote:
need I install gcc and avr-libc library in Atmel Studio before I write

No - it is all included in the Atmel Studio installation.

 

MianQi wrote:
for Atmega MCU

The installer will ask you which microcontroller family/ies you want installed

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As Andy says, your copy of AS7 already comes with the avr-gcc toolchain and all the library support that requires (with all paths to it preconfigured and so on) at this location:

 Directory of C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr

10/10/2019  13:31    <DIR>          .
10/10/2019  13:31    <DIR>          ..
10/10/2019  13:31    <DIR>          bin
10/10/2019  13:31    <DIR>          include
10/10/2019  13:31    <DIR>          lib
               0 File(s)              0 bytes
               5 Dir(s)  219,135,008,768 bytes free

So there's nothing to do apart for File-New Project and simply get on with programming as all the complex IDE configuration stuff has already been done. 

Last Edited: Thu. Jul 30, 2020 - 09:11 AM