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

"avr/pgmspace.h: No such file or directory" on ESP8266. #377

Closed
R0dri opened this issue Jun 13, 2018 · 2 comments
Closed

"avr/pgmspace.h: No such file or directory" on ESP8266. #377

R0dri opened this issue Jun 13, 2018 · 2 comments

Comments

@R0dri
Copy link

R0dri commented Jun 13, 2018

I am using this library together with my NodeMCU and other ESP8266-12 modules.
But the library/compiler throws the following error: "fatal error: avr/pgmspace.h: No such file or directory".

I found the following solution:

at ros.h I replaced

#include <avr\pgmspace.h>

with

#if (defined(AVR))
#include <avr\pgmspace.h>
#else
#include <pgmspace.h>
#endif

This solution was suggested by: https://github.com/SodaqMoja/Sodaq_DS3231/issues/5 having a similar issue with another library.

I am still getting error, this is the Arduino output console:

Arduino:

1.8.5 (Mac OS X), TD: 1.42, Board: "Generic ESP8266 Module, 80 MHz, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

WARNING: library Rosserial_Arduino_Library claims to run on (avr) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).
In file included from /Users/rodri/Documents/Arduino/libraries/Rosserial_Arduino_Library/src/ros/node_handle.h:43:0,
from /Users/rodri/Documents/Arduino/libraries/Rosserial_Arduino_Library/src/ros.h:38,
from /var/folders/kz/pqrn72016518fys3qx9_qh3m0000gp/T/arduino_modified_sketch_74395/pubsub.pde:6:
/Users/rodri/Documents/Arduino/libraries/Rosserial_Arduino_Library/src/rosserial_msgs/RequestParam.h:12:19: error: rosserial_msgs::REQUESTPARAM causes a section type conflict with __c
static const char REQUESTPARAM[] PROGMEM = "rosserial_msgs/RequestParam";
^
In file included from /Users/rodri/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/Arduino.h:255:0,
from sketch/pubsub.pde.cpp:1:
/Users/rodri/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.1/cores/esp8266/pgmspace.h:16:51: note: '__c' was declared here
#define PSTR(s) (extension({static const char __c[] PROGMEM = (s); &__c[0];}))
^
/Users/rodri/Documents/Arduino/libraries/Rosserial_Arduino_Library/src/std_msgs/Empty.h:34:35: note: in expansion of macro 'PSTR'
const char * getMD5(){ return PSTR( "d41d8cd98f00b204e9800998ecf8427e" ); };
^
exit status 1
Error compiling for board Generic ESP8266 Module.

@romainreignier
Copy link
Contributor

romainreignier commented Jun 13, 2018 via email

@R0dri
Copy link
Author

R0dri commented Jun 14, 2018

I'm sorry, you where right. I tried to use the libraries imported by the Arduino IDE library manager. Just downloaded and compiled from source and it worked flawlessly.

@R0dri R0dri closed this as completed Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants