Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisualStudio complier failing #956

Closed
grahamehorner opened this issue Nov 2, 2015 · 10 comments
Closed

VisualStudio complier failing #956

grahamehorner opened this issue Nov 2, 2015 · 10 comments

Comments

@grahamehorner
Copy link

I'm using the VisualStudio plugin to build a custom library, however everything I've tried thus far gives errors with regards header files etc. note output below; any suggestions greatly appreciated.

Arduino.h:28:26: fatal error: avr\pgmspace.h: No such file or directory
:#include <avr\pgmspace.h>
:compilation terminated

Compiling 'WebServer' for 'NodeMCU 1.0 (ESP-12E Module)'
Build folder: file:///C:/Users/grahame.horner/AppData/Local/V.Micro/Arduino/Builds/WebServer/nodemcuv2
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Architecture Tools: C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/
GCC: 4.8.2
Sketchbook: file:///D:/DEV/git.hub/arduino
Core Include Paths
Include Path 'D:\DEV\git.hub\arduino\WebServer'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu'
"C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266-1.6.5-947-G39819F0 -DESP8266 -I"D:\DEV\git.hub\arduino\WebServer" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu" "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp" -o "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp.o"
:ISO C99 requires whitespace after the macro name [enabled by default]
WebServer.cpp:In file included from
Arduino.h:28:26: fatal error: avr\pgmspace.h: No such file or directory
:#include <avr\pgmspace.h>
:compilation terminated
"C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266-1.6.5-947-G39819F0 -DESP8266 -I"D:\DEV\git.hub\arduino\WebServer" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu" "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp" -o "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp.o"
:ISO C99 requires whitespace after the macro name [enabled by default]
WebServer.cpp:In file included from
Arduino.h:28:26: fatal error: avr\pgmspace.h: No such file or directory
:#include <avr\pgmspace.h>
:compilation terminated
Error compiling

@asetyde
Copy link

asetyde commented Nov 2, 2015

library include ! not avr\pgmspace.h
#include <pgmspace.h> for esp

On 02/nov/2015, at 16:10, Grahame Horner notifications@github.com wrote:

I'm using the VisualStudio plugin to build a custom library, however everything I've tried thus far gives errors with regards header files etc. note output below; any suggestions greatly appreciated.

Arduino.h:28:26: fatal error: avr\pgmspace.h: No such file or directory
:#include
:compilation terminated

Compiling 'WebServer' for 'NodeMCU 1.0 (ESP-12E Module)'
Build folder: file:///C:/Users/grahame.horner/AppData/Local/V.Micro/Arduino/Builds/WebServer/nodemcuv2
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Architecture Tools: C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/
GCC: 4.8.2
Sketchbook: file:///D:/DEV/git.hub/arduino
Core Include Paths
Include Path 'D:\DEV\git.hub\arduino\WebServer'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu'
"C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266-1.6.5-947-G39819F0 -DESP8266 -I"D:\DEV\git.hub\arduino\WebServer" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu" "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp" -o "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp.o"
:ISO C99 requires whitespace after the macro name [enabled by default]
WebServer.cpp:In file included from
Arduino.h:28:26: fatal error: avr\pgmspace.h: No such file or directory
:#include
:compilation terminated
"C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266-1.6.5-947-G39819F0 -DESP8266 -I"D:\DEV\git.hub\arduino\WebServer" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu" "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp" -o "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp.o"
:ISO C99 requires whitespace after the macro name [enabled by default]
WebServer.cpp:In file included from
Arduino.h:28:26: fatal error: avr\pgmspace.h: No such file or directory
:#include
:compilation terminated
Error compiling


Reply to this email directly or view it on GitHub #956.

@grahamehorner
Copy link
Author

@asetyde sorry don't quite follow; I don't include this in my code anywhere; this is coming from other core .h file that I referenced like Arduino.h, I shouldn't have to reference #include <pgmspace.h> explicitly?

and even when I do I get

WebServer.cpp:5:22: fatal error: pgmspace.h: No such file or directory
:#include <pgmspace.h>

Compiling 'WebServer' for 'NodeMCU 1.0 (ESP-12E Module)'
Build folder: file:///C:/Users/grahame.horner/AppData/Local/V.Micro/Arduino/Builds/WebServer/nodemcuv2
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines:
Architecture Tools: C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/
GCC: 4.8.2
Sketchbook: file:///D:/DEV/git.hub/arduino
Core Include Paths
Include Path 'D:\DEV\git.hub\arduino\WebServer'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu'
"C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266-1.6.5-947-G39819F0 -DESP8266 -I"D:\DEV\git.hub\arduino\WebServer" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu" "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp" -o "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp.o"
:ISO C99 requires whitespace after the macro name [enabled by default]
WebServer.cpp:5:22: fatal error: pgmspace.h: No such file or directory
:#include <pgmspace.h>
:compilation terminated
"C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-IC:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266-1.6.5-947-G39819F0 -DESP8266 -I"D:\DEV\git.hub\arduino\WebServer" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu" "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp" -o "C:\Users\grahame.horner\AppData\Local\V.Micro\Arduino\Builds\WebServer\nodemcuv2\WebServer.cpp.o"
:ISO C99 requires whitespace after the macro name [enabled by default]
WebServer.cpp:5:22: fatal error: pgmspace.h: No such file or directory
:#include <pgmspace.h>
:compilation terminated
Error compiling

@grahamehorner
Copy link
Author

is the order of the include path correct?

Core Include Paths
Include Path 'D:\DEV\git.hub\arduino\WebServer'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\variants\nodemcu'

@igrr
Copy link
Member

igrr commented Nov 2, 2015

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino should not be in include paths, not sure why Visual Studio is doing that for you.

It should be C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\cores\esp8266

@grahamehorner
Copy link
Author

@igrr ok, this must be an issue with the current version of the Visualmicro plugin as I've simply created a new Arduino Project and built the project for Arduino 1.6 - NodeMCU 1.0 (ESP-12E Module)

I'll log this as an issue; with the Visualmicro plugin; include paths need to be set according to the target platform and therefore changed at build time not set at the time of create a new project.

@asetyde
Copy link

asetyde commented Nov 2, 2015

Which version of visual micro ?

Sent from my iPhone

On 02 nov 2015, at 16:44, Grahame Horner notifications@github.com wrote:

@igrr ok, this must be an issue with the current version of the Visualmicro plugin as I've simply created a new Arduino Project and built the project for Arduino 1.6 - NodeMCU 1.0 (ESP-12E Module)


Reply to this email directly or view it on GitHub.

@grahamehorner
Copy link
Author

@igrr issue logged @asetyde 1510.30.0 - 31/10/2015

@asetyde
Copy link

asetyde commented Nov 2, 2015

I'm same version , I found some problems of cleaning files . You can uninstall and try to use old version end October .
My work , therefore something not work, I remember there are a tool to clean visual micro

Sent from my iPhone

On 02 nov 2015, at 17:10, Grahame Horner notifications@github.com wrote:

@igrr issue logged @asetyde 1510.30.0 - 31/10/2015


Reply to this email directly or view it on GitHub.

@grahamehorner
Copy link
Author

@asetyde I've done a fresh install on a VM of Windows10 with VS2015 and AtmelStudio 7 with a version of Visualmicro from end oct. both VS2015 and AtmelStudio have the same issue, if I remove the C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\Arduino path from the directory list, it automatically gets re-added?

Also if I add the directory C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0\cores\esp8266 and make sure it appears above the ...\avr\cores.. path it automatically gets removed?!

@VisualMicro
Copy link

Hi,

Sorry for the confusion. There seems to be a bug if both a Board Manager core is installed and also a core has been installed into C:\Program Files (x86)\Arduino\hardware...

You should only need to use one of them so either uninstall the Board Manager version or remove C:\Program Files (x86)\Arduino\hardware\esp8266-1.6.5-947\esp8266-1.6.5-947-g39819f0

Of course this bug will be fixed in a future update but the instruction above will correct the problem in the short term.

If you want to keep the non-board manager version then why not install it into MyDocuments\Arduino\Hardware which is a better alternative to the Ide\Hardware folder. It's cleaner because it isn't dependant on Arduino ide version. You can upgrade in the future or have two versions of the Ide installed yet your core will be available for both. MyDocuments\Hardware is an officially support Arduino location so you remain within the Arduino eco system.

Thanks

ps: from your report I see the Board Manager version is installed here C:\Users\grahame.horner\AppData\Roaming\arduino15\packages\esp8266\

@igrr igrr closed this as completed Nov 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants