-->
Page 1 of 1

ESP8266 Mesh Demo from github

PostPosted: Thu May 05, 2016 7:15 am
by CipiCips
Hello,

If someone can help with this, I am unable to compile ./gen_misc.sh followed by these instructions https://github.com/espressif/ESP8266_MESH_DEMO

I am using Cygwin for wnidows and I have installed all packages (make, gcc, gettext ect.)

First I run this command

./gen_misc.sh

And script starts and I can select what I wanna (1=boot_v1.2+, 1=user1.bin ect. ) same like in tutorial on github.

Then it start compiling and I get error missing crosstol-Ng and xtensa.

Then I go to this web page
https://github.com/esp8266/esp8266-wiki ... local-user
and I start following instructions and this is the only error what I get when install it.

Code: Select all[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20160505.022741
[INFO ]  Building environment variables
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 0.50s (at 00:14)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 1.97s (at 00:16)
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[INFO ]  Installing GMP for host: done in 202.31s (at 03:38)
[INFO ]  =================================================================
[INFO ]  Installing MPFR for host
[INFO ]  Installing MPFR for host: done in 84.57s (at 05:03)
[INFO ]  =================================================================
[INFO ]  Installing ISL for host
[INFO ]  Installing ISL for host: done in 95.79s (at 06:39)
[INFO ]  =================================================================
[INFO ]  Installing CLooG for host
[INFO ]  Installing CLooG for host: done in 44.91s (at 07:24)
[INFO ]  =================================================================
[INFO ]  Installing MPC for host
[INFO ]  Installing MPC for host: done in 40.81s (at 08:05)
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[INFO ]  Installing binutils for host: done in 260.08s (at 12:25)
[INFO ]  =================================================================
[INFO ]  Installing final compiler
[ERROR]    xgcc: error: spawn: No such file or directory
[INFO ]  Installing final compiler: done in 573.22s (at 21:58)
[INFO ]  =================================================================
[INFO ]  Installing cross-gdb
[INFO ]  Installing cross-gdb: done in 411.33s (at 28:50)
[INFO ]  =================================================================
[INFO ]  Cleaning-up the toolchain's directory
[INFO ]    Stripping all toolchain executables
[INFO ]  Cleaning-up the toolchain's directory: done in 10.03s (at 29:00)
[INFO ]  Build completed at 20160505.025639
[INFO ]  (elapsed: 28:58.08)
[INFO ]  Finishing installation (may take a few seconds)...
[29:00] /


I've red on some forums that Error is ok.

Ok now I start again ./gen_misc.sh and chose what I wanna build and it starts to building. And I got new error

Code: Select allmake[1]: xtensa-lx106-elf-gcc: Command not found
../../Makefile:323: recipe for target '.output/eagle/debug/obj/mesh_demo.o' failed
make[1]: *** [.output/eagle/debug/obj/mesh_demo.o] Error 127
make[1]: Leaving directory '/cygdrive/c/Projects/ESP8266/mesh_demo/demo'
../Makefile:309: recipe for target '.subdirs' failed


I've red some forums telling to install gcc, minigw, g++, I've install it all and still getting this error.
On some forums they mention to set path for xtensa-lx106-elf-gcc but it is already done while I was installing crosstool-Ng and xtensa with this command line

./ct-ng build PATH=$PWD/builds/xtensa-lx106-elf/bin:$PATH

I thought it was problem in Cygwin so I install Linux

Done everything even sudo apt-get install, update ect.

Same error occurs.

Or can someone post how did he do this step by step and manage to get it work.

Thx for help I've been struggling with this past few weeks.

Regards

Re: ESP8266 Mesh Demo from github

PostPosted: Thu May 05, 2016 11:40 am
by CipiCips
Ok I have manage to make some progress,

I dont know is that still ok but this is what I have done.

on windows I have install this http://gnutoolchains.com/esp8266/

In the installation folder I have added ESP_MESH_DEMO from here https://github.com/espressif/ESP8266_MESH_DEMO

when I run cygwin and run ./gen_misc.sh

this is what I get now:

Code: Select all$ sh ./gen_misc.sh
gen_misc.sh version 20150511

Please follow below steps(1-5) to generate specific bin(s):
STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
enter(0/1/2, default 2):
1
boot mode: new

STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
enter (0/1/2, default 0):
1
generate bin: user1.bin

STEP 3: choose spi speed(0=20MHz, 1=26.7MHz, 2=40MHz, 3=80MHz)
enter (0/1/2/3, default 2):
2
spi speed: 40 MHz

STEP 4: choose spi mode(0=QIO, 1=QOUT, 2=DIO, 3=DOUT)
enter (0/1/2/3, default 0):
0
spi mode: QIO

STEP 5: choose spi size and map
    0= 512KB( 256KB+ 256KB)
    2=1024KB( 512KB+ 512KB)
    3=2048KB( 512KB+ 512KB)
    4=4096KB( 512KB+ 512KB)
    5=2048KB(1024KB+1024KB)
    6=4096KB(1024KB+1024KB)
enter (0/2/3/4/5/6, default 0):
2
spi size: 1024KB
spi ota map:  512KB + 512KB
spi size:  KB


start...

fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make -C demo clean;
make[1]: Entering directory '/cygdrive/c/SysGCC/esp8266/ESP8266_MESH_DEMO-master/mesh_demo/demo'
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
rm -f -r .output/eagle/debug
make[1]: Leaving directory '/cygdrive/c/SysGCC/esp8266/ESP8266_MESH_DEMO-master/mesh_demo/demo'
rm -f -r .output/eagle/debug
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make -C demo
make[1]: Entering directory '/cygdrive/c/SysGCC/esp8266/ESP8266_MESH_DEMO-master/mesh_demo/demo'
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_device.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_json.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_none.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_parser.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle devicefind.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_http.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_mqtt.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_bin.c
DEPEND: xtensa-lx106-elf-gcc -M -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -DICACHE_FLASH -DESP_MESH_SUPPORT -I include -I ./ -I ../include -I ../../include -I ../../include/eagle mesh_demo.c
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: Not a git repository (or any parent up to mount point /cygdrive/c)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
xtensa-lx106-elf-gcc -Os -g -O2 -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections  -DICACHE_FLASH -DESP_MESH_SUPPORT   -I include -I ./ -I ../include -I ../../include -I ../../include/eagle  -o .output/eagle/debug/obj/mesh_demo.o -c mesh_demo.c
mesh_demo.c: In function 'esp_recv_entrance':
mesh_demo.c:17:26: error: implicit declaration of function 'ets_printf' [-Werror=implicit-function-declaration]
 #define MESH_DEMO_PRINT  ets_printf
                          ^
mesh_demo.c:41:5: note: in expansion of macro 'MESH_DEMO_PRINT'
     MESH_DEMO_PRINT("recv entrance\n");
     ^
mesh_demo.c:52:6: error: implicit declaration of function 'mesh_packet_parser' [-Werror=implicit-function-declaration]
      mesh_packet_parser(arg, pdata, len);
      ^
In file included from mesh_demo.c:13:0:
mesh_demo.c: In function 'esp_mesh_demo_con_cb':
../../include/osapi.h:31:25: error: implicit declaration of function 'ets_timer_disarm' [-Werror=implicit-function-declaration]
 #define os_timer_disarm ets_timer_disarm
                         ^
mesh_demo.c:112:5: note: in expansion of macro 'os_timer_disarm'
     os_timer_disarm(&tst_timer);
     ^
../../include/osapi.h:32:24: error: implicit declaration of function 'ets_timer_setfn' [-Werror=implicit-function-declaration]
 #define os_timer_setfn ets_timer_setfn
                        ^
mesh_demo.c:113:5: note: in expansion of macro 'os_timer_setfn'
     os_timer_setfn(&tst_timer, (os_timer_func_t *)esp_mesh_demo_test, NULL);
     ^
../../include/osapi.h:30:31: error: implicit declaration of function 'ets_timer_arm_new' [-Werror=implicit-function-declaration]
 #define os_timer_arm(a, b, c) ets_timer_arm_new(a, b, c, 1)
                               ^
mesh_demo.c:114:5: note: in expansion of macro 'os_timer_arm'
     os_timer_arm(&tst_timer, 7000, true);
     ^
mesh_demo.c: In function 'mesh_enable_cb':
mesh_demo.c:20:26: error: implicit declaration of function 'ets_memset' [-Werror=implicit-function-declaration]
 #define MESH_DEMO_MEMSET ets_memset
                          ^
mesh_demo.c:133:5: note: in expansion of macro 'MESH_DEMO_MEMSET'
     MESH_DEMO_MEMSET(&ser_conn, 0 ,sizeof(ser_conn));
     ^
mesh_demo.c:19:26: error: implicit declaration of function 'ets_memcpy' [-Werror=implicit-function-declaration]
 #define MESH_DEMO_MEMCPY ets_memcpy
                          ^
mesh_demo.c:136:5: note: in expansion of macro 'MESH_DEMO_MEMCPY'
     MESH_DEMO_MEMCPY(ser_tcp.remote_ip, server_ip, sizeof(server_ip));
     ^
mesh_demo.c:166:5: error: implicit declaration of function 'mesh_topo_test_init' [-Werror=implicit-function-declaration]
     mesh_topo_test_init();
     ^
mesh_demo.c:167:5: error: implicit declaration of function 'mesh_json_mcast_test_init' [-Werror=implicit-function-declaration]
     mesh_json_mcast_test_init();
     ^
mesh_demo.c:168:5: error: implicit declaration of function 'mesh_json_bcast_test_init' [-Werror=implicit-function-declaration]
     mesh_json_bcast_test_init();
     ^
mesh_demo.c:169:5: error: implicit declaration of function 'mesh_json_p2p_test_init' [-Werror=implicit-function-declaration]
     mesh_json_p2p_test_init();
     ^
mesh_demo.c: In function 'esp_mesh_demo_test':
mesh_demo.c:18:26: error: implicit declaration of function 'ets_strlen' [-Werror=implicit-function-declaration]
 #define MESH_DEMO_STRLEN ets_strlen
                          ^
mesh_demo.c:205:29: note: in expansion of macro 'MESH_DEMO_STRLEN'
                             MESH_DEMO_STRLEN(tst_data),  // data length
                             ^
In file included from mesh_demo.c:11:0:
../../include/mem.h:16:27: error: implicit declaration of function 'vPortFree' [-Werror=implicit-function-declaration]
 #define os_free(s)        vPortFree(s, "", 0)
                           ^
mesh_demo.c:21:26: note: in expansion of macro 'os_free'
 #define MESH_DEMO_FREE   os_free
                          ^
mesh_demo.c:220:9: note: in expansion of macro 'MESH_DEMO_FREE'
         MESH_DEMO_FREE(header);
         ^
mesh_demo.c: In function 'user_init':
mesh_demo.c:317:5: error: implicit declaration of function 'user_devicefind_init' [-Werror=implicit-function-declaration]
     user_devicefind_init();
     ^
cc1.exe: all warnings being treated as errors
../../Makefile:323: recipe for target '.output/eagle/debug/obj/mesh_demo.o' failed
make[1]: *** [.output/eagle/debug/obj/mesh_demo.o] Error 1
make[1]: Leaving directory '/cygdrive/c/SysGCC/esp8266/ESP8266_MESH_DEMO-master/mesh_demo/demo'
../Makefile:312: recipe for target '.subdirs' failed
make: *** [.subdirs] Error 2

Re: ESP8266 Mesh Demo from github

PostPosted: Fri May 06, 2016 10:33 am
by CipiCips
Hello,

After many many hours of playing with this, I've finally made it up.

For those who is struggling with same problem this is how I did it.

I have download from this forum Official GCC compiler VM from Espressif, inside Vritual Box (Ubuntu) I have downloaded MESH_DEMO from github. From terminal run sudo sh ./gen_misc.sh and I have managed to compile it without error.

Thx