default include file path?

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

Under "Project:Configuration Options:Include Directories"
for #include
If the list is blank, where do the include files come from?

My current setup:

Quote:
===================================
AVR Studio 4.18.716
GUI Version 4, 18, 0, 685
JTAGICE mkII 1, 0, 1, 155
AT90USB1286 39

Operating System
Major 5
Minor 1
PlatformID 2
Build 2600
Service Pack 3

Plugins:
AvrPluginAvrAsmObject 1, 0, 0, 48
AvrPluginavrgccplugin 1, 0, 0, 11
Stk500Dll 1, 0, 1, 15
===================================

Minimize Coupling - Maximize Cohesion

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

Depends on what's providing your toolchain. Is it WinAVR20100110 or some version of "Toolchain" from Atmel?

Anyway try "avr-cpp -v". For example I get this for WinAVR:

E:\>avr-cpp -v
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.3/configure --enable-win32-registry=WinAVR-20100110 --with-gmp=/usr/local --with-mpfr=/usr/l
ocal --prefix=/c/WinAVR --target=avr --enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared --disable
-libada --disable-libssp --disable-nls --with-pkgversion='WinAVR 20100110' --with-bugurl='URL:http://sourceforge.net/tra
cker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.3 (WinAVR 20100110)
COLLECT_GCC_OPTIONS='-E' '-v'
 e:/winavr-20100110/bin/../libexec/gcc/avr/4.3.3/cc1.exe -E -quiet -v -iprefix e:\winavr-20100110\bin\../lib/gcc/avr/4.3
.3/ -
ignoring nonexistent directory "e:/winavr-20100110/lib/gcc/../../avr/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 e:\winavr-20100110\bin\../lib/gcc/avr/4.3.3/include
 e:\winavr-20100110\bin\../lib/gcc/avr/4.3.3/include-fixed
 e:/winavr-20100110/lib/gcc/../../lib/gcc/avr/4.3.3/include
 e:/winavr-20100110/lib/gcc/../../lib/gcc/avr/4.3.3/include-fixed
 e:/winavr-20100110/lib/gcc/../../avr/include
End of search list.

Doing the same with Atmel's toolchain (in AS6) I get:

C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin>avr-cpp -v
Using built-in specs.
COLLECT_GCC=avr-cpp
Target: avr
Configured with: /home/tools/hudson/workspace/avr8-gnu-toolchain/src/gcc/configure LDFLAGS=-L/home/tools/hudson/workspac
e/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86/lib CPPFLAGS= --target=avr --host=i686-pc-mingw32 --build=x86_64-pc-li
nux-gnu --prefix=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --libdir=/home/tools/hudso
n/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --di
sable-shared --disable-libada --disable-libssp --disable-nls --with-mpfr=/home/tools/hudson/workspace/avr8-gnu-toolchain
/avr8-gnu-toolchain-win32_x86 --with-gmp=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --
with-mpc=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --enable-win32-registry=avrtoolcha
in --enable-fixed-point --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.4.0_663 --with-bugurl=http://www.atmel.com
Thread model: single
gcc version 4.6.2 (AVR_8_bit_GNU_Toolchain_3.4.0_663)
COLLECT_GCC_OPTIONS='-E' '-v'
 cc1 -E -quiet -v -iprefix e:\winavr-20100110\bin\../lib/gcc/avr/4.6.2/ -
avr-cpp: error: CreateProcess: No such file or directory

That does not complete but also rather curiously mentions winavr-20100110 which may be because the WinAVR version is in my PATH and this one isn't.

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

I never understand this very well.
If possible, please give some details.

thanks ...Jim

Attachment(s): 

Minimize Coupling - Maximize Cohesion

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

Well it's likely to be the same as I showed for WinAVR but transplanted into the Atmel toolchain tree. So I'd predict:
C:\Program Files\Atmel\AVR Tools\AVR Toolchain\bin\../lib/gcc/avr/4.6.2/include
C:\Program Files\Atmel\AVR Tools\AVR Toolchain\bin\../lib/gcc/avr/4.6.2/include-fixed
C:\Program Files\Atmel\AVR Tools\AVR Toolchain\lib/gcc/../../lib/gcc/avr/4.6.2/include
C:\Program Files\Atmel\AVR Tools\AVR Toolchain\lib/gcc/../../lib/gcc/avr/4.6.2/include-fixed
C:\Program Files\Atmel\AVR Tools\AVR Toolchain\lib/gcc/../../avr/include

The latter being the "important one".as that's where most of AVR-LibC is located.

Just out of interest, why does it matter to you?

Oh and another way to find them is to build a project that includes typical headers such as , and so on then look in the default/dep build directory at the .d files. Here's a typical one:

E:\avr\default\dep>type test.o.d
test.o: ../test.c e:/winavr-20100110/lib/gcc/../../avr/include/stdio.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/inttypes.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/stdint.h \
  e:\winavr-20100110\bin\../lib/gcc/avr/4.3.3/include/stdarg.h \
  e:\winavr-20100110\bin\../lib/gcc/avr/4.3.3/include/stddef.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/string.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/io.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/sfr_defs.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/iom16.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/portpins.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/common.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/version.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/fuse.h \
  e:/winavr-20100110/lib/gcc/../../avr/include/avr/lock.h

e:/winavr-20100110/lib/gcc/../../avr/include/stdio.h:

e:/winavr-20100110/lib/gcc/../../avr/include/inttypes.h:

e:/winavr-20100110/lib/gcc/../../avr/include/stdint.h:

e:\winavr-20100110\bin\../lib/gcc/avr/4.3.3/include/stdarg.h:

e:\winavr-20100110\bin\../lib/gcc/avr/4.3.3/include/stddef.h:

e:/winavr-20100110/lib/gcc/../../avr/include/string.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/io.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/sfr_defs.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/iom16.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/portpins.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/common.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/version.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/fuse.h:

e:/winavr-20100110/lib/gcc/../../avr/include/avr/lock.h:

This is how the AS4/AS6 IDE is able to "show dependencies" after the build so you never really need to know the absolute oaths anyway.

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

You are using the AVR Toolchain.

The command avr-cpp start the C PreProcessor (the part of the toolchain that handles the directives starting with #), and if you give it the -v option it will reveal, among other things, the default include paths it has built in.

I believe Cliff made the mistake above (for Atmels AVR Toolchain) to not actually run the correct avr-cpp. I did:

C:\Program Files\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRGCC\3.4.0.65\AVRToolchain\bin>.\avr-cpp -v

(notice the .\ to run the specific avr-cpp in that directory rather than pick up anything in the path). I get

Using built-in specs.
COLLECT_GCC=.\avr-cpp
COLLECT_LTO_WRAPPER=c:/program files/atmel/atmel studio 6.0/extensions/atmel/avrgcc/3.4.0.65/avrtoolchain/bin/../libexec/gcc/avr/4.6.2/lto-wrapper.exe
Target: avr
Configured with: /home/tools/hudson/workspace/avr8-gnu-toolchain/src/gcc/configure LDFLAGS=-L/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-
win32_x86/lib CPPFLAGS= --target=avr --host=i686-pc-mingw32 --build=x86_64-pc-linux-gnu --prefix=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolch
ain-win32_x86 --libdir=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86/lib --enable-languages=c,c++ --with-dwarf2 --enable-doc --di
sable-shared --disable-libada --disable-libssp --disable-nls --with-mpfr=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --with-gmp
=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 --with-mpc=/home/tools/hudson/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win3
2_x86 --enable-win32-registry=avrtoolchain --enable-fixed-point --with-pkgversion=AVR_8_bit_GNU_Toolchain_3.4.0_663 --with-bugurl=http://www.atmel.com
Thread model: single
gcc version 4.6.2 (AVR_8_bit_GNU_Toolchain_3.4.0_663)
COLLECT_GCC_OPTIONS='-E' '-v'
 c:/program files/atmel/atmel studio 6.0/extensions/atmel/avrgcc/3.4.0.65/avrtoolchain/bin/../libexec/gcc/avr/4.6.2/cc1.exe -E -quiet -v -iprefix c:\program fil
es\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/ -
ignoring nonexistent directory "c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/../../../../avr/s
ys-include"
ignoring duplicate directory "c:/program files/atmel/atmel studio 6.0/extensions/atmel/avrgcc/3.4.0.65/avrtoolchain/lib/gcc/../../lib/gcc/avr/4.6.2/include"
ignoring duplicate directory "c:/program files/atmel/atmel studio 6.0/extensions/atmel/avrgcc/3.4.0.65/avrtoolchain/lib/gcc/../../lib/gcc/avr/4.6.2/include-fixe
d"
ignoring nonexistent directory "c:/program files/atmel/atmel studio 6.0/extensions/atmel/avrgcc/3.4.0.65/avrtoolchain/lib/gcc/../../lib/gcc/avr/4.6.2/../../../.
./avr/sys-include"
ignoring duplicate directory "c:/program files/atmel/atmel studio 6.0/extensions/atmel/avrgcc/3.4.0.65/avrtoolchain/lib/gcc/../../lib/gcc/avr/4.6.2/../../../../
avr/include"
#include "..." search starts here:
#include <...> search starts here:
 c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/include
 c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/include-fixed
 c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/../../../../avr/include
End of search list.

The passage to note, listing default search paths, is:

#include "..." search starts here:
#include <...> search starts here:
 c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/include
 c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/include-fixed
 c:\program files\atmel\atmel studio 6.0\extensions\atmel\avrgcc\3.4.0.65\avrtoolchain\bin\../lib/gcc/avr/4.6.2/../../../../avr/include
End of search list.

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

Quote:

you never really need to know the absolute oaths anyway.

Dammit, you are certainly correct. :twisted:

[Cliff's second try at Spoonerisms today...there was another "naive" vs. "native"]

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

Quote:

you never really need to know the absolute oaths anyway.

Could have been worse. Could have dropped the 'h' also (John Lennon at the opening of the Let It Be album, and all that... - and we'd end up hearing Cliff and Lee singing Two Of Us together.. :shock:)

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

Quote:
This is how the AS4/AS6 IDE is able to "show dependencies" after the build

This gives what I wanted, no matter how the path is derived.
The "External Dependencies" does the trick for me.
I just wanted to look at the file (and be sure it was the one included)

One of these days, I need to change to the GCC toolchain.
Everything is working and I'm busy on other stuff just now.

thanks abunch
...Jim

Minimize Coupling - Maximize Cohesion