These are chat archives for esp8266/Arduino

13th
Jun 2016
gonsays
@gonsays
Jun 13 2016 00:42
hey guys, can I use an RGB LED on all GPIOs or because the PWM is for GPIO12,13 and 14 I can only assign an RGB LED to those?
Ivan Grokhotkov
@igrr
Jun 13 2016 02:21
@everslick if you post your build script/makefile somewhere i may be able to help you find the issue
Ivan Grokhotkov
@igrr
Jun 13 2016 05:26
@gonsays PWM is available on all GPIOs, except for the ones used for flash chip of course (6-11)
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:06
@igrr: thanks for the offer, I wouldn't dare to ask ... ;-)
i could imagine, it is related to the order of flags, libs or include paths
i have seen there are two versions of libstdc++.a in the search path
Ivan Grokhotkov
@igrr
Jun 13 2016 06:09
what about the exact error message you are seeing?
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:18
Linking /tmp/genesys/genesys.bin
  Versions: 6552ffd-dirty, 2.3.0-rc1-49-g90bbec9
/home/clemens/Devel/ESP8266/Arduino/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/home/clemens/Devel/ESP8266/Arduino/tools/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: cannot find _vectors.o: No such file or directory
collect2: error: ld returned 1 exit status
Makefile:279: recipe for target '/tmp/genesys/genesys.bin' failed
make: *** [/tmp/genesys/genesys.bin] Error 1
this is if i remove -nostdlib from the linker flags. with -nostdlib i have many, many unresoved symbols like fputs, write, aso
Ivan Grokhotkov
@igrr
Jun 13 2016 06:19
I got as far as running make, got the following:
mqtt.cpp:34:8: error: 'MQTT' does not name a type
 static MQTT *mqtt = NULL;
        ^
mqtt.cpp: In function 'void mqtt_connected_cb()':
mqtt.cpp:42:3: error: 'mqtt' was not declared in this scope
   mqtt->subscribe(t);
   ^
(more mqtt errors skipped)
setting DEFAULT_MQTT_ENABLED to 0 doesn't help
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:21
because you miss:
the defines are only the runtime defaults, not for build :-(
i could make MQTT optional, to make you life easier
Ivan Grokhotkov
@igrr
Jun 13 2016 06:24
I'm not sure why I miss them, i got them right where your readme suggests:
[igrokhotkov@localhost /tmp/esp8266/genesys]$ ls -1 /tmp/esp8266/Arduino/libraries
ArduinoOTA
DNSServer
EEPROM
ESP8266AVRISP
ESP8266HTTPClient
ESP8266HTTPUpdateServer
ESP8266SSDP
ESP8266WebServer
ESP8266WiFi
ESP8266WiFiMesh
ESP8266httpUpdate
ESP8266mDNS
ESPAsyncTCP
ESPAsyncWebServer
Ethernet
GDBStub
Hash
SD
SPI
Servo
TFT_Touch_Shield_V2
Ticker
Wire
esp-mqtt-arduino
esp8266
And I have ESP_ROOT = /tmp/esp8266/Arduino in Makefile.config
Oh I know the reason
you have #include <MQTT.h> and #include "mqtt.h"
on OS X the one in current folder is picked up in both cases, because filesystem is not case sensitive
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:29
argl. then just rename mqtt.h and mqtt.cpp to something else
in my repo
Ivan Grokhotkov
@igrr
Jun 13 2016 06:29
yep, that's what i'm doing now :)
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:29
:-D
i should change that then for the apple people though
Ivan Grokhotkov
@igrr
Jun 13 2016 06:40
can i make your makefile print the actual commands?
to see the order of libraries on the linker command line
ah sorry, dumb me
got that
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:45
BUILD_SILENTLY = 0
Clemens Kirchgatterer
@everslick
Jun 13 2016 06:57
@igrr you can reproduce my linking errors?
Ivan Grokhotkov
@igrr
Jun 13 2016 06:59
Yes, i'll push a workaround in a couple of minutes
it seems that it's easier to remove some stuff from libstdc++ in advance rather make everyone fix libraries order
Done, that seems to fix the issue for me. Oh, and you need -nostdlib in your makefile
-LD_FLAGS     += -w $(OPTIMIZE) -Wl,--no-check-sections -u call_user_start -Wl,-static -L$(SDK_ROOT)/lib -L$(SDK_ROOT)/ld -T$(FLASH_LAYOUT) -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy -Wl,-wrap,malloc -Wl,-wrap,calloc -Wl,-wrap,realloc -Wl,-wrap,free
+LD_FLAGS     += -w $(OPTIMIZE) -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -L$(SDK_ROOT)/lib -L$(SDK_ROOT)/ld -T$(FLASH_LAYOUT) -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy -Wl,-wrap,malloc -Wl,-wrap,calloc -Wl,-wrap,realloc -Wl,-wrap,free
Ivan Grokhotkov
@igrr
Jun 13 2016 07:10
let me know if anything else pops up
Clemens Kirchgatterer
@everslick
Jun 13 2016 07:12
great! yeah, removing -nostdlib just made the error "smaller" ;-) hehe
thanks a thousand!
i'm already curious about your solution... ;-)
Ivan Grokhotkov
@igrr
Jun 13 2016 07:19
basically, remove a bunch of functions from libstdc++ which we have reimplemented: https://github.com/esp8266/Arduino/blob/fc80526ebff93bd3aa42f6e046d28dc111863e98/tools/sdk/lib/README.md#updating-libstdc
Clemens Kirchgatterer
@everslick
Jun 13 2016 07:35
IC
works for me
thx!
Russ Mathis
@RussMathis
Jun 13 2016 18:45
Is it possible to use WIFI_AP_STA and have separate servers running at the same time? I would like the AP side on a different IP than the STA side. That way my configurations portal is always available even if station can not connect to a router??
Instead of the configuration management only being available if the device could not connect to the default wifi router, I would like the configuration management pages to be available regardless if the STA could attach or not.
Clemens Kirchgatterer
@everslick
Jun 13 2016 18:54
i have exactly this, without different servers.
the same server serves the same pages, regardless of the browser connecting via AP or STA
@igrr since the wifi event refactoring, the old event callback is not called anymore. i think it should still work even though it is marked deprecated. no?
Russ Mathis
@RussMathis
Jun 13 2016 19:02
@everslick , can AP and STA have different IPs?
Clemens Kirchgatterer
@everslick
Jun 13 2016 19:02
yes
Russ Mathis
@RussMathis
Jun 13 2016 19:03
Can I get an example of how your accomplishing the configuration please?
Clemens Kirchgatterer
@everslick
Jun 13 2016 19:03
i can point you at my repo
Russ Mathis
@RussMathis
Jun 13 2016 19:04
cool, thx!
i think you mean that
Russ Mathis
@RussMathis
Jun 13 2016 19:04
@everslick , thank you lots!
Clemens Kirchgatterer
@everslick
Jun 13 2016 19:04
yaw
Russ Mathis
@RussMathis
Jun 13 2016 19:41
@everslick , I'm trying to use your WIFI_AP_STA technique with the ESP8266Webserver object, so I can bind to pages with server.on(.., but when I try to access the AP side the page never responds back? Do I need to tie some event to the ESP8266Webserver object?
Russ Mathis
@RussMathis
Jun 13 2016 20:18
@everslick , figured it out thanks!