Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) APM - 2.9 Include paths appear to be wrong (Read 16275 times)
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
APM - 2.9 Include paths appear to be wrong
Jun 2nd, 2013 at 7:07pm
Print Post  
Builds fine with sketch, but fails with visual micro:

Compiling 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
BetterStream.h : In file included from
FastSerial.h : from
ArduCopter.ino : from
AP_Common.h : No such file or directory

Tried everything suggested above. INCLUDE paths don't seem to setup right! What next?

Windows 7 64
MSVS 2012
arduino 1.0.5
latest visualmicro download
arducopter 2.9.1b-final


« Last Edit: Jun 2nd, 2013 at 7:20pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM - 2.9 Include paths appear to be wrong
Reply #1 - Jun 2nd, 2013 at 7:27pm
Print Post  
Hi,

I hope you don't mind I moved this to a new thread. It is always better to create a new thread unless the problem and configuration is identical to another.

For the sake of clarity it might be better that you use arduino 1.0.4 instead of 1.0.5 because 1.0.5 hasn't been well tested yet, as as you could see in the other thread 1.0.4 is currently recommended.

You will probably hit the same problem with 1.0.4 but it removes some possible unknowns.

The include paths are determined from the SketchBook folder (where the Libraries folder exsists as a sub folder). 

If I recall correctly, normally for APM, you are advised to set the folder using "File>Preferences" in the Arduino Ide.

In Visual Micro there are two ways to set the correct SketchBook location, either you set it in the Arduino ide as mentioned above, then you must re-start Visual Micro/Visual Studio/Atmel

Or

The location can be set in the Visual Micro options in which case the change will take immediate effect (restart not required)

"tools>options>visual micro\applications locations>arduino sketchbook"

Can you confirm if this helps, if not please explain where the libraries are located and what your sketchbook folder is set to?

Thanks
  
Back to top
WWW  
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM 2.9 and the build process
Reply #2 - Jun 2nd, 2013 at 7:35pm
Print Post  
Here's the verbose output:

Board Properties
name=Arduino Mega 2560 HAL (Apm 2)
upload.protocol=wiring
upload.maximum_size=258048
upload.speed=115200
bootloader.low_fuses=0xFF
bootloader.high_fuses=0xD8
bootloader.extended_fuses=0xFD
bootloader.path=stk500v2
bootloader.file=stk500boot_v2_mega2560.hex
bootloader.unlock_bits=0x3F
bootloader.lock_bits=0x0F
build.mcu=atmega2560
build.f_cpu=16000000L
build.nocore=true
build.noarchive=true
build.option1=-mcall-prologues
build.option2=-DCONFIG_HAL_BOARD=HAL_BOARD_APM2
build.option3=-DEXCLUDECORE
build.linkoption1=-mcall-prologues
runtime.ide.path=C:\Program Files (x86)\Arduino
build.system.path=C:\Users\jcyr\Data\Arduino\hardware\apm\system
software=ARDUINO
runtime.ide.version=105
vm.core.include=wprogram.h
vm.boardsource.path=C:\Users\jcyr\Data\Arduino\hardware\apm
vm.boardsource.name=boards.txt
vm.platformname.name=
compiler.path=C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\
includes= -I"C:\Users\jcyr\Data\Arduino\libraries\FastSerial"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Common"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Menu"  -I"C:\Users\jcyr\Data\Arduino\libraries\Arduino_Mega_ISR_Registry"  -I"C:\Users\jcyr\Data\Arduino\libraries\APM_RC"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_GPS"  -I"C:\Users\jcyr\Data\Arduino\libraries\I2C"  -I"C:\Program Files (x86)\Arduino\libraries\SPI"  -I"C:\Users\jcyr\Data\Arduino\libraries\SPI3"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Semaphore"  -I"C:\Users\jcyr\Data\Arduino\libraries\DataFlash"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_ADC"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_AnalogSource"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Baro"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Compass"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Math"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_InertialSensor"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_PeriodicProcess"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_AHRS"  -I"C:\Users\jcyr\Data\Arduino\libraries\APM_PI"  -I"C:\Users\jcyr\Data\Arduino\libraries\AC_PID"  -I"C:\Users\jcyr\Data\Arduino\libraries\RC_Channel"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Motors"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_RangeFinder"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_OpticalFlow"  -I"C:\Users\jcyr\Data\Arduino\libraries\Filter"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Buffer"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_LeadFilter"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Relay"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Camera"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Mount"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Airspeed"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_InertialNav"  -I"C:\Users\jcyr\Data\Arduino\libraries\DigitalWriteFast"  -I"C:\Users\jcyr\Data\Arduino\libraries\memcheck"  -I"C:\Users\jcyr\Data\Arduino\libraries\GCS_MAVLink"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Declination"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Limits"  -I"C:\Users\jcyr\Data\Arduino\libraries\SITL" 
0HAL
build.project_name=ArduCopter
build.variant.path=
archive_file=core.a
560HAL\ArduCopter.cpp.o"
560HAL\ArduCopter.cpp"

Compiling 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
Build folder: 
SketchLibFolders
ries\Arduino_Mega_ISR_Registry\utility;C:\Users\jcy
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM - 2.9 Include paths appear to be wrong
Reply #3 - Jun 2nd, 2013 at 7:55pm
Print Post  
Hi,

First thing to do please install arduino 1.0.4 from arduino.cc and set visual micro to use that.

Thanks
  
Back to top
WWW  
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM - 2.9 Include paths appear to be wrong
Reply #4 - Jun 3rd, 2013 at 8:51pm
Print Post  
Tried 1.0.4... same exact result

The library files are located in a subfolder of of the sketch book forlder called 'libraries', which is not within the Arduino install folder. In visualmicro, all of the libs show up correctly as included.

Also the sketchbook folder location is set explicitly in both sketchbook and visualmicro.

Also note, that building under sketchbook works without error.
« Last Edit: Jun 3rd, 2013 at 8:58pm by Jean Cyr »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM - 2.9 Include paths appear to be wrong
Reply #5 - Jun 3rd, 2013 at 9:34pm
Print Post  
Hello,

Thanks for using 1.0.4, I am sure 1.0.5 is fine but we have some confusion and the ide is now removed from any possible cause.

Few questions then I think I will have the answer

1)
When you say building under "sketchbook" is OK, do you mean building in the modified diydrones Arduino IDE is OK?


2)
Can you please confirm the path that you have set for your sketchBook folder and where this is set? (confirm the name of the property you have set and the value you have used)

3)

Please confirm the path of the Arduino Ide that you are using (confirm the name of the property you have set and the value you have used)

4)

Please include the build output like you did below but with the latest config

There is some confusion with path configuration, I will explain it more clearly once I understand your current setup

Thanks
« Last Edit: Jun 3rd, 2013 at 9:38pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM - 2.9 Include paths appear to be wrong
Reply #6 - Jun 4th, 2013 at 1:39am
Print Post  
1)
Using standard Arduino 1.0.4 IDE, not diydrones.



2)
C:\Program Files (x86)\arduino-1.0.4

3)
C:\Users\jcyr\Data\Arduino

4)

Board Properties
name=Arduino Mega 2560 HAL (Apm 2)
upload.protocol=wiring
upload.maximum_size=258048
upload.speed=115200
bootloader.low_fuses=0xFF
bootloader.high_fuses=0xD8
bootloader.extended_fuses=0xFD
bootloader.path=stk500v2
bootloader.file=stk500boot_v2_mega2560.hex
bootloader.unlock_bits=0x3F
bootloader.lock_bits=0x0F
build.mcu=atmega2560
build.f_cpu=16000000L
build.nocore=true
build.noarchive=true
build.option1=-mcall-prologues
build.option2=-DCONFIG_HAL_BOARD=HAL_BOARD_APM2
build.option3=-DEXCLUDECORE
build.linkoption1=-mcall-prologues
runtime.ide.path=C:\Program Files (x86)\arduino-1.0.4
build.system.path=C:\Users\jcyr\Data\Arduino\hardware\apm\system
software=ARDUINO
runtime.ide.version=104
vm.core.include=wprogram.h
vm.boardsource.path=C:\Users\jcyr\Data\Arduino\hardware\apm
vm.boardsource.name=boards.txt
vm.platformname.name=
compiler.path=C:\Program Files (x86)\arduino-1.0.4\hardware\tools\avr\bin\
includes= -I"C:\Users\jcyr\Data\Arduino\libraries\FastSerial"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Common"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Menu"  -I"C:\Users\jcyr\Data\Arduino\libraries\Arduino_Mega_ISR_Registry"  -I"C:\Users\jcyr\Data\Arduino\libraries\APM_RC"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_GPS"  -I"C:\Users\jcyr\Data\Arduino\libraries\I2C"  -I"C:\Program Files (x86)\arduino-1.0.4\libraries\SPI"  -I"C:\Users\jcyr\Data\Arduino\libraries\SPI3"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Semaphore"  -I"C:\Users\jcyr\Data\Arduino\libraries\DataFlash"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_ADC"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_AnalogSource"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Baro"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Compass"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Math"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_InertialSensor"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_PeriodicProcess"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_AHRS"  -I"C:\Users\jcyr\Data\Arduino\libraries\APM_PI"  -I"C:\Users\jcyr\Data\Arduino\libraries\AC_PID"  -I"C:\Users\jcyr\Data\Arduino\libraries\RC_Channel"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Motors"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_RangeFinder"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_OpticalFlow"  -I"C:\Users\jcyr\Data\Arduino\libraries\Filter"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Buffer"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_LeadFilter"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Relay"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Camera"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Mount"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Airspeed"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_InertialNav"  -I"C:\Users\jcyr\Data\Arduino\libraries\DigitalWriteFast"  -I"C:\Users\jcyr\Data\Arduino\libraries\memcheck"  -I"C:\Users\jcyr\Data\Arduino\libraries\GCS_MAVLink"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Declination"  -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Limits"  -I"C:\Users\jcyr\Data\Arduino\libraries\SITL" 
0HAL
build.project_name=ArduCopter
build.variant.path=
archive_file=core.a
560HAL\ArduCopter.cpp.o"
560HAL\ArduCopter.cpp"

Compiling 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
Build folder: 
« Last Edit: Jun 4th, 2013 at 1:43am by Jean Cyr »  
Back to top
 
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM - 2.9 Include paths appear to be wrong
Reply #7 - Jun 4th, 2013 at 1:42am
Print Post  
Continued:

SketchLibFolders
;C:\Program Files (x86)\arduino-1.0.4\libraries\SPI;C:\Program Files ;C:\Users\jcyr\Data\Arduino\libraries\AP_Limits\utility;C:\Use
  
Back to top
 
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM - 2.9 Include paths appear to be wrong
Reply #8 - Jun 4th, 2013 at 1:44am
Print Post  
Continued:

Summary: Header=1 Prototypes=371 Imports=66
Additional Defines: VISUALMICRO_COMPILER_VER=1;
Architecture Tools: C:\Program Files (x86)\arduino-1.0.4\hardware\tools\avr\bin\
GCC: 4.3.2
Sketchbook: file://C:\Users\jcyr\Data\Arduino
C:\Program Files (x86)\arduino-1.0.4\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega2560 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=104 -I"C:\Users\jcyr\Data\Arduino\libraries\FastSerial" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Common" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Menu" -I"C:\Users\jcyr\Data\Arduino\libraries\Arduino_Mega_ISR_Registry" -I"C:\Users\jcyr\Data\Arduino\libraries\APM_RC" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_GPS" -I"C:\Users\jcyr\Data\Arduino\libraries\I2C" -I"C:\Program Files (x86)\arduino-1.0.4\libraries\SPI" -I"C:\Users\jcyr\Data\Arduino\libraries\SPI3" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Semaphore" -I"C:\Users\jcyr\Data\Arduino\libraries\DataFlash" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_ADC" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_AnalogSource" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Baro" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Compass" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Math" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_InertialSensor" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_PeriodicProcess" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_AHRS" -I"C:\Users\jcyr\Data\Arduino\libraries\APM_PI" -I"C:\Users\jcyr\Data\Arduino\libraries\AC_PID" -I"C:\Users\jcyr\Data\Arduino\libraries\RC_Channel" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Motors" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_RangeFinder" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_OpticalFlow" -I"C:\Users\jcyr\Data\Arduino\libraries\Filter" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Buffer" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_LeadFilter" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Relay" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Camera" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Mount" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Airspeed" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_InertialNav" -I"C:\Users\jcyr\Data\Arduino\libraries\DigitalWriteFast" -I"C:\Users\jcyr\Data\Arduino\libraries\memcheck" -I"C:\Users\jcyr\Data\Arduino\libraries\GCS_MAVLink" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Declination" -I"C:\Users\jcyr\Data\Arduino\libraries\AP_Limits" -I"C:\Users\jcyr\Data\Arduino\libraries\SITL" -o opter.cpp.o"  opter.cpp"  -DVISUALMICRO_COMPILER_VER=1  -mcall-prologues -DCONFIG_HAL_BOARD=HAL_BOARD_APM2 -DEXCLUDECORE 
FastSerial.h : In file included from
ArduCopter.ino : from
BetterStream.h : No such file or directory
BetterStream.h : In file included from
FastSerial.h : from
ArduCopter.ino : from
AP_Common.h : No such file or directory
FastSerial.h : In file included from
ArduCopter.ino : from
BetterStream.h : expected class-name before '{' token
BetterStream.h : 'va_list' has not been declared
BetterStream.h : 'va_list' has not been declared
ArduCopter.ino : In file included from
FastSerial.h : write' in 'class BetterStream'
AP_GPS_NMEA.h : In file included from
AP_GPS.h : from
ArduCopter.ino : from
GPS.h : ISO C++ forbids declaration of 'Stream' with no type
GPS.h : expected ';' before '*' token
GPS.h : expected `)' before '*' token
GPS.h : 'Stream' has not been declared
  
Back to top
 
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM - 2.9 Include paths appear to be wrong
Reply #9 - Jun 5th, 2013 at 1:44pm
Print Post  
So... everything looks fine! Why the compile errors???

Arduino 1.0.4 UI doesn't have this problem but I'd prefer to be using Visual Studio.  Undecided
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM - 2.9 Include paths appear to be wrong
Reply #10 - Jun 5th, 2013 at 1:47pm
Print Post  
Hi, sorry I have not had time to investigate yet. Hopefully in a few days. The problem is that this is working for quite a few other people and there is little to the config. So I have to try to work out what is different for your install.

Arduino 1.0.4 can not compile APM projects so when you say it works in 1.0.4 what do you mean? Thanks
  
Back to top
WWW  
IP Logged
 
Jean Cyr
Newbies
*
Offline


Posts: 8
Joined: Jun 2nd, 2013
Re: APM - 2.9 Include paths appear to be wrong
Reply #11 - Jun 5th, 2013 at 7:50pm
Print Post  
I have no problem building APM with Arduino 1.0.4 if I select a 2560 board. It may not run on APM, but it builds.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12070
Location: United Kingdom
Joined: Apr 10th, 2010
Re: APM - 2.9 Include paths appear to be wrong
Reply #12 - Jun 5th, 2013 at 8:37pm
Print Post  
1)
Fine then you can not be running apm 2.9 because my understandingis that  diydrones made a modified Arduino ide to provide special compiler switches required for APM 2.9 and above.

2)
The HAL board you have selected in Visual Micro is for APM HAL, not a normal APM build, there is also SITL. 

The Arduino IDE does not know about HAL or SITL so by selecting these boards you are moving to a different system and not comparing like for like.

3)

If the standard 2560 compiles in 1.0.4 then in Visual Micro you should use the Mega 2560 board with the same name that you select in the Arduino IDE. Do not use the special APM boards in the list because they contain different settings to 1.0.4 and you obviously don't need them.

Does it work if you selected the normal Arduino 2560 mega (adk) board?

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint