2 x ioport.h and ioport_compat.h

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

Hi Freaks,

when I start new project for XMEGA32E5 with ASF, in Solution Explorer tree list I can find two "ioport.h" files. One with ..\ioport\xmega\ioport.h path a second with ioport\ioport.h

My questions:
1. Which file will be included after #include command?
2. When I want use command ioport_configure_pin(... - after "Go To Implementation" system can find definition in "ioport_compat.h", but compiler show error implicit declaration.

Thanks for answer.

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

Quote:

1. Which file will be included after #include command?

Add -H to the compiler options. It instructs the preprocessor to output details of which header files it is actually using.

It does seem a bit mad to have two different files in any project that have the same name but are you sure they ARE different files? AS6 has "add as link" which allows for effectively "virtual" files so it could be that the two are one and the same file. Temporarily store an edit ion one and see if you can see it when you edit the other.

Oh and another way to find out which of many files is being used is to add:

#error "this file (perhaps mention pathname?) is being used"

This will cause a build error when you build assuming the file is being used.

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

Hi Clawson,

Thanks for help.

Files ioport.h and xmega/ioport.h are different. The first is generaly for AVR, UC32, ARM and Xmega, the second is only for Xmega. I will try -H option in Compiler section. But, exactly in Compiler path is defined only path to \services\ioport not to \services\xmega\ioport

I have tried remove the first ioport.h from project and still everything is working.