Post links and attach files for documentation here, also chat about these docs freely

User avatar
By kolban
#31426 @cottsak
I'd like to use this thread for discussion about content of the book as opposed to get into technical chit chat. Can I suggest that you create a new forum post on one of the tech forums at this site to discuss the technical goal you are trying to achieve and then we can discuss that with a good heading for the topic. Others will also be interested to contribute.
User avatar
By Shubham Jain
#31478 Dear Mr. Kolban,

We are using ESP-07 with CP2102.

I installed the eclipse Mars with ESP8266 support and Arduino IDE v 1.6.5 with ESP8266 pkg. Then I installed the stable Windows product bundlr from http://eclipse.baeyens.it/index.html because all other possible downloads from this website were failing because unexpected end of archive.

Then I had to create A.RUNTIME.TOOLS.XTENSA-LX106-ELF-GCC.PATH environment var in the downloaded eclipseArduino as C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc

Then on compiling, I got the following error.
--------------------------------------------------------------------
"C:\\MinGW\\bin\\mingw32-make" all
'Building file: ../Test1.cpp'
'Starting C++ compile'
"C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165-r5 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_1.6.5-947-G39819F0 -DESP8266 -I"C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266" -I"C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\variants\generic" -MMD -MP -MF"Test1.cpp.d" -MT"Test1.cpp.d" -D__IN_ECLIPSE__=1 -x c++ "../Test1.cpp" -o "Test1.cpp.o" -Wall
<command-line>:0:15: warning: ISO C99 requires whitespace after the macro name [enabled by default]
In file included from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/Arduino.h:38:0,
from ../Test1.cpp:1:
C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/esp8266_peri.h:24:21: fatal error: c_types.h: No such file or directory
#include "c_types.h"
^
compilation terminated.
subdir.mk:18: recipe for target 'Test1.cpp.o' failed
mingw32-make: *** [Test1.cpp.o] Error 1

10:15:45 Build Finished (took 532ms)
-------------------------------------------------------------

Now, when I added C:\Espressif\ESP8266_SDK\include to the include directories for C and C++ both, I got

--------------------------------------------------------------
"C:\\MinGW\\bin\\mingw32-make" all
'Building file: ../Test1.cpp'
'Starting C++ compile'
"C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/tools/sdk//include" -c -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -DF_CPU=80000000L -DARDUINO=165-r5 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_1.6.5-947-G39819F0 -DESP8266 -I"C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266" -I"C:\Espressif\ESP8266_SDK\include" -I"C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\variants\generic" -MMD -MP -MF"Test1.cpp.d" -MT"Test1.cpp.d" -D__IN_ECLIPSE__=1 -x c++ "../Test1.cpp" -o "Test1.cpp.o" -Wall
<command-line>:0:15: warning: ISO C99 requires whitespace after the macro name [enabled by default]
In file included from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/esp8266_peri.h:24:0,
from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/Arduino.h:38,
from ../Test1.cpp:1:
C:\Espressif\ESP8266_SDK\include/c_types.h:15:29: error: conflicting declaration 'typedef long unsigned int uint32_t'
typedef unsigned long uint32_t;//Shubham commented
^
In file included from c:\users\shubham\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\lib\gcc\xtensa-lx106-elf\4.8.2\include\stdint.h:9:0,
from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/Arduino.h:28,
from ../Test1.cpp:1:
c:\users\shubham\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\xtensa-lx106-elf\include\stdint.h:81:22: error: 'uint32_t' has a previous declaration as 'typedef unsigned int uint32_t'
typedef unsigned int uint32_t;
^
In file included from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/esp8266_peri.h:24:0,
from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/Arduino.h:38,
from ../Test1.cpp:1:
C:\Espressif\ESP8266_SDK\include/c_types.h:18:29: error: conflicting declaration 'typedef long int int32_t'
typedef signed long int32_t;//Shubham commented
^
In file included from c:\users\shubham\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\lib\gcc\xtensa-lx106-elf\4.8.2\include\stdint.h:9:0,
from C:\Users\Shubham\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-947-g39819f0\cores\esp8266/Arduino.h:28,
from ../Test1.cpp:1:
c:\users\shubham\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9\xtensa-lx106-elf\include\stdint.h:80:20: error: 'int32_t' has a previous declaration as 'typedef int int32_t'
typedef signed int int32_t;
^
subdir.mk:18: recipe for target 'Test1.cpp.o' failed
mingw32-make: *** [Test1.cpp.o] Error 1

10:23:58 Build Finished (took 468ms)

--------------------------------------------------------------

Now if I change the long to int or int to long in the corresponding files for removing the error, I get into different errors.

What should I do to remove the error?

Our aim is to use the latest mesh library of Espressif on Arduino IDE if possible. We are able to use it on Eclipse but not on Arduino IDE.

Please reply.

Thanking you,
Yours sincerely,
Shubham Jain
User avatar
By lakid
#31510 @Shubham Jain
This is the wrong place for this question (create a new topic)
To fix your problem find the c_types.h in the sdk include directory and change the
#define 1 on about line 12 to # define 0
If you have follow up questions make a new topic