Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 - failed to build on machine_rtc #4117

Closed
patvdleer opened this issue Sep 10, 2018 · 10 comments
Closed

ESP32 - failed to build on machine_rtc #4117

patvdleer opened this issue Sep 10, 2018 · 10 comments

Comments

@patvdleer
Copy link

I've summed up my actions here:

(skipping the ESP8266)

https://gist.github.com/patvdleer/7ba89a650791ae5c4b0f583760be15d1

In file included from machine_rtc.c:36:
machine_rtc.c:126:34: error: 'machine_rtc_init_obj' defined but not used [-Werror=unused-const-variable=]
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_rtc_init_obj, machine_rtc_init);
                                  ^~~~~~~~~~~~~~~~~~~~
../../py/obj.h:287:38: note: in definition of macro 'MP_DEFINE_CONST_FUN_OBJ_2'
     const mp_obj_fun_builtin_fixed_t obj_name = \
                                      ^~~~~~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:47: recipe for target 'build/machine_rtc.o' failed
make: *** [build/machine_rtc.o] Error 1
@adritium
Copy link

adritium commented Sep 10, 2018

Seems like it belongs on the forum.

https://forum.micropython.org/index.php

@patvdleer
Copy link
Author

patvdleer commented Sep 11, 2018

But this is default code, I haven't made any changes

@patvdleer
Copy link
Author

Checking out v1.9.4 gives me the same result

patrick@patrick-X470:~/git/micropython$ git checkout v1.9.4 

...

HEAD is now at 421b84af9 docs: Bump version to 1.9.4.
patrick@patrick-X470:~/git/micropython$ cd ports/esp32/
patrick@patrick-X470:~/git/micropython/ports/esp32$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
** WARNING **
The git hash of ESP IDF does not match the supported version
The build may complete and the firmware may work but it is not guaranteed
ESP IDF path:       /home/patrick/git/esp-idf
Current git hash:   30545f4cccec7460634b656d278782dd7151098e
Supported git hash: 3ede9f011b50999b0560683f9419538c066dd09e
GEN build/genhdr/mpversion.h
GEN build/genhdr/qstr.i.last
../../extmod/modussl_mbedtls.c:38:10: fatal error: mbedtls/platform.h: No such file or directory
 #include "mbedtls/platform.h"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
moduhashlib.c:28:10: fatal error: mbedtls/sha256.h: No such file or directory
 #include "mbedtls/sha256.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
../../py/mkrules.mk:70: recipe for target 'build/genhdr/qstr.i.last' failed
make: *** [build/genhdr/qstr.i.last] Error 1
make: *** Deleting file 'build/genhdr/qstr.i.last'

patrick@patrick-X470:~/git/esp-idf$ git checkout 3ede9f011b50999b0560683f9419538c066dd09e
warning: unable to rmdir 'components/asio/asio': Directory not empty
warning: unable to rmdir 'components/expat/expat': Directory not empty
warning: unable to rmdir 'components/mbedtls/mbedtls': Directory not empty
M	components/aws_iot/aws-iot-device-sdk-embedded-C
M	components/bt/lib
M	components/esp32/lib
M	components/esptool_py/esptool
M	components/micro-ecc/micro-ecc
Previous HEAD position was 30545f4c Merge branch 'bugfix/btdm_fix_get_bond_list_error_when_connection_with_no_bond' into 'master'
HEAD is now at 3ede9f01 Merge branch 'feature/openssl_cacert' into 'master'

# back to micropython

patrick@patrick-X470:~/git/micropython/ports/esp32$ make

In file included from machine_rtc.c:36:
machine_rtc.c:126:34: error: 'machine_rtc_init_obj' defined but not used [-Werror=unused-const-variable=]
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_rtc_init_obj, machine_rtc_init);
                                  ^~~~~~~~~~~~~~~~~~~~
../../py/obj.h:280:38: note: in definition of macro 'MP_DEFINE_CONST_FUN_OBJ_2'
     const mp_obj_fun_builtin_fixed_t obj_name = \
                                      ^~~~~~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:47: recipe for target 'build/machine_rtc.o' failed
make: *** [build/machine_rtc.o] Error 1

@robert-hh
Copy link
Contributor

Please

  • move in your esp-idf directory /home/patrick/git/esp-idf
  • issue the command: git checkout 3ede9f011b50999b0560683f9419538c066dd09e
  • issue the command: git submodule update --init --recursive
  • go to the ESP32 directory and issue the command make clean
    and then try to build the esp32 firmware again.

@patvdleer
Copy link
Author

patrick@patrick-X470:~$ cd /home/patrick/git/esp-idf
patrick@patrick-X470:~/git/esp-idf$ git checkout 3ede9f011b50999b0560683f9419538c066dd09e
M	components/aws_iot/aws-iot-device-sdk-embedded-C
M	components/bt/lib
M	components/esp32/lib
M	components/esptool_py/esptool
M	components/micro-ecc/micro-ecc
HEAD is now at 3ede9f01 Merge branch 'feature/openssl_cacert' into 'master'
patrick@patrick-X470:~/git/esp-idf$ git submodule update --init --recursive
Submodule path 'components/aws_iot/aws-iot-device-sdk-embedded-C': checked out '8bf852db77c360eebfa4b800754fdb90e29ea43e'
Submodule path 'components/bt/lib': checked out '0575731e349ca54b46cfc084a752790c1ddcdbba'
Submodule path 'components/esp32/lib': checked out '898cc43904003cdf8e19fe6bb8dc50c629d09eff'
Submodule path 'components/esptool_py/esptool': checked out '200ab6e39487bef1df9db12a5be5b0682d80d3c1'
Submodule path 'components/micro-ecc/micro-ecc': checked out '14222e062d77f45321676e813d9525f32a88e8fa'
patrick@patrick-X470:~/git/esp-idf$ cd ../micropython/ports/esp32/
patrick@patrick-X470:~/git/micropython/ports/esp32$ make clean
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
rm -rf build 
patrick@patrick-X470:~/git/micropython/ports/esp32$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
mkdir -p build/bootloader//home/patrick/git/esp-idf/components/bootloader/subproject/main/
mkdir -p build/bootloader//home/patrick/git/esp-idf/components/bootloader_support/src/
mkdir -p build/bootloader//home/patrick/git/esp-idf/components/log/
mkdir -p build/bootloader//home/patrick/git/esp-idf/components/micro-ecc/micro-ecc/
mkdir -p build/bootloader//home/patrick/git/esp-idf/components/soc/esp32/
mkdir -p build/bootloader//home/patrick/git/esp-idf/components/spi_flash/
CC /home/patrick/git/esp-idf/components/bootloader_support/src/bootloader_clock.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/bootloader_flash.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/bootloader_random.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/bootloader_sha.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/secure_boot_signatures.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/secure_boot.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/esp_image_format.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/flash_encrypt.c
CC /home/patrick/git/esp-idf/components/bootloader_support/src/flash_partitions.c
CC /home/patrick/git/esp-idf/components/log/log.c
CC /home/patrick/git/esp-idf/components/spi_flash/spi_flash_rom_patch.c
CC /home/patrick/git/esp-idf/components/soc/esp32/rtc_clk.c
CC /home/patrick/git/esp-idf/components/soc/esp32/rtc_time.c
CC /home/patrick/git/esp-idf/components/micro-ecc/micro-ecc/uECC.c
CC /home/patrick/git/esp-idf/components/bootloader/subproject/main/bootloader_start.c
LINK build/bootloader.elf
Create build/bootloader.bin
esptool.py v2.2.1
Create build/partitions.bin
mkdir -p build/genhdr
GEN build/genhdr/mpversion.h
GEN build/genhdr/qstr.i.last
GEN build/genhdr/qstr.split
GEN build/genhdr/qstrdefs.collected.h
QSTR updated
GEN build/genhdr/qstrdefs.generated.h
mkdir -p build//home/patrick/git/esp-idf/components/app_trace/
mkdir -p build//home/patrick/git/esp-idf/components/app_update/
mkdir -p build//home/patrick/git/esp-idf/components/cxx/
mkdir -p build//home/patrick/git/esp-idf/components/driver/
mkdir -p build//home/patrick/git/esp-idf/components/esp32/
mkdir -p build//home/patrick/git/esp-idf/components/esp32/hwcrypto/
mkdir -p build//home/patrick/git/esp-idf/components/ethernet/
mkdir -p build//home/patrick/git/esp-idf/components/ethernet/eth_phy/
mkdir -p build//home/patrick/git/esp-idf/components/expat/library/
mkdir -p build//home/patrick/git/esp-idf/components/expat/port/
mkdir -p build//home/patrick/git/esp-idf/components/freertos/
mkdir -p build//home/patrick/git/esp-idf/components/heap/
mkdir -p build//home/patrick/git/esp-idf/components/json/cJSON/
mkdir -p build//home/patrick/git/esp-idf/components/log/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/api/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/apps/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/apps/sntp/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/core/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/core/ipv4/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/core/ipv6/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/netif/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/port/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/port/freertos/
mkdir -p build//home/patrick/git/esp-idf/components/lwip/port/netif/
mkdir -p build//home/patrick/git/esp-idf/components/mbedtls/library/
mkdir -p build//home/patrick/git/esp-idf/components/mbedtls/port/
mkdir -p build//home/patrick/git/esp-idf/components/newlib/
mkdir -p build//home/patrick/git/esp-idf/components/nghttp/nghttp2/lib/
mkdir -p build//home/patrick/git/esp-idf/components/nghttp/port/
mkdir -p build//home/patrick/git/esp-idf/components/nvs_flash/src/
mkdir -p build//home/patrick/git/esp-idf/components/pthread/
mkdir -p build//home/patrick/git/esp-idf/components/soc/esp32/
mkdir -p build//home/patrick/git/esp-idf/components/spi_flash/
mkdir -p build//home/patrick/git/esp-idf/components/tcpip_adapter/
mkdir -p build//home/patrick/git/esp-idf/components/ulp/
mkdir -p build//home/patrick/git/esp-idf/components/vfs/
mkdir -p build//home/patrick/git/esp-idf/components/wpa_supplicant/port/
mkdir -p build//home/patrick/git/esp-idf/components/wpa_supplicant/src/crypto/
mkdir -p build//home/patrick/git/esp-idf/components/wpa_supplicant/src/fast_crypto/
mkdir -p build//home/patrick/git/esp-idf/components/xtensa-debug-module/
mkdir -p build/build/
mkdir -p build/drivers/bus/
mkdir -p build/drivers/dht/
mkdir -p build/extmod/
mkdir -p build/lib/berkeley-db-1.xx/btree/
mkdir -p build/lib/berkeley-db-1.xx/mpool/
mkdir -p build/lib/embed/
mkdir -p build/lib/libm/
mkdir -p build/lib/mp-readline/
mkdir -p build/lib/netutils/
mkdir -p build/lib/oofatfs/
mkdir -p build/lib/oofatfs/option/
mkdir -p build/lib/timeutils/
mkdir -p build/lib/utils/
mkdir -p build/py/
CC ../../py/mpstate.c
CC ../../py/nlr.c
CC ../../py/nlrx86.c
CC ../../py/nlrx64.c
CC ../../py/nlrthumb.c
CC ../../py/nlrxtensa.c
CC ../../py/nlrsetjmp.c
CC ../../py/malloc.c
CC ../../py/gc.c
CC ../../py/pystack.c
CC ../../py/qstr.c
CC ../../py/vstr.c
CC ../../py/mpprint.c
CC ../../py/unicode.c
CC ../../py/mpz.c
CC ../../py/reader.c
CC ../../py/lexer.c
CC ../../py/parse.c
CC ../../py/scope.c
CC ../../py/compile.c
CC ../../py/emitcommon.c
CC ../../py/emitbc.c
CC ../../py/asmbase.c
CC ../../py/asmx64.c
CC ../../py/emitnx64.c
CC ../../py/asmx86.c
CC ../../py/emitnx86.c
CC ../../py/asmthumb.c
CC ../../py/emitnthumb.c
CC ../../py/emitinlinethumb.c
CC ../../py/asmarm.c
CC ../../py/emitnarm.c
CC ../../py/asmxtensa.c
CC ../../py/emitnxtensa.c
CC ../../py/emitinlinextensa.c
CC ../../py/formatfloat.c
CC ../../py/parsenumbase.c
CC ../../py/parsenum.c
CC ../../py/emitglue.c
CC ../../py/persistentcode.c
CC ../../py/runtime.c
CC ../../py/runtime_utils.c
CC ../../py/scheduler.c
CC ../../py/nativeglue.c
CC ../../py/stackctrl.c
CC ../../py/argcheck.c
CC ../../py/warning.c
CC ../../py/map.c
CC ../../py/obj.c
CC ../../py/objarray.c
CC ../../py/objattrtuple.c
CC ../../py/objbool.c
CC ../../py/objboundmeth.c
CC ../../py/objcell.c
CC ../../py/objclosure.c
CC ../../py/objcomplex.c
CC ../../py/objdeque.c
CC ../../py/objdict.c
CC ../../py/objenumerate.c
CC ../../py/objexcept.c
CC ../../py/objfilter.c
CC ../../py/objfloat.c
CC ../../py/objfun.c
CC ../../py/objgenerator.c
CC ../../py/objgetitemiter.c
CC ../../py/objint.c
CC ../../py/objint_longlong.c
CC ../../py/objint_mpz.c
CC ../../py/objlist.c
CC ../../py/objmap.c
CC ../../py/objmodule.c
CC ../../py/objobject.c
CC ../../py/objpolyiter.c
CC ../../py/objproperty.c
CC ../../py/objnone.c
CC ../../py/objnamedtuple.c
CC ../../py/objrange.c
CC ../../py/objreversed.c
CC ../../py/objset.c
CC ../../py/objsingleton.c
CC ../../py/objslice.c
CC ../../py/objstr.c
CC ../../py/objstrunicode.c
CC ../../py/objstringio.c
CC ../../py/objtuple.c
CC ../../py/objtype.c
CC ../../py/objzip.c
CC ../../py/opmethods.c
CC ../../py/sequence.c
CC ../../py/stream.c
CC ../../py/binary.c
CC ../../py/builtinimport.c
CC ../../py/builtinevex.c
CC ../../py/builtinhelp.c
CC ../../py/modarray.c
CC ../../py/modbuiltins.c
CC ../../py/modcollections.c
CC ../../py/modgc.c
CC ../../py/modio.c
CC ../../py/modmath.c
CC ../../py/modcmath.c
CC ../../py/modmicropython.c
CC ../../py/modstruct.c
CC ../../py/modsys.c
CC ../../py/moduerrno.c
CC ../../py/modthread.c
CC ../../py/vm.c
CC ../../py/bc.c
CC ../../py/showbc.c
CC ../../py/repl.c
CC ../../py/smallint.c
CC ../../py/frozenmod.c
CC ../../extmod/moductypes.c
CC ../../extmod/modujson.c
CC ../../extmod/modure.c
CC ../../extmod/moduzlib.c
CC ../../extmod/moduheapq.c
CC ../../extmod/modutimeq.c
CC ../../extmod/moduhashlib.c
CC ../../extmod/modubinascii.c
CC ../../extmod/virtpin.c
CC ../../extmod/machine_mem.c
CC ../../extmod/machine_pinbase.c
CC ../../extmod/machine_signal.c
CC ../../extmod/machine_pulse.c
CC ../../extmod/machine_i2c.c
CC ../../extmod/machine_spi.c
CC ../../extmod/modussl_axtls.c
CC ../../extmod/modussl_mbedtls.c
CC ../../extmod/modurandom.c
CC ../../extmod/moduselect.c
CC ../../extmod/modwebsocket.c
CC ../../extmod/modwebrepl.c
CC ../../extmod/modframebuf.c
CC ../../extmod/vfs.c
CC ../../extmod/vfs_reader.c
CC ../../extmod/vfs_fat.c
CC ../../extmod/vfs_fat_diskio.c
CC ../../extmod/vfs_fat_file.c
CC ../../extmod/utime_mphal.c
CC ../../extmod/uos_dupterm.c
CC ../../lib/embed/abort_.c
CC ../../lib/utils/printf.c
MPY modules/ds18x20.py
MPY modules/upip_utarfile.py
MPY modules/apa106.py
MPY modules/onewire.py
MPY modules/dht.py
MPY modules/websocket_helper.py
MPY modules/flashbdev.py
MPY modules/inisetup.py
MPY modules/upip.py
MPY modules/ntptime.py
MPY modules/webrepl_setup.py
MPY modules/webrepl.py
MPY modules/neopixel.py
MPY modules/_boot.py
GEN build/frozen_mpy.c
CC build/frozen_mpy.c
CC main.c
CC uart.c
CC gccollect.c
CC mphalport.c
CC fatfs_port.c
CC help.c
CC modutime.c
CC moduos.c
CC machine_timer.c
CC machine_pin.c
CC machine_touchpad.c
CC machine_adc.c
CC machine_dac.c
CC machine_pwm.c
CC machine_uart.c
CC modmachine.c
CC modnetwork.c
CC network_lan.c
CC modsocket.c
CC modesp.c
CC esp32_ulp.c
CC modesp32.c
CC moduhashlib.c
CC espneopixel.c
CC machine_hw_spi.c
CC machine_wdt.c
CC mpthreadport.c
CC machine_rtc.c
In file included from machine_rtc.c:36:
machine_rtc.c:126:34: error: 'machine_rtc_init_obj' defined but not used [-Werror=unused-const-variable=]
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_rtc_init_obj, machine_rtc_init);
                                  ^~~~~~~~~~~~~~~~~~~~
../../py/obj.h:280:38: note: in definition of macro 'MP_DEFINE_CONST_FUN_OBJ_2'
     const mp_obj_fun_builtin_fixed_t obj_name = \
                                      ^~~~~~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:47: recipe for target 'build/machine_rtc.o' failed
make: *** [build/machine_rtc.o] Error 1

@adritium
Copy link

It's a bug: machine_rtc_datetime_obj is pasted twice so machine_rtc_init_obj is not used giving you

error: 'machine_rtc_init_obj' defined but not used

STATIC const mp_rom_map_elem_t machine_rtc_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&machine_rtc_datetime_obj) },
{ MP_ROM_QSTR(MP_QSTR_datetime), MP_ROM_PTR(&machine_rtc_datetime_obj) },
{ MP_ROM_QSTR(MP_QSTR_memory), MP_ROM_PTR(&machine_rtc_memory_obj) },
};

@patvdleer
Copy link
Author

I was able to fix this but it simply drops me into the next error...

/home/patrick/esp/esp-idf/components/driver/rtc_module.c:99:33: error: initialization of '_lock_t' {aka 'int'} from 'void *' makes integer from pointer without a cast [-Werror=int-conversion]
 static _lock_t adc2_wifi_lock = NULL;
                                 ^~~~
/home/patrick/esp/esp-idf/components/driver/rtc_module.c:104:32: error: initialization of '_lock_t' {aka 'int'} from 'void *' makes integer from pointer without a cast [-Werror=int-conversion]
 static _lock_t adc1_i2s_lock = NULL;
                                ^~~~
cc1: all warnings being treated as errors
../../py/mkrules.mk:47: recipe for target 'build//home/patrick/esp/esp-idf/components/driver/rtc_module.o' failed
make: *** [build//home/patrick/esp/esp-idf/components/driver/rtc_module.o] Error 1

@patvdleer
Copy link
Author

patvdleer commented Sep 16, 2018

Since I kept running into errors I simply updated the Makefile to the following:

micropython/ports/esp32/Makefile@96

CFLAGS_BASE = -std=gnu99 -Os -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=unused-const-variable -Wno-error=int-conversion -Wno-error=sizeof-pointer-memaccess -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H -DESP_PLATFORM
CFLAGS = $(CFLAGS_BASE) $(INC) $(INC_ESPCOMP)
CFLAGS += -DIDF_VER=\"$(IDF_VER)\"
CFLAGS += $(CFLAGS_MOD)

# this is what ESPIDF uses for c++ compilation
CXXFLAGS = -std=gnu++11 -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wall -Werror -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-error=parentheses -Wno-error=sizeof-pointer-memaccess -DESP_PLATFORM $(INC) $(INC_ESPCOMP)

This eventually gives me a fail:

LINK build/application.elf
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o:(.literal.emac_process_rx$part$0+0x10): undefined reference to `emac_enable_rx_intr'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o:(.literal.esp_eth_free_rx_buf+0x18): undefined reference to `emac_send_pause_zero_frame_enable'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o:(.literal.emac_task+0x10): undefined reference to `emac_enable_rx_unavail_intr'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o:(.iram1.literal+0x1c): undefined reference to `emac_disable_rx_intr'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o:(.iram1.literal+0x20): undefined reference to `emac_send_pause_frame_enable'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o:(.iram1.literal+0x24): undefined reference to `emac_disable_rx_unavail_intr'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o: In function `emac_process_rx$part$0':
emac_main.c:(.text.emac_process_rx$part$0+0x6c): undefined reference to `emac_enable_rx_intr'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o: In function `esp_eth_free_rx_buf':
emac_main.c:(.text.esp_eth_free_rx_buf+0x97): undefined reference to `emac_send_pause_zero_frame_enable'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o: In function `emac_task':
emac_main.c:(.text.emac_task+0xc1): undefined reference to `emac_enable_rx_intr'
emac_main.c:(.text.emac_task+0xc7): undefined reference to `emac_enable_rx_unavail_intr'
build//home/patrick/esp/esp-idf/components/ethernet/emac_main.o: In function `emac_process_intr':
emac_main.c:(.iram1+0x87): undefined reference to `emac_disable_rx_intr'
emac_main.c:(.iram1+0xc4): undefined reference to `emac_send_pause_frame_enable'
emac_main.c:(.iram1+0xd4): undefined reference to `emac_disable_rx_unavail_intr'
/home/patrick/esp/esp-idf/components/esp32/lib/libcoexist.a(coexist_api.o):(.iram1+0x8): undefined reference to `coexist_printf'
/home/patrick/esp/esp-idf/components/esp32/lib/libcoexist.a(coexist_api.o): In function `coex_wifi_request':
(.iram1+0x1f): undefined reference to `coexist_printf'
(.iram1+0x4f): undefined reference to `coexist_printf'
/home/patrick/esp/esp-idf/components/esp32/lib/libcoexist.a(coexist_api.o): In function `coex_wifi_release':
(.iram1+0x7b): undefined reference to `coexist_printf'
/home/patrick/esp/esp-idf/components/esp32/lib/libcoexist.a(coexist_api.o): In function `coex_bt_request':
(.iram1+0xab): undefined reference to `coexist_printf'
/home/patrick/esp/esp-idf/components/esp32/lib/libcoexist.a(coexist_core.o):(.iram1+0xc3): more undefined references to `coexist_printf' follow
/home/patrick/esp/esp-idf/components/esp32/lib/libnet80211.a(ieee80211_api.o):(.text.esp_wifi_scan_get_ap_records+0x8): undefined reference to `esp_mesh_is_scan_allowed'
/home/patrick/esp/esp-idf/components/esp32/lib/libnet80211.a(ieee80211_api.o): In function `esp_wifi_scan_get_ap_records':
(.text.esp_wifi_scan_get_ap_records+0x100): undefined reference to `esp_mesh_is_scan_allowed'
Makefile:663: recipe for target 'build/application.elf' failed
make: *** [build/application.elf] Error 1

@patvdleer patvdleer reopened this Sep 16, 2018
@patvdleer
Copy link
Author

All warnings/errors suppressed:

machine_rtc.c:126:34: warning: 'machine_rtc_init_obj' defined but not used [-Wunused-const-variable=]
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_rtc_init_obj, machine_rtc_init);
                                  ^~~~~~~~~~~~~~~~~~~~
../../py/obj.h:280:38: note: in definition of macro 'MP_DEFINE_CONST_FUN_OBJ_2'
     const mp_obj_fun_builtin_fixed_t obj_name = \
                                      ^~~~~~~~
/home/patrick/esp/esp-idf/components/driver/rtc_module.c:99:33: warning: initialization of '_lock_t' {aka 'int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 static _lock_t adc2_wifi_lock = NULL;
                                 ^~~~
/home/patrick/esp/esp-idf/components/driver/rtc_module.c:104:32: warning: initialization of '_lock_t' {aka 'int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion]
 static _lock_t adc1_i2s_lock = NULL;
                                ^~~~
In file included from /home/patrick/esp/esp-idf/components/newlib/include/stdlib.h:18,
                 from /home/patrick/esp/esp-idf/components/cxx/cxx_guards.cpp:15:
/home/patrick/esp/esp-idf/components/newlib/include/sys/reent.h:405:11: warning: unnecessary parentheses in declaration of '_sig_func' [-Wparentheses]
   void (**(_sig_func))(int);
           ^
In file included from /home/patrick/esp/esp-idf/components/newlib/include/stdio.h:47,
                 from /home/patrick/esp/esp-idf/components/esp32/include/esp_err.h:17,
                 from /home/patrick/esp/esp-idf/components/nvs_flash/include/nvs.h:20,
                 from /home/patrick/esp/esp-idf/components/nvs_flash/src/nvs_page.hpp:17,
                 from /home/patrick/esp/esp-idf/components/nvs_flash/src/nvs_page.cpp:14:
/home/patrick/esp/esp-idf/components/newlib/include/sys/reent.h:405:11: warning: unnecessary parentheses in declaration of '_sig_func' [-Wparentheses]
   void (**(_sig_func))(int);
           ^
In file included from /home/patrick/esp/esp-idf/components/newlib/include/stdio.h:47,
                 from /home/patrick/esp/esp-idf/components/esp32/include/esp_err.h:17,
                 from /home/patrick/esp/esp-idf/components/nvs_flash/include/nvs.h:20,
                 from /home/patrick/esp/esp-idf/components/nvs_flash/src/nvs_item_hash_list.hpp:18,
                 from /home/patrick/esp/esp-idf/components/nvs_flash/src/nvs_item_hash_list.cpp:15:
/home/patrick/esp/esp-idf/components/newlib/include/sys/reent.h:405:11: warning: unnecessary parentheses in declaration of '_sig_func' [-Wparentheses]
   void (**(_sig_func))(int);
           ^
/home/patrick/esp/esp-idf/components/spi_flash/partition.c: In function 'load_partitions':
/home/patrick/esp/esp-idf/components/spi_flash/partition.c:179:66: warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
         strncpy(item->info.label, (const char*) it->label, sizeof(it->label));                     

@dpgeorge
Copy link
Member

The warning with machine_rtc_init_obj is fixed in 1857165

The other warnings are within the ESP IDF itself so can't be fixed here. It looks like you are using a custom toolchain built from source, not the precompiled one from Espressif, so that could be the issue. I'd suggest trying their provided compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants