Cannot Compile on Arduino IDE

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
espeeder
Normal user
Posts: 5
Joined: 27 Mar 2016, 22:04

Cannot Compile on Arduino IDE

#1 Post by espeeder » 27 Mar 2016, 22:09

Hello! I found this framework some days ago and today I felt like trying it. But I have a problem compiling it. The error is pretty big. It's not finding the functions declared in all the other files. (setup() is in ESPEasy.ino and SpiffsSectors() is in misc. But as it compiles the files from left to right, it doesn't find it when compiling ESPEasy.ino)

ESPEasy_R78/Source/ESPEasy/ESPEasy.ino: In function 'void setup()':
ESPEasy:361: error: 'SpiffsSectors' was not declared in this scope
if (SpiffsSectors() == 0)
^
ESPEasy:372: error: 'emergencyReset' was not declared in this scope
emergencyReset();
^

(And much more)

What should I do?

Thanks!

costo
Normal user
Posts: 490
Joined: 21 Nov 2015, 15:03

Re: Cannot Compile on Arduino IDE

#2 Post by costo » 28 Mar 2016, 02:14


espeeder
Normal user
Posts: 5
Joined: 27 Mar 2016, 22:04

Re: Cannot Compile on Arduino IDE

#3 Post by espeeder » 28 Mar 2016, 12:30

costo wrote:Did you read this tutorial ?
http://www.esp8266.nu/index.php/Tutoria ... are_Upload
Yes I did. Anyway, by the nature of the Arduino compiler I find logic that it doesn't work. When compiling a project with multiple files, it concatenate them. First it puts the file with the same name as the folder. The rest is in alphabetic order.

So I don't understand how actually you have make it work

costo
Normal user
Posts: 490
Joined: 21 Nov 2015, 15:03

Re: Cannot Compile on Arduino IDE

#4 Post by costo » 28 Mar 2016, 14:31

espeeder wrote:
costo wrote:Did you read this tutorial ?
http://www.esp8266.nu/index.php/Tutoria ... are_Upload
Yes I did. Anyway, by the nature of the Arduino compiler I find logic that it doesn't work. When compiling a project with multiple files, it concatenate them. First it puts the file with the same name as the folder. The rest is in alphabetic order.

So I don't understand how actually you have make it work
Apparently you did not read or understand the tutorial completely.
The part called 'Download ESP Easy Firmware' explains how the libraries are downloaded and installed.

If you still have problems you should show what you have done, what is installed and what exactly all the error messages are. The more information you give , the easyer it is to give you a helpfull answer.

espeeder
Normal user
Posts: 5
Joined: 27 Mar 2016, 22:04

Re: Cannot Compile on Arduino IDE

#5 Post by espeeder » 28 Mar 2016, 16:21

costo wrote:
espeeder wrote:
costo wrote:Did you read this tutorial ?
http://www.esp8266.nu/index.php/Tutoria ... are_Upload
Yes I did. Anyway, by the nature of the Arduino compiler I find logic that it doesn't work. When compiling a project with multiple files, it concatenate them. First it puts the file with the same name as the folder. The rest is in alphabetic order.

So I don't understand how actually you have make it work
Apparently you did not read or understand the tutorial completely.
The part called 'Download ESP Easy Firmware' explains how the libraries are downloaded and installed.

If you still have problems you should show what you have done, what is installed and what exactly all the error messages are. The more information you give , the easyer it is to give you a helpfull answer.
It's not a Library problem. I have them installed and I can use them in other projects.
https://www.dropbox.com/s/iy0ezajl77kq7 ... 2.png?dl=0

The problem is the order of the tabs.
SPEasy/ESPEasy.ino: In function 'void setup()':
ESPEasy:361: error: 'SpiffsSectors' was not declared in this scope
if (SpiffsSectors() == 0)
^
ESPEasy:372: error: 'emergencyReset' was not declared in this scope
emergencyReset();
^
ESPEasy:374: error: 'LoadSettings' was not declared in this scope
LoadSettings();
^
ESPEasy:395: error: 'ResetFactory' was not declared in this scope
ResetFactory();
^
ESPEasy:403: error: 'BuildFixes' was not declared in this scope
BuildFixes();
^
ESPEasy:407: error: 'addLog' was not declared in this scope
addLog(LOG_LEVEL_INFO, log);
^
ESPEasy:413: error: 'WifiAPconfig' was not declared in this scope
WifiAPconfig();
^

espeeder
Normal user
Posts: 5
Joined: 27 Mar 2016, 22:04

Re: Cannot Compile on Arduino IDE

#6 Post by espeeder » 29 Mar 2016, 14:43

Any idea?

costo
Normal user
Posts: 490
Joined: 21 Nov 2015, 15:03

Re: Cannot Compile on Arduino IDE

#7 Post by costo » 29 Mar 2016, 16:08

So it seems you have troubles compiling ESPEasy R078

But ....
you do not say which IDE you are using. 1.65 or 1.68 or another one ?
you do not say which ESP library in the boardmanager you are using 2.0.0 , 2.1.0 or another one ?

User avatar
hilo90mhz
Normal user
Posts: 11
Joined: 29 Mar 2016, 21:21
Location: Hilo, Hawaii
Contact:

Re: Cannot Compile on Arduino IDE

#8 Post by hilo90mhz » 29 Mar 2016, 21:27

Hi, I am having the same problem:

Arduino 1.6.7
ESP8266 community version 2.1.0
R078 source code
Edit- I also just tried with the current source on Github and it has the same issue


The issue does seem to be with Arduino not including files in the correct order, all the functions in the "Misc" file are not available for the main "ESPEasy.ino" at compile time. All the source files are in the same folder in my Arduino directory, and the libraries are installed. They are all visible in the IDE under different tabs when ESPEasy is opened.

Code: Select all

"\Arduino\ESPEasy\ESPEasy.ino: In function 'void setup()':

ESPEasy:363: error: 'SpiffsSectors' was not declared in this scope

   if (SpiffsSectors() == 0)

                     ^

ESPEasy:371: error: 'fileSystemCheck' was not declared in this scope

   fileSystemCheck();

                   ^

ESPEasy:374: error: 'emergencyReset' was not declared in this scope

   emergencyReset();

                  ^

ESPEasy:376: error: 'LoadSettings' was not declared in this scope

   LoadSettings();

                ^

ESPEasy:397: error: 'ResetFactory' was not declared in this scope

     ResetFactory();

                  ^

ESPEasy:405: error: 'BuildFixes' was not declared in this scope

       BuildFixes();

                  ^

ESPEasy:409: error: 'addLog' was not declared in this scope

     addLog(LOG_LEVEL_INFO, log);

                               ^

ESPEasy:415: error: 'WifiAPconfig' was not declared in this scope

     WifiAPconfig();

                  ^

ESPEasy:416: error: 'WifiConnect' was not declared in this scope

     WifiConnect();

                 ^
                 

costo
Normal user
Posts: 490
Joined: 21 Nov 2015, 15:03

Re: Cannot Compile on Arduino IDE

#9 Post by costo » 29 Mar 2016, 21:44

You want to compile the latest stable version R078.

For that you have to follow the instructions as given in http://www.esp8266.nu/index.php/Tutoria ... are_Upload

If you follow the instructions you read there:
Download and install Arduino 1.6.5. from https://www.arduino.cc/en/Main/Software
Launch arduino.exe and select preferences

Enter the URL for additional boards. Currently we use the 2.0.0. stable version so you should enter:
http://arduino.esp8266.com/stable/packa ... index.json

etc etc
if you do so, your can compile R078

espeeder
Normal user
Posts: 5
Joined: 27 Mar 2016, 22:04

Re: Cannot Compile on Arduino IDE

#10 Post by espeeder » 30 Mar 2016, 00:16

costo wrote:You want to compile the latest stable version R078.

For that you have to follow the instructions as given in http://www.esp8266.nu/index.php/Tutoria ... are_Upload

If you follow the instructions you read there:
Download and install Arduino 1.6.5. from https://www.arduino.cc/en/Main/Software
Launch arduino.exe and select preferences

Enter the URL for additional boards. Currently we use the 2.0.0. stable version so you should enter:
http://arduino.esp8266.com/stable/packa ... index.json

etc etc
if you do so, your can compile R078
Can you explain why it should work, despite the fact Arduino compiles in alphabetic order? https://www.reddit.com/r/arduino/commen ... ches_that/

Preferences:
https://www.dropbox.com/s/y4mzi5sk3ljce ... 6.png?dl=0

Libraries:
https://www.dropbox.com/s/89ilifledjr6n ... 8.png?dl=0

costo
Normal user
Posts: 490
Joined: 21 Nov 2015, 15:03

Re: Cannot Compile on Arduino IDE

#11 Post by costo » 30 Mar 2016, 00:40

espeeder wrote:
Can you explain why it should work, despite the fact Arduino compiles in alphabetic order?
Because the tutorial on http://www.esp8266.nu says it does.

User avatar
hilo90mhz
Normal user
Posts: 11
Joined: 29 Mar 2016, 21:21
Location: Hilo, Hawaii
Contact:

Re: Cannot Compile on Arduino IDE

#12 Post by hilo90mhz » 30 Mar 2016, 00:56

costo is right, it does work with Arduino 1.6.5 and ESPCommunity 2.0.0 and R078

It does not work if you use a newer arduino version, or if you use 2.1.0 of ESPcommunity... Or if you use the github code... It only works by following exact instructions AND versions on the tutorial. At least for me.

I'm assuming they will update certain parts to be compatible with the newer Arduino and ESPCommunity code eventually, I do not know enough about the code myself to make it work with them.

Luckily you can have many versions of arduino installed into folders.. I have about 15 different versions installed from various time periods. Just download the Zip version not the installer and extract then run. You can even point them all to the same Arduino folder and the libraries can be installed in that Arduino folder, you do not have to install the libraries local to each one (unless you want to use different library versions too).

costo wrote:
espeeder wrote:
Can you explain why it should work, despite the fact Arduino compiles in alphabetic order?
Because the tutorial on http://www.esp8266.nu says it does.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 18 guests