sticilface / ESP8266-wifi

See Melvanimate: not maintained now.
22 stars 7 forks source link

Unable to compile, missing webpage header files? #1

Closed jonn26 closed 9 years ago

jonn26 commented 9 years ago

Hi, this looks really cool and would like to try it, but am unable to compile it. Tested with the latest esp8266 stable & staging but no dice. I get lots of errors like the following which aren't very helpful.

at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717) at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568) at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777) at java.util.regex.Pattern$Branch.match(Pattern.java:4604)

I noticed in b_inits there are the following includes that I don't see in this repository. I tried commenting them out but I still get the same errors. Maybe if you could try compiling this from a fresh install of the ide it might help track down what I am missing or doing wrong.

include "page_jscolour.h"

include "page_microajax.js.h"

include "page_root.h"

include "page_style.css.h"

sticilface commented 9 years ago

That's weird. I thought I removed that stuff, and the code for it. I will take a look.

Do you have the required extra libs

Neopixelbus - animator branch E131 Pubsubclient

?

sticilface commented 9 years ago

Sorry that should be uartdriven not animator branch.

sticilface commented 9 years ago

It should work now.

There is an additional lib simpletimer https://github.com/infomaniac50/SimpleTimer that you need, i forgot about that one.

I compiled from the fresh staging, with fresh git clones of the libs as well. You need all 4, and you need to

git checkout UartDriven for the neopixelbus.

Let me know if this works now

jonn26 commented 9 years ago

Thanks for the quick reply! I pulled your changes, tried a fresh install of latest arduino 1.6.5-r5, and re-downloaded latest esp8266 staging. Even also tried on a different windows box as well. I made sure to install all 4x libraries and use the UartDriven branch for neopixelbus.

I am still just getting output like the following when compiling. It doesn't fail, but it doesn't progress either (left for 10 minutes or so).

java.util.regex.Pattern$GroupHead.match(Pattern.java:4658) at java.util.regex.Pattern$Loop.match(Pattern.java:4785) at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717) at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568) at java.util.regex.Pattern$CharProperty.match(Pattern.java:3777) at java.util.regex.Pattern$Branch.match(Pattern.java:4604)

Questions:

  1. How long does it usually take to compile for you?
  2. You are using pubsubclient from https://github.com/Imroy/pubsubclient and not https://github.com/knolleary/pubsubclient correct?
  3. Are you using windows?
  4. I renamed the sketch folder to Melvana as that .ino file seemed to be the most logical starting sketch file. Is this how yours is set up as well?
  5. Are you using Board: Generic ESP8266 Module & set to Flash size 4M (3M spiffs)
  6. I am using staging, do I need to uncomment the staging define so it includes fs.h (I tried both ways)
sticilface commented 9 years ago

ok so that is a bit weird. This looks like java errors in the IDE.

Questions:

  1. How long does it usually take to compile for you? - first time ~60seconds, on a 2011 mac air
  2. You are using pubsubclient from https://github.com/Imroy/pubsubclient and not https://github.com/knolleary/pubsubclient correct? - Yes I'm using imroy's
  3. Are you using windows? - No Mac
  4. I renamed the sketch folder to Melvana as that .ino file seemed to be the most logical starting sketch file. Is this how yours is set up as well? mine is exactly the same as the sketch
  5. Are you using Board: Generic ESP8266 Module & set to Flash size 4M (3M spiffs) - yes and 160Mhz CPU, and 80Mz for the flash.
  6. I am using staging, do I need to uncomment the staging define so it includes fs.h (I tried both ways) - it should just work, even with those

I'm going to suggest that you download this zip, and place the portable folder it makes into your arduino application folder inside the the Arduino folder... now when you start the IDE, it should be like a fresh install, but it will use everything inside this portable folder, so all the libs, all the esp stuff... give it a go. I'm installing the IDE in a windows VM, so I will try as well.

https://dl.dropboxusercontent.com/u/12627633/portable.zip

my arduino folder in windows is c:\Program files (x86)\Arduino\

UPDATE...

tried it on my windows VM and it does what you say. Kinda weird. I'll look into it...

Update no 2

Just completely ignore me and my advice... i've just recommended you download mac binaries... and put them on windows... fail... sorry... i'll post some windows one soon

sticilface commented 9 years ago

I get the same error. Looking into this this is some weird thing with the arduino IDE and making cpp files from ino, maybe because I'm using F macro to store strings in flash not ram.

see this issue https://github.com/esp8266/Arduino/issues/222

Not really sure how to get round this...

igrr commented 9 years ago

Try moving your F-strings into a separate .h file, then include this .h file from your .ino. https://github.com/esp8266/Arduino/issues/222#issuecomment-103373309

sticilface commented 9 years ago

mmm... ok.. that is going to be a little tricky! they are everywhere. I will give it a go! Why does this error seem to be specific to the windows IDE?

sticilface commented 9 years ago

@jonn26 Ok, try now. i've moved all the F() to PROGMEM and placed in a .h file. It now compiles on my Arduino IDE running on windows.

jonn26 commented 9 years ago

Yep, am able to compile now thanks!