-->
Page 1 of 3

ESPHTTPD compile help?

PostPosted: Wed Feb 18, 2015 1:57 pm
by andrew melvin
I've given this a bunch of goes. Tried on my mac, on ubuntu virtual machines. And no luck.

I've followed the instructions here.. https://github.com/pfalcon/esp-open-sdk

changed my paths

but i get this error. I can build the examples just fine, as well as node-mcu?

Code: Select allandrew@ubuntu-testbed:~/esphttpd$ make
CC user/auth.c
In file included from /home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/os_type.h:10:0,
                 from /home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/user_interface.h:9,
                 from user/auth.c:17:
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/ets_sys.h:11:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant
 include "c_types.h"
         ^
In file included from /home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/os_type.h:10:0,
                 from /home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/user_interface.h:9,
                 from user/auth.c:17:
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/ets_sys.h:15:1: error: unknown type name 'uint32_t'
 typedef uint32_t ETSParam;
 ^
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/ets_sys.h:20:5: error: unknown type name 'ETSSignal'
     ETSSignal sig;
     ^
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/ets_sys.h:27:1: error: unknown type name 'uint32_t'
 typedef uint32_t ETSHandle;
 ^
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/ets_sys.h:32:5: error: unknown type name 'uint32_t'
     uint32_t              timer_expire;
     ^
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/ets_sys.h:33:5: error: unknown type name 'uint32_t'
     uint32_t              timer_period;
     ^
In file included from /home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/user_interface.h:9:0,
                 from user/auth.c:17:
/home/andrew/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/user_interface.h:67:33: error: unknown type name 'ETSSignal'
 bool system_os_post(uint8 prio, os_signal_t sig, os_param_t par);

Re: ESPHTTPD compile help?

PostPosted: Wed Feb 18, 2015 5:50 pm
by dancudds
I am getting exactly the same error

Re: ESPHTTPD compile help?

PostPosted: Fri Feb 20, 2015 8:50 pm
by tim1073
I ran into the same problem. As part of the environment setup, the c_types.h file in the sdk include directory is replaced. The old file is left in the directory as c_types.h.orig. The new file removes the definition for uint32_t and a bunch of other types. I don't know why this was done and it may break something else, but restoring the original c_types.h file allowed me to compile.

Re: ESPHTTPD compile help?

PostPosted: Mon Feb 23, 2015 6:00 am
by andrew melvin
Thanks

somehow, a fresh installation (try number 4) and git clone from the spritserver NOT the github repository bjpirt, seemed to compile without errors...

unfortunately hit another hurdle to do with the esptool....

Code: Select allandrew@ubuntu-testbed:~/esphttpd$ make
CC user/espfs.c
CC user/heatshrink_decoder.c
CC user/httpd.c
CC user/httpdespfs.c
CC user/io.c
CC user/stdout.c
CC user/user_main.c
AR build/httpd_app.a
LD build/httpd.out
FW firmware/0x00000.bin
usage: esptool [-h] [--port PORT] [--baud BAUD]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac}
               ...
esptool: error: argument operation: invalid choice: 'build/httpd.out' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac')
make: *** [firmware/0x00000.bin] Error 2


now i realise that there are two esptools... but can't find reference to the other one. Are they both to flash?

I can't for the life of me get this stuff to work on my mac, so its all in an ubuntuVM.

I need the binaries to just be put into a directory, but unfortunately there is nothing there..