These are chat archives for esp8266/Arduino

29th
Oct 2015
kathir1951
@kathir1951
Oct 29 2015 03:18
@Juppit and all while buildong Arduino from source i got following error " <use of'-' as an identifier not be support ed in release after java SE 8 " I am using JDK 8 Further the scrips hangs in [get] . I am using cygwin with make wget git ant gcc nano Can any one help me
Luc
@luc-github
Oct 29 2015 04:52
@igrr thanks a lot ! big change and big improvement!!!
Dmitry Kireev
@kireevco
Oct 29 2015 05:09
@igrr thank you!
kathir1951
@kathir1951
Oct 29 2015 06:41
@igrr pl take a point Arduino ide to compile native c code of ESP8266 ALSO. This will help those who want to use native c codes in ARDUINO IDE platformP
Ivan Grokhotkov
@igrr
Oct 29 2015 06:45
Arduino does compile C code. I'm not sure I understood your question.
Dmitry Kireev
@kireevco
Oct 29 2015 07:32
@igrr hey, do you remember any issues with __gmpz_initfrom gmp when building mpfr?
Ivan Grokhotkov
@igrr
Oct 29 2015 07:43
i would check if --with-gmp=$XTBP/gmp argument to MPFR configure contains the correct path
i.e. if GMP really got installed there
Dmitry Kireev
@kireevco
Oct 29 2015 07:45
yeah, seems that the config attribute is correct… weird
Ivan Grokhotkov
@igrr
Oct 29 2015 07:46
can you upload config.log to see the actual gcc invocation?
Dmitry Kireev
@kireevco
Oct 29 2015 07:47
yes, I»m running it again, let’s see
Ivan Grokhotkov
@igrr
Oct 29 2015 07:48
are you running it with mingw or cygwin?
Dmitry Kireev
@kireevco
Oct 29 2015 07:48
mingw64
(thank you for your time, by the way)
Ivan Grokhotkov
@igrr
Oct 29 2015 07:48
ok, i think i had mingw (not 64)
np
Dmitry Kireev
@kireevco
Oct 29 2015 07:49
im using one from here https://chocolatey.org/packages/mingw
config.log sorry
Ivan Grokhotkov
@igrr
Oct 29 2015 07:54
configure:15530: checking for __gmpz_init in -lgmp
configure:15555: cc -std=gnu99 -o conftest.exe -Wall -Wmissing-prototypes -Wpointer-arith -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium4 -march=pentium4 -ffloat-store  -I/c/Users/User/packages/xtensa-lx106-elf/build/gmp/include  -L/c/Users/User/packages/xtensa-lx106-elf/build/gmp/lib conftest.c -lgmp   >&5
configure:15555: $? = 0
configure:15564: result: yes
worked this time?
Dmitry Kireev
@kireevco
Oct 29 2015 07:54
haha, wait…
autoconf found it, waiting for actual linking
xgettext crashes… crap..
Ivan Grokhotkov
@igrr
Oct 29 2015 07:59
like, segfaults?
Dmitry Kireev
@kireevco
Oct 29 2015 07:59
xgettext application was unable to start
clicked «ok» .. waiting
(but got «xgettext found:no )
kathir1951
@kathir1951
Oct 29 2015 08:03
@igrr I tried using extern C . It is possible in Main sketch only. If we include so many files using extern C Compiler gives error . So If I want to include additional c files I generated lib files and included in the lib folder of the SDK
@igrr We cannot do directly
Dmitry Kireev
@kireevco
Oct 29 2015 08:05
I’ll replace xgettext with gettext
let’s see what happens
ah, didn’t find xgettext, apparently it’s different from gettext
Dmitry Kireev
@kireevco
Oct 29 2015 08:11
feels like some environment issue...
Ivan Grokhotkov
@igrr
Oct 29 2015 08:24
@kathir1951 i think what you need to do is troubleshoot the error which is reported by compiler. C files are compiled within the sketch folder just fine. if you share the sketch which is giving you an error, and full compiler output, i may be able to assist.
@kireevco i'm sure i didn't have that kind of issue
@kathir1951 basically Arduino runs C or C++ compiler on all input c and cpp files, so there's little difference in compiling C files into a static library in linking the library later. You might be running in some environment issue, i.e. different paths/compiler options/something else.
My suggestion is to engage the exact errors which you encounter, instead of jumping to conclusion that there's something which intrinsically doesn't work.
Dmitry Kireev
@kireevco
Oct 29 2015 08:29
@igrr no worries, if it worked for you, it should work for me some day :-D Thank you!!!
kathir1951
@kathir1951
Oct 29 2015 08:34
@igrr If it so how the main sketch gives compiles successfully. I n the include files at the starting of extern "C " { #include osapi.h .. etc} compiler generating error So I converted all include c files as lib files and included it in SDK lib files . I got succesful . Generated bin files are only 50% of size compared to the size of bin files generated using Arduino libraries
Ivan Grokhotkov
@igrr
Oct 29 2015 08:38
can you share the example which is giving you the error?
also, what is the error reported by the compiler?
kathir1951
@kathir1951
Oct 29 2015 08:57
@igrr sure I post later
kathir1951
@kathir1951
Oct 29 2015 09:03
@igrr Since I changed the environment using lib files I have to revert back to original environment to post the error So I post later . I generated libuart , liblcd and libesphttpd and i am using in the present environment
@igrr Thanks to assist in right way
Ivan Grokhotkov
@igrr
Oct 29 2015 09:11
@luc-github i thought about changing FS::info method you introduced to return a structure similar to statvfs structure
this way we can introduce additional fields in the future, without changing function signature
since FS::info isn't yet documented in reference, would you be okay with such a change?
Me No Dev
@me-no-dev
Oct 29 2015 09:12
I opt for that too
spiffs can give more stats than that
like deleted pages and so on
Ivan Grokhotkov
@igrr
Oct 29 2015 09:13
right, that's the idea.
girish kolte
@koltegirish
Oct 29 2015 10:34

Hello Guys,
When I try to compile code using Mesh lib using ESP8266 it shows following error .Any guest how to resolve it?What will be the issue?
AR build/test_app.a
LD build/test.out
c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function user_uart_wait_tx_fifo_empty': (.irom0.text+0x598): undefined reference touser_init'
c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function user_rf_pre_init': (.irom0.text+0x804): undefined reference touser_init'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: * [build/test.out] Error 1
C:/Users/ABC/worksorg/mesh/Makefile:187: recipe for target 'build/test.out' failed

11:33:15 Build Finished (took 1s.242ms)

Ivan Grokhotkov
@igrr
Oct 29 2015 10:36
is this done using Arduino?
girish kolte
@koltegirish
Oct 29 2015 10:36
no
Ivan Grokhotkov
@igrr
Oct 29 2015 10:37
ok, this discussion group here is related to the Arduino core for ESP8266
perhaps you can ask on the esp8266.com forum
it looks like your code doesn't seem to have user_init function
girish kolte
@koltegirish
Oct 29 2015 10:38
sorry for posting
Ivan Grokhotkov
@igrr
Oct 29 2015 10:38
but without seeing the actual code this is just a blind guess
girish kolte
@koltegirish
Oct 29 2015 10:38
it is there in my code still it shows error
can i post code now
Ivan Grokhotkov
@igrr
Oct 29 2015 10:40
if you could post complete build output to pastebin that would be good
girish kolte
@koltegirish
Oct 29 2015 10:49
I posted on pastebin have alook http://pastebin.com/Gt7X5RsK
Ivan Grokhotkov
@igrr
Oct 29 2015 10:49
please run make clean all
girish kolte
@koltegirish
Oct 29 2015 10:50
already done
Ivan Grokhotkov
@igrr
Oct 29 2015 10:50
and the output is?
i see you run mingw32-make.exe -f C:/Users/abc/worksorg/mesh/Makefile all
can you please post output of mingw32-make.exe -f C:/Users/abc/worksorg/mesh/Makefile clean all
girish kolte
@koltegirish
Oct 29 2015 10:52

16:21:32 Build of configuration Release for project mesh
mingw32-make.exe -f C:/Users/abc/worksorg/mesh/Makefile clean all
AR build/test_app.a
LD build/test.out
c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function user_uart_wait_tx_fifo_empty': (.irom0.text+0x5a0): undefined reference touser_init'
c:/Espressif/ESP8266_SDK/lib\libmain.a(app_main.o): In function user_rf_pre_init': (.irom0.text+0x836): undefined reference touser_init'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: * [build/test.out] Error 1
C:/Users/abc/worksorg/mesh/Makefile:187: recipe for target 'build/test.out' failed

16:21:33 Build Finished (took 1s.342ms)

Ivan Grokhotkov
@igrr
Oct 29 2015 10:52
as you see from the output, no C files are compiled
which explains why user_init is not found by the linker
there's something wrong with your makefile
girish kolte
@koltegirish
Oct 29 2015 10:54
but i used makefile which is provided by espressif
all example compiles except this one
Ivan Grokhotkov
@igrr
Oct 29 2015 10:54
I have never used that personally, so can't comment on that
girish kolte
@koltegirish
Oct 29 2015 10:55
k no problem but thanks for trying to solve my issue
Ivan Grokhotkov
@igrr
Oct 29 2015 10:56
you can check that it's not compiled by adding some gibberish to it. if the compiler doesn't complain, it means that the file wasn't compiled at all
girish kolte
@koltegirish
Oct 29 2015 10:58
k
Raymond Ellis
@RaymondEllis
Oct 29 2015 11:00
Hello, I have been using the stable release. Is it actually more stable than staging or latest git?
I keep running into bugs like, servos need to be detached to change AP or STA, strtol(witch is fixed on the repo)
Ivan Grokhotkov
@igrr
Oct 29 2015 11:07
'stable' and 'staging' are synonyms to 'old' and 'new'
the reason 'new' has not yet replaced 'old' is that it contains some experimental functionality, like file system and TLS library
Raymond Ellis
@RaymondEllis
Oct 29 2015 11:12
ok
Thanks
Dmitry Kireev
@kireevco
Oct 29 2015 12:59
@igrr any thoughts? http://pastebin.com/D0tHqDfi (??#error can not find uint64_t type)
plugin-api.c:

struct ld_plugin_symbol
{
  char *name;
  char *version;
  int def;
  int visibility;
  uint64_t size;
  char *comdat_key;
  int resolution;
};
something is wrong with uint64_t type…
Ivan Grokhotkov
@igrr
Oct 29 2015 13:07
#ifdef HAVE_STDINT_H
#include <stdint.h>
#elif defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#endif
#include <sys/types.h>
#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && \
    !defined(UINT64_MAX) && !defined(uint64_t)
#error can not find uint64_t type
#endif
Dmitry Kireev
@kireevco
Oct 29 2015 13:07
$gcc -dumpmachine
i686-pc-msys
Ivan Grokhotkov
@igrr
Oct 29 2015 13:07
looks like HAVE_STDINT_H isn't defined for some reason
is this in binutils?
Dmitry Kireev
@kireevco
Oct 29 2015 13:08
i’m testing my gcc and it appears to be 32 bit
if I’m reading it correctly
Ivan Grokhotkov
@igrr
Oct 29 2015 13:09
so is mine, but even 32 bit gcc should know uint64_t
i would check config.log and search for something like "checking for stdint.h"
Dmitry Kireev
@kireevco
Oct 29 2015 13:09
ok, thank you. I’ll get back
Ivan Grokhotkov
@igrr
Oct 29 2015 13:09
and see if it failed for some reason
Dmitry Kireev
@kireevco
Oct 29 2015 13:38
@igrr binutils doesn’t check for stdint.h.
 gcc -v
Reading specs from /usr/lib/gcc/i686-pc-msys/3.4.4/specs
Configured with: /home/cstrauss/build/gcc3/gcc-3.4.4/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/share/info --mandir=/share/man --libexecdir=/lib --enable-languages=c,c++ --disable-nls --enable-threads=posix --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug --with-newlib
Thread model: posix
gcc version 3.4.4 (msys special)
@igrr is gcc too old?
Ivan Grokhotkov
@igrr
Oct 29 2015 13:41
i would expect it to be at least 4.something
Dmitry Kireev
@kireevco
Oct 29 2015 13:41
strange, it was a default one… let’s retry
(update and retry)
Ivan Grokhotkov
@igrr
Oct 29 2015 13:41
however i'm not mingw guru, so not sure
i can't check which one i have used at the moment
Dmitry Kireev
@kireevco
Oct 29 2015 13:42
no worries. thanks for your participation in the discussion
:)
Ivan Grokhotkov
@igrr
Oct 29 2015 13:43
oh wait i can
RDP to the rescue
Dmitry Kireev
@kireevco
Oct 29 2015 13:43
well… 3.x is very old, imho
question is WHY did my mingw-get install a wrong onw
Ivan Grokhotkov
@igrr
Oct 29 2015 13:44
i was using 4.8.1
i got it from mingw package manger GUI
Dmitry Kireev
@kireevco
Oct 29 2015 13:45
wait… there is a gui?:-D
Ivan Grokhotkov
@igrr
Oct 29 2015 13:45
yeah, looks like the one pictured here: https://blog.cs.wmich.edu/mingw-setup-guide/
Dmitry Kireev
@kireevco
Oct 29 2015 13:50
$ where gcc
c:\tools\mingw64\msys\1.0\bin\gcc.exe
c:\tools\mingw64\bin\gcc.exe
hehe… stupid msys
User@build-win7-03 ~/User/packages/xtensa-lx106-elf
$ /c/tools/mingw64/msys/1.0/bin/gcc.exe -v
Reading specs from /usr/lib/gcc/i686-pc-msys/3.4.4/specs
Configured with: /home/cstrauss/build/gcc3/gcc-3.4.4/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/share/info --mandir=/share/man --libexecdir=/lib --enable-languages=c,c++ --disable-nls --enable-threads=posix --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug --with-newlib
Thread model: posix
gcc version 3.4.4 (msys special)

User@build-win7-03 ~/User/packages/xtensa-lx106-elf
$ /c/tools/mingw64/bin/gcc.exe -v
Using built-in specs.
COLLECT_GCC=c:\tools\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/tools/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.3/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.8.3/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw483/x86_64-483-posix-seh-rt_v3-rev0/mingw64 --with-gxx-include-dir=/mingw64/x86_64-w64-mingw32/include/c++ --enable-shared --enable-static --disable-multilib --enable-languages=ada,c,c++,fortran,objc,obj-c++,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw483/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw483/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw483/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw483/prerequisites/x86_64-w64-mingw32-static --with-cloog=/c/mingw483/prerequisites/x86_64-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=http://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -I/c/mingw483/x86_64-483-posix-seh-rt_v3-rev0/mingw64/opt/include -I/c/mingw483/prerequisites/x86_64-zlib-static/include -I/c/mingw483/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/c/mingw483/x86_64-483-posix-seh-rt_v3-rev0/mingw64/opt/include -I/c/mingw483/prerequisites/x86_64-zlib-static/include -I/c/mingw483/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/c/mingw483/x86_64-483-posix-seh-rt_v3-rev0/mingw64/opt/lib -L/c/mingw483/prerequisites/x86_64-zlib-static/lib -L/c/mingw483/prerequisites/x86_64-w64-mingw32-static/lib'

Thread model: posix
gcc version 4.8.3 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

User@build-win7-03 ~/User/packages/xtensa-lx106-elf
mingw is f**d up… reinstalling
way too much msys overlaps.. gcov,cpp, etc
or maybe chaning path order will help, lets try
Luc
@luc-github
Oct 29 2015 15:13
@igrr Sorry just back, no issue at all - I did this way to be same as SPIFFS function but - if can be better I have no concern
sticilface
@sticilface
Oct 29 2015 17:10
In the WiFi lib, if you set any values using config the flag ' _useStaticIp = true; ' is set. is there anyway to go back to dhcp afterwards without a restart, can't seem to find a way.
Dmitry Kireev
@kireevco
Oct 29 2015 20:52
@igrr thank you for your help. I was able to build a compiler.
Ivan Grokhotkov
@igrr
Oct 29 2015 21:17
cool, is it for win32 or 64?
Dmitry Kireev
@kireevco
Oct 29 2015 21:17
this one is 32
Ivan Grokhotkov
@igrr
Oct 29 2015 21:17
i figured out we also need to update the toolchain here — newlib seems to be missing sqrt
only on windows
i wonder if i can just copy libm.a from linux toolchain...
Dmitry Kireev
@kireevco
Oct 29 2015 21:18
I need to add 64 bit compiler and set host, I guess
@igrr i don’t think it will work...
but it’s worth trying
Dmitry Kireev
@kireevco
Oct 29 2015 21:24
I will test the whole script from a bare bones machine