Coder Social home page Coder Social logo

esphttpd-freertos's Introduction

This is an example of how to use libesphttpd with the Espressif FreeRTOS SDK. The master repo of this code is http://git.spritesserver.nl/esphttpd-freertos.git/ , but it's also mirrored at https://github.com/Spritetm/esphttpd-freertos .

The Makefile in this example isn't perfect yet: something is going wrong with the dependency checking, causing files that have changed not always being recompiled. To work around this, please run a make clean && make -C libesphttpd && make before running make flash

esphttpd-freertos's People

Contributors

spritetm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphttpd-freertos's Issues

Compiling Issue

Hi, hello,
I´m trying to compile your code, but I´m getting some trouble while executing "make" command.
Here is the output:

xt-xcc -Os -g -Wpointer-arith -Wundef -Werror -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -ffunction-sections -fdata-sections -fno-builtin-printf -DICACHE_FLASH -DFREERTOS -DOTA_FLASH_SIZE_K=32768 -DOTA_TAGNAME=""generic"" -I include -I ./ -I ../include -I ../libesphttpd/include -I ../libesphttpd/espfs -I ../include -I ../include/eagle -I ../driver_lib/include -o .output/eagle/debug/obj/cgi-test.o -c cgi-test.c
/bin/sh: xt-xcc: command not found
make[1]: *** [.output/eagle/debug/obj/cgi-test.o] Error 127
make: *** [.subdirs] Error 2

(I do have the esp8266 toolchain installed)

Any hint will be really appreciated!

Thanks in advance!

example using httpdContinue()

In the readme, it says:

If you need to suspend the HTTP response and resume it asynchronously for some other reason, you may save the HttpdConnData pointer, return HTTPD_CGI_MORE, then later call httpdContinue with the saved connection pointer. For example, if you need to communicate with another device over a different connection, you could send data to that device in the initial CGI call, then return HTTPD_CGI_MORE, then, in the espconn_recv_callback for the response, you can call httpdContinue to resume the HTTP response with data retrieved from the other device.

The only example I can find of doing this is here:
https://github.com/isavitsky/esphttpd-ardf/search?q=httpdContinue&unscoped_q=httpdContinue

I think this is the functionality I'm looking for. A cgi request comes in and I then send some data via the RMT peripheral. But that takes time (50~150ms) and I don't want to block the httpd server from handling other requests. (such as cgi requests for sending on other RMT channels)
So the first round of the cgi function polls the RMT channel to see if it is busy. If it is busy, it will return HTTPD_CGI_MORE.
But the cgi function seems to only be called once more while waiting for the peripheral. So I need to save the pointer to connData and then have some other process call httpdContinue(save_connData) when the peripheral is ready to resume the cgi function.

So the RMT driver has a callback that will fire when finished from ISR context. Is it OK to call httpdContinue() from ISR context? Or do I need to implement some more complicated handling? I want the cgi function running in the httpd task only, since it uses a lot of stack space.

Another question: If more than one request comes in while the peripheral is busy, but I'm only saving to one global save_connData pointer in the cgi function, won't I lose track of connections? How could I keep track of multiple requests and serve them each in order received?
Or how could I simply fail any additional requests received while a previous request is already waiting for the peripheral?

Bug in platHttpServerTask

Function: static void platHttpServerTask(void *pvParameters)

code starting at line 192 ... I expanded it with spaces so you can see the bug

            if (FD_ISSET(rconn[x].fd, &readset))
                             {
                precvbuf=(char*)malloc(RECV_BUF_SIZE);
                if (precvbuf==NULL)
                                                              httpd_printf("platHttpServerTask: memory exhausted!\n");

BUG--> if malloc fails you still fall into rcv which will crash ....

                ret=recv(rconn[x].fd, precvbuf, RECV_BUF_SIZE,0);
                if (ret > 0) {
                    //Data received. Pass to httpd.
                    httpdRecvCb(&rconn[x], rconn[x].ip, rconn[x].port, precvbuf, ret);
                } else {
                    //recv error,connection close
                    httpdDisconCb(&rconn[x], rconn[x].ip, rconn[x].port);
                    close(rconn[x].fd);
                    rconn[x].fd=-1;
                }
                if (precvbuf) free(precvbuf);
            }

I'm not sure the best solution ... I was going to say

                            if (precvbuf==NULL)
                            {
                                 httpd_printf("platHttpServerTask: memory exhausted!\n");
                                 continue;
                             }

but that would just lead to an un-blocked select and the task would spin.

I will probably process as if rcv failed - close socket and disconnect.

Please let me know what your thoughts are.

Joe

Link ERROR

Hi,
I want to try this project, but I always failed. I use this commands to compile:

export SDK_PATH=~/esp/ESP8266_RTOS_SDK
make clean && make -C libesphttpd USE_OPENSDK=yes && make USE_OPENSDK=yes

And it error at link stage. From below log, it seems that it will build using NONOS SDK, I don't know why, could you give me a hand?

xtensa-lx106-elf-ar ru .output/eagle/debug/lib/libuser.a .output/eagle/debug/obj/cgi-test.o .output/eagle/debug/obj/io.o .output/eagle/debug/obj/user_main.o .output/eagle/debug/obj/cgi.o 
xtensa-lx106-elf-ar: creating .output/eagle/debug/lib/libuser.a
make[1]: Leaving directory '/home/work/esp/hello/user'
make -C libesphttpd libesphttpd.a FREERTOS=yes ESP32=no
make[1]: Entering directory '/home/work/esp/hello/libesphttpd'
AR libesphttpd.a
make[1]: Leaving directory '/home/work/esp/hello/libesphttpd'
xtensa-lx106-elf-gcc  -L/home/work/esp/ESP8266_RTOS_SDK/lib -Wl,--gc-sections -nostdlib -T/home/work/esp/ESP8266_RTOS_SDK/ld/eagle.app.v6.new.1024.app1.ld -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group -lminic -lgcc -lhal -lphy -lpp -lnet80211 -lwpa -lcrypto -lmain -lfreertos -llwip -lfreertos -lcirom -lmirom -lgcc -lhal -lphy -lpp -lnet80211 -lcrypto -lwpa -lmain -lfreertos -llwip -lssl -ljson -lsmartconfig -lpwm -L./libesphttpd -lesphttpd -lwebpages-espfs user/.output/eagle/debug/lib/libuser.a -Wl,--end-group -Wl,-Map=mapfile.txt -o .output/eagle/debug/image/eagle.app.v6.out 
/home/work/esp/ESP8266_RTOS_SDK/lib/libminic.a(minic.o): In function `sprintf':
(.text.sprintf+0x24): multiple definition of `sprintf'
/home/work/esp/ESP8266_RTOS_SDK/lib/libcirom.a(lib_a-sprintf.o):/home/wjg/Repo/esp-open-sdk/crosstool-NG/.build/src/newlib-2.0.0/newlib/libc/stdio/sprintf.c:624: first defined here
/home/work/esp/ESP8266_RTOS_SDK/lib/libmain.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x578): undefined reference to `user_rf_cal_sector_set'
/home/work/esp/ESP8266_RTOS_SDK/lib/libmain.a(app_main.o): In function `flash_data_check':
(.irom0.text+0x6cc): undefined reference to `user_rf_cal_sector_set'
./libesphttpd/libesphttpd.a(heatshrink_decoder.o): In function `heatshrink_decoder_free':
/home/work/esp/hello/libesphttpd/espfs/../lib/heatshrink/heatshrink_decoder.c:79: undefined reference to `ets_memset'
./libesphttpd/libesphttpd.a(heatshrink_decoder.o): In function `heatshrink_decoder_reset':
/home/work/esp/hello/libesphttpd/espfs/../lib/heatshrink/heatshrink_decoder.c:85: undefined reference to `ets_memset'
./libesphttpd/libesphttpd.a(heatshrink_decoder.o): In function `heatshrink_decoder_alloc':
/home/work/esp/hello/libesphttpd/espfs/../lib/heatshrink/heatshrink_decoder.c:72: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(heatshrink_decoder.o): In function `heatshrink_decoder_sink':
/home/work/esp/hello/libesphttpd/espfs/../lib/heatshrink/heatshrink_decoder.c:107: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(espfs.o): In function `espFsInit':
/home/work/esp/hello/libesphttpd/espfs/espfs.c:96: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(espfs.o): In function `readFlashUnaligned':
/home/work/esp/hello/libesphttpd/espfs/espfs.c:108: undefined reference to `ets_memcpy'
/home/work/esp/hello/libesphttpd/espfs/espfs.c:110: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/espfs/espfs.c:110: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(espfs.o): In function `espFsFlags':
/home/work/esp/hello/libesphttpd/espfs/espfs.c:125: undefined reference to `ets_strcmp'
./libesphttpd/libesphttpd.a(espfs.o): In function `espFsOpen':
/home/work/esp/hello/libesphttpd/espfs/espfs.c:139: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/espfs/espfs.c:147: undefined reference to `ets_strcmp'
/home/work/esp/hello/libesphttpd/espfs/espfs.c:168: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/espfs/espfs.c:179: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpdespfs.o):(.irom0.text+0x1c): undefined reference to `ets_strstr'
./libesphttpd/libesphttpd.a(httpdespfs.o): In function `cgiEspFsHook':
/home/work/esp/hello/libesphttpd/core/httpdespfs.c:27: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpdespfs.c:87: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o):(.irom0.text+0x8): undefined reference to `ets_memcmp'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdFindConnData':
/home/work/esp/hello/libesphttpd/core/httpd.c:108: undefined reference to `ets_memcmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:114: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdHexVal':
/home/work/esp/hello/libesphttpd/core/httpd.c:143: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdGetMimetype':
/home/work/esp/hello/libesphttpd/core/httpd.c:92: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:100: undefined reference to `ets_strcmp'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdUrlDecode':
/home/work/esp/hello/libesphttpd/core/httpd.c:173: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:173: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdFindArg':
/home/work/esp/hello/libesphttpd/core/httpd.c:180: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:180: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:186: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:186: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpd.c:186: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:188: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpd.c:189: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:198: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:198: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdGetHeader':
/home/work/esp/hello/libesphttpd/core/httpd.c:202: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:202: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:204: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:205: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:211: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `httdSetTransferMode':
/home/work/esp/hello/libesphttpd/core/httpd.c:230: undefined reference to `ets_strcpy'
/home/work/esp/hello/libesphttpd/core/httpd.c:236: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdSend':
/home/work/esp/hello/libesphttpd/core/httpd.c:363: undefined reference to `ets_strcpy'
/home/work/esp/hello/libesphttpd/core/httpd.c:366: undefined reference to `ets_memcpy'
/home/work/esp/hello/libesphttpd/core/httpd.c:372: undefined reference to `ets_sprintf'
/home/work/esp/hello/libesphttpd/core/httpd.c:378: undefined reference to `ets_sprintf'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdRedirect':
/home/work/esp/hello/libesphttpd/core/httpd.c:276: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:277: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `cgiRedirect':
/home/work/esp/hello/libesphttpd/core/httpd.c:280: undefined reference to `ets_strcmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:287: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(httpd.o): In function `cgiRedirectToHostname':
/home/work/esp/hello/libesphttpd/core/httpd.c:303: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:318: undefined reference to `ets_sprintf'
/home/work/esp/hello/libesphttpd/core/httpd.c:326: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdFlushSendBuffer':
/home/work/esp/hello/libesphttpd/core/httpd.c:391: undefined reference to `ets_strcpy'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdHexNibble':
/home/work/esp/hello/libesphttpd/core/httpd.c:382: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdFlushSendBuffer':
/home/work/esp/hello/libesphttpd/core/httpd.c:401: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdHexNibble':
/home/work/esp/hello/libesphttpd/core/httpd.c:381: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdFlushSendBuffer':
/home/work/esp/hello/libesphttpd/core/httpd.c:415: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:439: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:439: undefined reference to `ets_strcmp'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdCgiIsDone':
/home/work/esp/hello/libesphttpd/core/httpd.c:441: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:448: undefined reference to `ets_strlen'
/home/work/esp/hello/libesphttpd/core/httpd.c:449: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:450: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:459: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdProcessRequest':
/home/work/esp/hello/libesphttpd/core/httpd.c:543: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:566: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdConnSendStart':
/home/work/esp/hello/libesphttpd/core/httpd.c:666: undefined reference to `ets_strstr'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdConnSendFinish':
/home/work/esp/hello/libesphttpd/core/httpd.c:671: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpd.c:673: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:673: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:673: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:673: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpd.c:673: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:673: undefined reference to `ets_strstr'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdRecvCb':
/home/work/esp/hello/libesphttpd/core/httpd.c:676: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:680: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:700: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:705: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:706: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpd.c:708: undefined reference to `ets_strstr'
/home/work/esp/hello/libesphttpd/core/httpd.c:716: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdParseHeader':
/home/work/esp/hello/libesphttpd/core/httpd.c:611: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:613: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:626: undefined reference to `ets_strncmp'
/home/work/esp/hello/libesphttpd/core/httpd.c:638: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdRecvCb':
/home/work/esp/hello/libesphttpd/core/httpd.c:729: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/core/httpd.c:744: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:746: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/core/httpd.c:759: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/core/httpd.c:764: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/core/httpd.c:766: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/core/httpd.c:766: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(httpd.o): In function `httpdDisconCb':
/home/work/esp/hello/libesphttpd/core/httpd.c:777: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwebsocket.o): In function `websockFree':
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:148: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwebsocket.o): In function `sendFrameHead':
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:103: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwebsocket.o): In function `cgiWebsocketSend':
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:120: undefined reference to `ets_strcmp'
./libesphttpd/libesphttpd.a(cgiwebsocket.o): In function `cgiWebSocketRecv':
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:187: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:228: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:233: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:236: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:269: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwebsocket.o):/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:273: more undefined references to `os_printf_plus' follow
./libesphttpd/libesphttpd.a(cgiwebsocket.o): In function `cgiWebSocketRecv':
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:273: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:273: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/util/cgiwebsocket.c:273: undefined reference to `ets_strlen'
./libesphttpd/libesphttpd.a(cgiflash.o): In function `cgiGetFirmwareNext':
/home/work/esp/hello/libesphttpd/util/cgiflash.c:55: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:62: undefined reference to `ets_strncpy'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:62: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:62: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:62: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:62: undefined reference to `ets_memcmp'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:62: undefined reference to `ets_strncpy'
./libesphttpd/libesphttpd.a(cgiflash.o): In function `cgiUploadFirmware':
/home/work/esp/hello/libesphttpd/util/cgiflash.c:104: undefined reference to `ets_strcmp'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:104: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:112: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:136: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:144: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:163: undefined reference to `ets_memcmp'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:168: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiflash.o): In function `checkBinHeader':
/home/work/esp/hello/libesphttpd/util/cgiflash.c:37: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(cgiflash.o): In function `checkEspfsHeader':
/home/work/esp/hello/libesphttpd/util/cgiflash.c:42: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(cgiflash.o): In function `cgiUploadFirmware':
/home/work/esp/hello/libesphttpd/util/cgiflash.c:213: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:219: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:249: undefined reference to `ets_timer_arm_new'
/home/work/esp/hello/libesphttpd/util/cgiflash.c:256: undefined reference to `ets_timer_arm_new'
./libesphttpd/libesphttpd.a(captdns.o): In function `strToLabel$isra$0':
captdns.c:(.irom0.text+0x60): undefined reference to `espconn_get_connection_info'
captdns.c:(.irom0.text+0x64): undefined reference to `espconn_sendto'
./libesphttpd/libesphttpd.a(captdns.o): In function `captdnsRecv':
/home/work/esp/hello/libesphttpd/util/captdns.c:191: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(captdns.o): In function `my_ntohs':
/home/work/esp/hello/libesphttpd/util/captdns.c:112: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(captdns.o): In function `setn16':
/home/work/esp/hello/libesphttpd/util/captdns.c:98: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(captdns.o): In function `labelToStr':
/home/work/esp/hello/libesphttpd/util/captdns.c:130: undefined reference to `espconn_get_connection_info'
./libesphttpd/libesphttpd.a(captdns.o): In function `captdnsRecv':
/home/work/esp/hello/libesphttpd/util/captdns.c:261: undefined reference to `ets_memcpy'
/home/work/esp/hello/libesphttpd/util/captdns.c:262: undefined reference to `espconn_sendto'
/home/work/esp/hello/libesphttpd/util/captdns.c:268: undefined reference to `espconn_regist_recvcb'
/home/work/esp/hello/libesphttpd/util/captdns.c:268: undefined reference to `espconn_create'
./libesphttpd/libesphttpd.a(captdns.o): In function `captdnsInit':
/home/work/esp/hello/libesphttpd/util/captdns.c:324: undefined reference to `espconn_regist_recvcb'
/home/work/esp/hello/libesphttpd/util/captdns.c:327: undefined reference to `espconn_create'
./libesphttpd/libesphttpd.a(cgiwifi.o):(.irom0.text+0x2a): undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `wifiScanDoneCb':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:60: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:72: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:87: undefined reference to `ets_strncpy'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:89: undefined reference to `ets_strncpy'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:99: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:99: undefined reference to `ets_timer_arm_new'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `reassTimerCb':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:187: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:192: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `resetTimerCb':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:175: undefined reference to `ets_sprintf'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:175: undefined reference to `ets_sprintf'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `cgiWiFiScan':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:120: undefined reference to `ets_sprintf'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:121: undefined reference to `ets_sprintf'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:140: undefined reference to `ets_strncpy'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:141: undefined reference to `ets_strncpy'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:143: undefined reference to `os_printf_plus'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:150: undefined reference to `ets_timer_arm_new'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:156: undefined reference to `os_printf_plus'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `cgiWiFiConnect':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:225: undefined reference to `ets_sprintf'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:229: undefined reference to `ets_timer_arm_new'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:229: undefined reference to `ets_sprintf'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `cgiWiFiSetMode':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:252: undefined reference to `ets_strcpy'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:252: undefined reference to `ets_strcmp'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:252: undefined reference to `ets_strcmp'
./libesphttpd/libesphttpd.a(cgiwifi.o): In function `cgiWiFiConnStatus':
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:254: undefined reference to `ets_strcmp'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:259: undefined reference to `ets_strcmp'
/home/work/esp/hello/libesphttpd/util/cgiwifi.c:262: undefined reference to `ets_strcpy'
./libesphttpd/libesphttpd.a(httpd-nonos.o): In function `platRecvCb':
httpd-nonos.c:(.irom0.text+0x64): undefined reference to `espconn_regist_reconcb'
httpd-nonos.c:(.irom0.text+0x68): undefined reference to `espconn_regist_disconcb'
httpd-nonos.c:(.irom0.text+0x6c): undefined reference to `espconn_regist_sentcb'
httpd-nonos.c:(.irom0.text+0x70): undefined reference to `espconn_disconnect'
./libesphttpd/libesphttpd.a(httpd-nonos.o): In function `platConnCb':
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:43: undefined reference to `espconn_regist_recvcb'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:45: undefined reference to `espconn_regist_reconcb'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:46: undefined reference to `espconn_regist_disconcb'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:47: undefined reference to `espconn_regist_sentcb'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:48: undefined reference to `espconn_disconnect'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:51: undefined reference to `espconn_sent'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:53: undefined reference to `espconn_sent'
./libesphttpd/libesphttpd.a(httpd-nonos.o): In function `httpdPlatSendData':
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:59: undefined reference to `espconn_disconnect'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:60: undefined reference to `espconn_regist_time'
./libesphttpd/libesphttpd.a(httpd-nonos.o): In function `httpdPlatDisconnect':
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:63: undefined reference to `espconn_regist_time'
./libesphttpd/libesphttpd.a(httpd-nonos.o): In function `httpdPlatDisableTimeout':
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:66: undefined reference to `espconn_regist_connectcb'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:68: undefined reference to `espconn_accept'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:69: undefined reference to `espconn_tcp_set_max_con_allow'
./libesphttpd/libesphttpd.a(httpd-nonos.o): In function `httpdPlatInit':
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:73: undefined reference to `espconn_regist_connectcb'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:73: undefined reference to `espconn_accept'
/home/work/esp/hello/libesphttpd/core/httpd-nonos.c:77: undefined reference to `espconn_tcp_set_max_con_allow'
./libesphttpd/libesphttpd.a(sha1.o): In function `sha1_initHmac':
/home/work/esp/hello/libesphttpd/core/sha1.c:140: undefined reference to `ets_memset'
/home/work/esp/hello/libesphttpd/core/sha1.c:147: undefined reference to `ets_memcpy'
./libesphttpd/libesphttpd.a(sha1.o): In function `sha1_resultHmac':
/home/work/esp/hello/libesphttpd/core/sha1.c:159: undefined reference to `ets_memcpy'
collect2: error: ld returned 1 exit status
/home/work/esp/ESP8266_RTOS_SDK/Makefile:403: recipe for target '.output/eagle/debug/image/eagle.app.v6.out' failed

Building with esp-idf for esp32 fails

Even after checking out the esp-idf branch of libesphttpd I get:

[cmorgan@localhost esphttpd-freertos-github]$ make -C libesphttpd
make: Entering directory '/home/cmorgan/projects/esphttpd-freertos-github/libesphttpd'
CC espfs/espfs.c
make: xtensa-lx106-elf-gcc: Command not found
make: *** [Makefile:220: build/espfs/espfs.o] Error 127
make: Leaving directory '/home/cmorgan/projects/esphttpd-freertos-github/libesphttpd'

It looks like the wrong compiler is being used on the libesphttpd side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.