How to point AS7 to search for custom libraries in another path other than program installation folder?

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


Hello,

 

I've managed to point AS7 for projects to be in OneDrive folder for program application projects.

 

But when I write #include "", then AS7 only display the paths that are related and know to AS7 to search into, so how to add my paths along with AS7 paths?

 

 

This topic has a solution.

Last Edited: Mon. May 13, 2019 - 02:53 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Go to project properties and add to "Directories". Those are the locations it will be searching for .h files when it builds so they should also be the ones it lists for "" completion too.

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

 

Thanks :)

 

 

Sorry I have another question.

 

Can I delete the default path that lists all the header files that I'm not interested in most the time; this one:

 

 

 

This one, I'm afraid if I delete it then it would be hard to find it again.

 

 

=================================================================================

 

Edit:

OK, I think that default path is:

F:\Program Files\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain

 

It's appeared in the directories in another form but I think it's the same path. Am I right?

 

Because I don't to search within the AVR standard libs every time, I just want to search within my libs, it would be much more easier. Is that possible?

Last Edited: Mon. May 13, 2019 - 03:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Do not mess with anything that has been auto-generated. The whole "packs" thing is the way Atmel now handle the addition of new (and updated to existing) devices for the compiler without having to rebuild/reissue the entire thing. So, yes some default stuff is in  Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain  but the "up to date" stuff  is under "..._DFP" and you should not change anything to do with that.

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

Ops .. I deleted it !! then I compile my code and it worked.

 

OK so I guess I have to write the same line. Would that work?

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

Yeah, I'd just put it back as it was. It maybe that the device you are building for right now comes from the "core" rather than a "pack" but it's possible that Atmel might update that so I'd leave anything they generated (ie anything you did not type in yourself) as it was in case it becomes important later.

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

I think I messed things up! Or I don't know how to include a library.

 

Now if I include a standard library like atomic.h, it doesn't work. It returns: 

 

Severity    Code    Description    Project    File    Line
Error        atomic.h: No such file or directory    lcd_i2c    C:\Users\R1S8k\OneDrive\Documents\Microcontroller codes\Atmel Studio\7.0\Projects\C_projects\lcd_i2c\lcd_i2c\main.c    9

I wrote the line I deleted again, but still. I had the sense that deleting that line could confuse things. And it did !

 

=================================================================================================

The way I include a library is that I included the path in the project directories. Then that's it I just write the include preprocessor at the beginning.

 

I don't include the library in the solution explorer. Should I ? 

Last Edited: Mon. May 13, 2019 - 05:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Now I don't know why AS7 refers to it now as related to my project directory not the AS7 default directory.

 

 

 

When I remove the mark, it refers to this location:

 

C:\Users\R1S8k\OneDrive\Documents\Microcontroller codes\Atmel Studio\7.0\Projects\C_projects\lcd_i2c\lcd_i2c\Debug\$(PackRepoDir)\atmel\ATmegaDFP\1.2.132\include

 

Where it was this one:

 

$(PackRepoDir)\atmel\ATmega_DFP\1.2.132\include

 

Things got mixed !

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

OK, things are ok now, thanks clawson :)