aizukanne / ESP32-micropython-lora

A fork of MicroPython with the ESP32 port customized to run on ESP32 + SX1276 Lora Module.
MIT License
42 stars 7 forks source link

Try to compile #1

Open fferraro18 opened 6 years ago

fferraro18 commented 6 years ago

Please include the following information when submitting a bug report:

Thank you!

Try to compile for ESP32 with error :+1:

root@jazmin:/opt/PYCOM/ESP32-micropython-lora/esp32#make V=1 BOARD=LOPY -j5 TARGET=boot
CC bootloader/bootloader.c xtensa-esp32-elf-gcc -DESP_PLATFORM -g3 -Wpointer-arith -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wl,-EL -mlongcalls -Wall -ffunction-sections -fdata-sections -fno-common -Og -nostdlib -std=gnu99 -g3 -fstrict-volatile-bitfields -Iboards/LOPY -I. -I.. -Ihal -Iutil -Imods -Itelnet -Iftp -Ilora -Ibootloader -Ifatfs/src/drivers -Ibuild/LOPY_868/release -Ibuild/LOPY_868/release/genhdr -I/root/pycom-esp-idf/components/bootloader_support/include -I/root/pycom-esp-idf/components/bootloader_support/include_priv -I/root/pycom-esp-idf/components/mbedtls/include -I/root/pycom-esp-idf/components/mbedtls/port/include -I/root/pycom-esp-idf/components/driver/include -I/root/pycom-esp-idf/components/driver/include/driver -I/root/pycom-esp-idf/components/heap/include -I/root/pycom-esp-idf/components/esp32 -I/root/pycom-esp-idf/components/esp32/include -I/root/pycom-esp-idf/components/soc/esp32/include -I/root/pycom-esp-idf/components/expat/include -I/root/pycom-esp-idf/components/freertos/include -I/root/pycom-esp-idf/components/json/include -I/root/pycom-esp-idf/components/expat/include -I/root/pycom-esp-idf/components/lwip/include/lwip -I/root/pycom-esp-idf/components/lwip/include/lwip/port -I/root/pycom-esp-idf/components/newlib/include -I/root/pycom-esp-idf/components/nvs_flash/include -I/root/pycom-esp-idf/components/spi_flash/include -I/root/pycom-esp-idf/components/tcpip_adapter/include -I/root/pycom-esp-idf/components/log/include -I/root/pycom-esp-idf/components/sdmmc/include -I/root/pycom-esp-idf/components/bt/include -I/root/pycom-esp-idf/components/bt/bluedroid/include -I/root/pycom-esp-idf/components/bt/bluedroid/device/include -I/root/pycom-esp-idf/components/bt/bluedroid/bta/dm -I/root/pycom-esp-idf/components/bt/bluedroid/bta/hh -I/root/pycom-esp-idf/components/bt/bluedroid/bta/include -I/root/pycom-esp-idf/components/bt/bluedroid/bta/sys/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/gatt/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/gap/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/l2cap/include -I/root/pycom-esp-idf/components/bt/bluedroid/btcore/include -I/root/pycom-esp-idf/components/bt/bluedroid/osi/include -I/root/pycom-esp-idf/components/bt/bluedroid/hci/include -I/root/pycom-esp-idf/components/bt/bluedroid/gki/include -I/root/pycom-esp-idf/components/bt/bluedroid/api/include -I/root/pycom-esp-idf/components/bt/bluedroid/btc/include -I../lib/mp-readline -I../lib/netutils -I../lib/fatfs -I../lib -I../drivers/sx127x -I../stmhal -DMICROPY_NLR_SETJMP=1 -DUSE_BAND_868 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DNDEBUG -DBOOTLOADER_BUILD -c -MD -o build/LOPY_868/release/bootloader/bootloader.o bootloader/bootloader.c CC bootloader/gpio.c xtensa-esp32-elf-gcc -DESP_PLATFORM -g3 -Wpointer-arith -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wl,-EL -mlongcalls -Wall -ffunction-sections -fdata-sections -fno-common -Og -nostdlib -std=gnu99 -g3 -fstrict-volatile-bitfields -Iboards/LOPY -I. -I.. -Ihal -Iutil -Imods -Itelnet -Iftp -Ilora -Ibootloader -Ifatfs/src/drivers -Ibuild/LOPY_868/release -Ibuild/LOPY_868/release/genhdr -I/root/pycom-esp-idf/components/bootloader_support/include -I/root/pycom-esp-idf/components/bootloader_support/include_priv -I/root/pycom-esp-idf/components/mbedtls/include -I/root/pycom-esp-idf/components/mbedtls/port/include -I/root/pycom-esp-idf/components/driver/include -I/root/pycom-esp-idf/components/driver/include/driver -I/root/pycom-esp-idf/components/heap/include -I/root/pycom-esp-idf/components/esp32 -I/root/pycom-esp-idf/components/esp32/include -I/root/pycom-esp-idf/components/soc/esp32/include -I/root/pycom-esp-idf/components/expat/include -I/root/pycom-esp-idf/components/freertos/include -I/root/pycom-esp-idf/components/json/include -I/root/pycom-esp-idf/components/expat/include -I/root/pycom-esp-idf/components/lwip/include/lwip -I/root/pycom-esp-idf/components/lwip/include/lwip/port -I/root/pycom-esp-idf/components/newlib/include -I/root/pycom-esp-idf/components/nvs_flash/include -I/root/pycom-esp-idf/components/spi_flash/include -I/root/pycom-esp-idf/components/tcpip_adapter/include -I/root/pycom-esp-idf/components/log/include -I/root/pycom-esp-idf/components/sdmmc/include -I/root/pycom-esp-idf/components/bt/include -I/root/pycom-esp-idf/components/bt/bluedroid/include -I/root/pycom-esp-idf/components/bt/bluedroid/device/include -I/root/pycom-esp-idf/components/bt/bluedroid/bta/dm -I/root/pycom-esp-idf/components/bt/bluedroid/bta/hh -I/root/pycom-esp-idf/components/bt/bluedroid/bta/include -I/root/pycom-esp-idf/components/bt/bluedroid/bta/sys/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/gatt/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/gap/include -I/root/pycom-esp-idf/components/bt/bluedroid/stack/l2cap/include -I/root/pycom-esp-idf/components/bt/bluedroid/btcore/include -I/root/pycom-esp-idf/components/bt/bluedroid/osi/include -I/root/pycom-esp-idf/components/bt/bluedroid/hci/include -I/root/pycom-esp-idf/components/bt/bluedroid/gki/include -I/root/pycom-esp-idf/components/bt/bluedroid/api/include -I/root/pycom-esp-idf/components/bt/bluedroid/btc/include -I../lib/mp-readline -I../lib/netutils -I../lib/fatfs -I../lib -I../drivers/sx127x -I../stmhal -DMICROPY_NLR_SETJMP=1 -DUSE_BAND_868 -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM -DNDEBUG -DBOOTLOADER_BUILD -c -MD -o build/LOPY_868/release/bootloader/gpio.o bootloader/gpio.c bootloader/gpio.c:238:11: error: conflicting types for 'gpio_config' esp_err_t gpio_config(gpio_config_t pGPIOConfig) ^ In file included from /root/pycom-esp-idf/components/esp32/include/esp_sleep.h:19:0, from /root/pycom-esp-idf/components/esp32/include/esp_system.h:21, from /root/pycom-esp-idf/components/freertos/include/freertos/portable.h:126, from /root/pycom-esp-idf/components/freertos/include/freertos/FreeRTOS.h:105, from bootloader/gpio.c:18: /root/pycom-esp-idf/components/driver/include/driver/gpio.h:249:11: note: previous declaration of 'gpio_config' was here esp_err_t gpio_config(const gpio_config_t pGPIOConfig); ^ bootloader/bootloader.c: In function 'bootloader_main': bootloader/bootloader.c:390:5: error: implicit declaration of function 'esp_image_load_header' [-Werror=implicit-function-declaration] if(esp_image_load_header(0x1000, true, &fhdr) != ESP_OK) { ^ bootloader/bootloader.c: In function 'unpack_load_app': bootloader/bootloader.c:534:5: error: implicit declaration of function 'esp_image_basic_verify' [-Werror=implicit-function-declaration] err = esp_image_basic_verify(partition->offset, true, &image_length); ^ bootloader/bootloader.c:568:9: error: implicit declaration of function 'esp_image_load_segment_header' [-Werror=implicit-function-declaration] if(esp_image_load_segment_header(segment, partition->offset, ^ ../py/mkrules.mk:47: fallo en las instrucciones para el objetivo 'build/LOPY_868/release/bootloader/gpio.o' make: [build/LOPY_868/release/bootloader/gpio.o] Error 1 make: Se espera a que terminen otras tareas.... cc1: all warnings being treated as errors ../py/mkrules.mk:47: fallo en las instrucciones para el objetivo 'build/LOPY_868/release/bootloader/bootloader.o' make: *** [build/LOPY_868/release/bootloader/bootloader.o] Error 1

Any suggestion?

Thanks !

johncblacker commented 5 years ago

(sysname='esp32', nodename='esp32', release='1.10.0', version='v1.10-98-g4daee3170 on 2019-02-14', machine='ESP32 module with ESP32') Trying to build for my TTGO ESP32/LoRa board currently running the above firmware. I get the following error right off the bat. ------------------------------ error pasted below ----------------------------- jobla@DESKTOP-FS36I9G:~/xtensa-esp32-elf/ESP32-micropython-lora/esp32$ make BOARD=LOPY TARGET=boot Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. mkdir -p build/LOPY_868/release/bootloader/ CC bootloader/bootloader.c In file included from bootloader/bootloader.c:20:0: bootloader/bootloader.h:18:34: fatal error: esp_flash_data_types.h: No such file or directory

include "esp_flash_data_types.h"

                              ^

compilation terminated. ../py/mkrules.mk:47: recipe for target 'build/LOPY_868/release/bootloader/bootloader.o' failed make: *** [build/LOPY_868/release/bootloader/bootloader.o] Error 1 ------------ end of pasted error data ---------------------- Dont think I missed a step. Looked in bootloader/bootloader and the referenced header file is not there.

johncblacker commented 5 years ago

I have verified that the esp_flash_data_types.h file resides in the ~pycom-esp-idf/components/esp32/include directory.