LilyGO / TTGO-TM-ESP32

88 stars 30 forks source link

Example project not compiling #2

Open joaofl opened 6 years ago

joaofl commented 6 years ago

If I try to compile the example project with the latest sdk from expressif, I get several errors. Do you think you could fix it?

Here are the errors:

/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c: In function 'mdns_task':
/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:29:5: error: unknown type name 'mdns_server_t'
     mdns_server_t * mdns = NULL;
     ^
In file included from /home/joao/Programas/esp/esp-idf/components/esp32/include/esp_timer.h:44:0,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/portmacro.h:82,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/portable.h:94,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
                 from /home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:10:
/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:45:30: error: implicit declaration of function 'mdns_set_hostname' [-Werror=implicit-function-declaration]
             ESP_ERROR_CHECK( mdns_set_hostname(mdns, MDNS_HOSTNAME) );
                              ^
/home/joao/Programas/esp/esp-idf/components/esp32/include/esp_err.h:106:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:46:30: error: implicit declaration of function 'mdns_set_instance' [-Werror=implicit-function-declaration]
             ESP_ERROR_CHECK( mdns_set_instance(mdns, MDNS_INSTANCE) );
                              ^
/home/joao/Programas/esp/esp-idf/components/esp32/include/esp_err.h:106:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:48:47: warning: passing argument 1 of 'mdns_service_add' from incompatible pointer type [-Wincompatible-pointer-types]
             ESP_ERROR_CHECK( mdns_service_add(mdns, "_http", "_tcp", 80) );
                                               ^
/home/joao/Programas/esp/esp-idf/components/esp32/include/esp_err.h:106:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
In file included from /home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:19:0:
/home/joao/Programas/esp/esp-idf/components/mdns/include/mdns.h:138:11: note: expected 'const char *' but argument is of type 'int *'
 esp_err_t mdns_service_add(const char * instance_name, const char * service_type, const char * proto, uint16_t 
           ^
In file included from /home/joao/Programas/esp/esp-idf/components/esp32/include/esp_timer.h:44:0,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/portmacro.h:82,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/portable.h:94,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
                 from /home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:10:
/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:48:30: error: too few arguments to function 'mdns_service_add'
             ESP_ERROR_CHECK( mdns_service_add(mdns, "_http", "_tcp", 80) );
                              ^
/home/joao/Programas/esp/esp-idf/components/esp32/include/esp_err.h:106:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
In file included from /home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:19:0:
/home/joao/Programas/esp/esp-idf/components/mdns/include/mdns.h:138:11: note: declared here
 esp_err_t mdns_service_add(const char * instance_name, const char * service_type, const char * proto, uint16_t 
           ^
In file included from /home/joao/Programas/esp/esp-idf/components/esp32/include/esp_timer.h:44:0,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/portmacro.h:82,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/portable.h:94,
                 from /home/joao/Programas/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:105,
                 from /home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:10:
/home/joao/Programas/esp/Bluetooth_Music_Player1/components/mdns_task/mdns_task.c:49:30: error: implicit declaration of function 'mdns_service_instance_set' [-Werror=implicit-function-declaration]
             ESP_ERROR_CHECK( mdns_service_instance_set(mdns, "_http", "_tcp", "ESP32 WebServer") );
                              ^
/home/joao/Programas/esp/esp-idf/components/esp32/include/esp_err.h:106:31: note: in definition of macro 'ESP_ERROR_CHECK'
         esp_err_t __err_rc = (x);                                       \
                               ^
cc1: some warnings being treated as errors
/home/joao/Programas/esp/esp-idf/make/component_wrapper.mk:285: recipe for target 'mdns_task.o' failed
make[1]: *** [mdns_task.o] Error 1
/home/joao/Programas/esp/esp-idf/make/project.mk:467: recipe for target 'component-mdns_task-build' failed
make: *** [component-mdns_task-build] Error 2
joaofl commented 6 years ago

I managed to compile it without this mdns component.

It gets connected, but the music sound accelerated (sound like rats singing). Any clue why?

This figure you have as example, from which implementation did you get that working? For me, neither the display nor the radio is working...

LilyGO commented 6 years ago

@joaofl I re-uploaded the code and it works fine

joaofl commented 6 years ago

Thanks a lot!

Which version of the sdk did you use to compile it?

Going to test it later and give some feedback.

joaofl commented 6 years ago

I noticed that you have completely removed the source code. Do you plan to add it back? That would be very important.

Also, if you could post the command you use to burn the firmware on the board. That would make a very easy start for everybody.