hexagon5un / AVR-Programming

Code examples for the book "Make: AVR Programming"
http://littlehacks.org/AVR-Programming
MIT License
725 stars 340 forks source link

Atmel Studio 7 Serialloopback error USART.H #35

Open igonine opened 6 years ago

igonine commented 6 years ago

Hi:

I known that this issue has already been discussed in previous posts, but after reading all of the posts, i still can´t find an answer to this problem. The project recognizes the USART.H and pinDefines.h, but when i compile, it gives many error. I checked all the code and can't find what i'm doing wrong. The errors are in the attached file.

if someone has manged to compile and make it work with atmel studio, please help me so i can progress in the book.

Thanks João Ferreira error.xlsx

n4n0b1t3 commented 6 years ago

This might fix your problem.

I had probably the same problem with AS7 and I solved it the following way.

  1. Copy the makefile from Elliots example (https://github.com/hexagon5un/AVR-Programming/tree/master/Chapter05_Serial-IO/serialLoopback) into the directory you are working in.
  2. open the makefile with a text editor and change LIBDIR according to your setup
  3. I use mk2 so I just commentet out the lines PROGRAMMER_TYPE = usbtiny and PROGRAMMER_ARGS =
  4. AS7 in the solution explorer right click on the project name and select "properties"
  5. in properties select the left tab "build" and here check the box "Use external Makefile"
  6. Browse to the makefile and save (ctrl+s)

Next time please do not use infection prone file types to post build messages.

Cheers, Peter p.s. I noticed that AS7 automatically sets possibly the wrong relative path, this might be one issue when using linked files.

athulsnair commented 5 years ago

@igonine I could compile the code on Atmel Studio 7