How to compile code for ATmega8? - now I find I have an ESP01-S

More
6 months 1 week ago #12888 by Ty_Eeberfest

meq123 wrote: I was using a tinyUSB as the programmer and configuring mini core and ATmega8 as the 'board'. But as Ian says, it's a highway to nowhere.

Ian put the matter quite firmly to rest but I tried compiling for mega8 anyway, just for the hell of it. Of course I got the same result as you did.

meq123 wrote: Fortunately, I have (one) spare 328 I can use for this one, so all is not lost. I need to order more 328's, but stocks are low.

Yeah, I was wondering why you wanted to use mega8 instead of just buying some 328P's - they're cheap after all. Then I checked a couple of my favorite domestic suppliers and they don't have any, with lead times showing the likes of 76 weeks out... that's pretty awful! Oh, the follies of "just in time" manufacturing (I call it "too little too late" manufacturing) and globalization (80 ships & counting lingering out in the Channel waiting to get into ports of L.A. and L.B.). Absurd.

Yep, that was a rant :ohmy:

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #12889 by Ian
Hi Mark,

it's not too hard to get an ESP-01S working - you have to remove all reference to the BUILTIN_LED from the code and recompile.

The LED is on the same pin as one of the I2C lines and turning it off and on totally disrupts the I2C communication, and can even hang the controller.

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #12891 by Ty_Eeberfest
Uhm, isn't there a #define somewhere around Line 63 to compile for either ESP01 or ESP01S?

Also. Mark, be sure to read the comments at the top of the source code, especially the part about libraries! Many people have shot themselves in the foot by not using the exact library versions specified.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #12892 by meq123
I'm sure I've said this already, but you guys are HEROES :)

Checking the code, yep, there's a define for ESP-01S and ifndef's around that block writing to the LED. Whoop!

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #12896 by meq123
Please help, I'm dyin' heah...

So I'm still trying to compile the ESP01 code. I tried to follow all the header instruction for reqd versions (I think I got it right), but still getting the following mismatched declaration errors:
In file included from C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/stdio.h:6:0,
                 from C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/stdio.h:63,
                 from C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266/Arduino.h:32,
                 from sketch\WifiTimeProviderESP8266.ino.cpp:1:
C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/sdk/libc/xtensa-lx106-elf/include/sys/pgmspace.h:25:130: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
   #define PROGMEM __attribute__((section( "\".irom.text." __FILE__ "." __STRINGIZE(__LINE__) "."  __STRINGIZE(__COUNTER__) "\"")))
                                                                                                                                  ^
D:\Data\Arduino\libraries\WhareHauoraWiFiManager/WiFiManager.h:25:24: note: in expansion of macro 'PROGMEM'
 const char HTTP_HEAD[] PROGMEM            = "<!DOCTYPE html><html lang=\"en\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/><title>{v}</title>";
                        ^
In file included from D:\Data\Electronic_Projects\Nixie Controller Rev6\Firmware\NixieFirmwareV2_v358_mods\WifiTimeProviderESP8266\WifiTimeProviderESP8266.ino:48:0:
C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WebServer\src/ESP8266WebServer.h:34:39: error: previous declaration of 'HTTPMethod HTTP_HEAD'
 enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
                                       ^
Multiple libraries were found for "WiFiUdp.h"
 Used: C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi
 Not used: C:\Applications\Atmel\Arduino\libraries\WiFi
exit status 1
Error compiling for board Generic ESP8266 Module.

Attached are screenshots of my board and library versions. I 'm even using board version 2.7.4, not the latest 3.x, since that was what was stated in the header.

Thanks.




Attachments:

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #12897 by Ian
The last part of that error message is the bit that counts:
Multiple libraries were found for "WiFiUdp.h"
 Used: C:\Users\bldr\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266WiFi
 Not used: C:\Applications\Atmel\Arduino\libraries\WiFi
exit status 1
Error compiling for board Generic ESP8266 Module.

You have two conflicting definitions, and you need to remove one of them. If you go to "C:\Applications\Atmel\Arduino\libraries\WiFi" and rename the file "WiFiUdp.h" to be something like "WiFiUdp.h.old" then it should compile.

It's not you: Arduino is a mixing bowl for ideas from different places and every now and again, ideas collide and we end up with something like this. The ESP8266 version of the code brings a new definition and it supersedes the much older Arduino base definition.

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.102 seconds
Go to top
JSN Boot template designed by JoomlaShine.com