micropython / micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
https://micropython.org
Other
19.09k stars 7.63k forks source link

ESP32 micropython Compilation error! #7118

Closed MRxing1 closed 3 years ago

MRxing1 commented 3 years ago

CC extmod/mpexception.c CC ../../lib/oofatfs/ff.c CC ../../lib/oofatfs/ffunicode.c CC ../../lib/littlefs/lfs2.c CC ../../lib/littlefs/lfs2_util.c CC ../../extmod/modbtree.c In file included from ../../lib/berkeley-db-1.xx/PORT/include/../../btree/btree.h:44:0, from ../../extmod/modbtree.c:38: ../../lib/berkeley-db-1.xx/PORT/include/mpool.h:50:2: error: expected specifier-qualifier-list before 'CIRCLEQ_ENTRY' CIRCLEQ_ENTRY(_bkt) hq; / hash queue / ^ ../../lib/berkeley-db-1.xx/PORT/include/mpool.h:61:2: error: expected specifier-qualifier-list before 'CIRCLEQ_HEAD' CIRCLEQ_HEAD(_lqh, _bkt) lqh; / lru queue head / ^ ../../extmod/modbtree.c:329:14: error: unknown type name 'FILEVTABLE' STATIC const FILEVTABLE btree_stream_fvtable = { ^ ../../extmod/modbtree.c:330:5: error: initialization makes integer from pointer without a cast [-Werror=int-conversion] mp_stream_posix_read, ^ ../../extmod/modbtree.c:330:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c:331:5: error: excess elements in scalar initializer [-Werror] mp_stream_posix_write, ^ ../../extmod/modbtree.c:331:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c:332:5: error: excess elements in scalar initializer [-Werror] mp_stream_posix_lseek, ^ ../../extmod/modbtree.c:332:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c:333:5: error: excess elements in scalar initializer [-Werror] mp_stream_posix_fsync ^ ../../extmod/modbtree.c:333:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c: In function 'mod_btree_open': ../../extmod/modbtree.c:362:52: error: passing argument 2 of 'bt_open' makes integer from pointer without a cast [-Werror=int-conversion] DB db = __bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &open ^ In file included from ../../extmod/modbtree.c:37:0: ../../lib/berkeley-db-1.xx/PORT/include/db.h:230:5: note: expected 'int' but argument is of type 'const int ' DB *bt_open P((const char , int, int, const BTREEINFO , int)); ^ ../../extmod/modbtree.c:362:75: error: passing argument 3 of 'bt_open' makes integer from pointer without a cast [-Werror=int-conversion] db = __bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &openinfo, ^ In file included from ../../extmod/modbtree.c:37:0: ../../lib/berkeley-db-1.xx/PORT/include/db.h:230:5: note: expected 'int' but argument is of type 'BTREEINFO {aka struct }' DB bt_open P((const char , int, int, const BTREEINFO , int)); ^ ../../extmod/modbtree.c:362:14: error: too few arguments to function 'bt_open' DB *db = bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &open ^ In file included from ../../extmod/modbtree.c:37:0: ../../lib/berkeley-db-1.xx/PORT/include/db.h:230:5: note: declared here DB __bt_open __P((const char , int, int, const BTREEINFO *, int)); ^ cc1: all warnings being treated as errors ../../py/mkrules.mk:63: recipe for target 'build-GENERIC_SPIRAM/extmod/modbtree.o' failed make: *** [build-GENERIC_SPIRAM/extmod/modbtree.o] Error 1

micropytho Compilation error! 1 lib/berkeley-db-1.xx library file I have loaded and updated. image

2 The following commands have been executed: xkp@xkp-VirtualBox:/esp32/micropython$ git submodule init lib/berkeley-db-1.xx xkp@xkp-VirtualBox:/esp32/micropython$ git submodule update 子模组路径 'lib/berkeley-db-1.xx':检出 '7b31cae3c0892a7fca2089cb0354a4920c98c413'

The result is still not good!

Hope to get your reply!

Best wishes!

dpgeorge commented 3 years ago

This could be related to symlinks in the lib/berkeley-db-1.xx directory. What OS are you building under? What is the contents of lib/berkeley-db-1.xx/PORT/include/mpool.h?

MRxing1 commented 3 years ago

1、my os is ubuntu-18.04.1 2 、The contents of lib/berkeley-db-1.xx/PORT/include/mpool.h is: /*-

include <sys/queue.h>

/*

/ The BKT structures are the elements of the queues. / typedef struct _bkt { CIRCLEQ_ENTRY(_bkt) hq; / hash queue / CIRCLEQ_ENTRY(_bkt) q; / lru queue / void page; / page / pgno_t pgno; / page number */

define MPOOL_DIRTY 0x01 / page needs to be written /

define MPOOL_PINNED 0x02 / page is pinned into memory /

u_int8_t flags;         /* flags */

} BKT;

typedef struct MPOOL { CIRCLEQ_HEAD(_lqh, _bkt) lqh; / lru queue head / / hash queue array / CIRCLEQ_HEAD(_hqh, _bkt) hqh[HASHSIZE]; pgno_t curcache; / current number of cached pages / pgno_t maxcache; / max number of cached pages / pgno_t npages; / number of pages in the file / u_long pagesize; / file page size / int fd; / file descriptor / / page in conversion routine / void (pgin) __P((void , pgno_t, void )); / page out conversion routine / void (pgout) __P((void , pgno_t, void )); void pgcookie; / cookie for page in/out routines */

ifdef STATISTICS

u_long  cachehit;
u_long  cachemiss;
u_long  pagealloc;
u_long  pageflush;
u_long  pageget;
u_long  pagenew;
u_long  pageput;
u_long  pageread;
u_long  pagewrite;

endif

} MPOOL;

BEGIN_DECLS MPOOL *mpool_open P((void , int, pgno_t, pgno_t)); void mpool_filter __P((MPOOL , void ()(void , pgno_t, void ), void ()(void , pgno_t, void ), void )); void mpool_new P((MPOOL , pgno_t )); void *mpool_get P((MPOOL , pgno_t, u_int)); int mpool_put __P((MPOOL , void , u_int)); int mpool_sync __P((MPOOL )); int mpool_close __P((MPOOL *));

ifdef STATISTICS

void mpool_stat __P((MPOOL *));

endif

__END_DECLS

dpgeorge commented 3 years ago

Ok, so it's not an issue with symlinks.

What IDF version are you using? Did you install the correct xtensa toolchain?

MRxing1 commented 3 years ago

Building with ESP IDF v4 https://github.com/espressif/esp-idf branch:release/v4.0

image image

I think my toolchain is installed properly。

MRxing1 commented 3 years ago

The log: xkp@xkp-VirtualBox:~/esp32/micropython/ports/esp32$ make clean MicroPython v1.13-30-g1d344f446-dirty Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. Building with ESP IDF v4 rm -rf build-GENERIC_SPIRAM xkp@xkp-VirtualBox:~/esp32/micropython/ports/esp32$ make MicroPython v1.13-30-g1d344f446-dirty Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. Building with ESP IDF v4 GEN build-GENERIC_SPIRAM/sdkconfig.h mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/bootloader/subproject/main/ mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/bootloader_support/src/ mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/bootloader_support/src/esp32/ mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/log/ mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/soc/esp32/ mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/soc/src/ mkdir -p build-GENERIC_SPIRAM/bootloader//home/xkp/esp32/esp-idf/components/spi_flash/ CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_clock.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_common.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_flash.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_flash_config.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_init.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_random.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/bootloader_utility.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/flash_qio_mode.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/esp_image_format.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/flash_encrypt.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/flash_partitions.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/esp32/bootloader_sha.c CC /home/xkp/esp32/esp-idf/components/bootloader_support/src/esp32/secure_boot.c AR build-GENERIC_SPIRAM/bootloader/libbootloader_support.a CC /home/xkp/esp32/esp-idf/components/log/log.c AR build-GENERIC_SPIRAM/bootloader/liblog.a CC /home/xkp/esp32/esp-idf/components/spi_flash/spi_flash_rom_patch.c AR build-GENERIC_SPIRAM/bootloader/libspi_flash.a CC /home/xkp/esp32/esp-idf/components/soc/esp32/cpu_util.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/gpio_periph.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_clk.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_clk_init.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_init.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_periph.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_pm.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_sleep.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_time.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/rtc_wdt.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/sdio_slave_periph.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/sdmmc_periph.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/soc_memory_layout.c CC /home/xkp/esp32/esp-idf/components/soc/esp32/spi_periph.c CC /home/xkp/esp32/esp-idf/components/soc/src/memory_layout_utils.c AR build-GENERIC_SPIRAM/bootloader/libsoc.a CC /home/xkp/esp32/esp-idf/components/bootloader/subproject/main/bootloader_start.c AR build-GENERIC_SPIRAM/bootloader/libmain.a LINK build-GENERIC_SPIRAM/bootloader.elf Create build-GENERIC_SPIRAM/bootloader.bin esptool.py v2.9-dev Create build-GENERIC_SPIRAM/partitions.bin mkdir -p build-GENERIC_SPIRAM/genhdr GEN build-GENERIC_SPIRAM/genhdr/mpversion.h GEN build-GENERIC_SPIRAM/genhdr/moduledefs.h GEN build-GENERIC_SPIRAM/genhdr/qstr.i.last GEN build-GENERIC_SPIRAM/genhdr/qstr.split GEN build-GENERIC_SPIRAM/genhdr/qstrdefs.collected.h QSTR updated GEN build-GENERIC_SPIRAM/genhdr/qstrdefs.generated.h GEN build-GENERIC_SPIRAM/genhdr/compressed.split GEN build-GENERIC_SPIRAM/genhdr/compressed.collected Compressed data updated GEN build-GENERIC_SPIRAM/genhdr/compressed.data.h mkdir -p build-GENERIC_SPIRAM/build-GENERIC_SPIRAM/ mkdir -p build-GENERIC_SPIRAM/drivers/bus/ mkdir -p build-GENERIC_SPIRAM/drivers/dht/ mkdir -p build-GENERIC_SPIRAM/extmod/ mkdir -p build-GENERIC_SPIRAM/extmod/nimble/ mkdir -p build-GENERIC_SPIRAM/lib/berkeley-db-1.xx/btree/ mkdir -p build-GENERIC_SPIRAM/lib/berkeley-db-1.xx/mpool/ mkdir -p build-GENERIC_SPIRAM/lib/embed/ mkdir -p build-GENERIC_SPIRAM/lib/littlefs/ mkdir -p build-GENERIC_SPIRAM/lib/mbedtls_errors/ mkdir -p build-GENERIC_SPIRAM/lib/mp-readline/ mkdir -p build-GENERIC_SPIRAM/lib/netutils/ mkdir -p build-GENERIC_SPIRAM/lib/oofatfs/ mkdir -p build-GENERIC_SPIRAM/lib/timeutils/ mkdir -p build-GENERIC_SPIRAM/lib/utils/ mkdir -p build-GENERIC_SPIRAM/py/ CC ../../py/mpstate.c CC ../../py/nlr.c CC ../../py/nlrx86.c CC ../../py/nlrx64.c CC ../../py/nlrthumb.c CC ../../py/nlrpowerpc.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/emitnxtensawin.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/pairheap.c CC ../../py/ringbuf.c CC ../../py/stackctrl.c CC ../../py/argcheck.c CC ../../py/warning.c CC ../../py/profile.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/moduasyncio.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/moducryptolib.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/modbluetooth.c CC ../../extmod/modussl_axtls.c CC ../../extmod/modussl_mbedtls.c CC ../../extmod/modurandom.c CC ../../extmod/moduselect.c CC ../../extmod/moduwebsocket.c CC ../../extmod/modwebrepl.c CC ../../extmod/modframebuf.c CC ../../extmod/vfs.c CC ../../extmod/vfs_blockdev.c CC ../../extmod/vfs_reader.c CC ../../extmod/vfs_posix.c CC ../../extmod/vfs_posix_file.c CC ../../extmod/vfs_fat.c CC ../../extmod/vfs_fat_diskio.c CC ../../extmod/vfs_fat_file.c CC ../../extmod/vfs_lfs.c CC ../../extmod/utime_mphal.c CC ../../extmod/uosdupterm.c CC ../../lib/embed/abort.c CC ../../lib/utils/printf.c MPY _boot.py MPY flashbdev.py MPY _main.py MPY inisetup.py MPY apa106.py MPY neopixel.py MPY upip.py MPY upip_utarfile.py MPY ntptime.py MPY dht.py MPY ds18x20.py MPY onewire.py MPY uasyncio/init.py MPY uasyncio/core.py MPY uasyncio/event.py MPY uasyncio/funcs.py MPY uasyncio/lock.py MPY uasyncio/stream.py MPY webrepl.py MPY webrepl_setup.py MPY websocket_helper.py GEN build-GENERIC_SPIRAM/frozen_content.c CC build-GENERIC_SPIRAM/frozen_content.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_i2c.c CC machine_pwm.c CC machine_uart.c CC modmachine.c CC modnetwork.c CC network_lan.c CC network_ppp.c CC nimble.c CC modsocket.c CC modesp.c CC esp32_partition.c CC esp32_rmt.c CC esp32_ulp.c CC modesp32.c CC espneopixel.c CC machine_hw_spi.c CC machine_wdt.c CC mpthreadport.c CC machine_rtc.c CC machine_sdcard.c CC modpycom.c CC pin_def_change.c CC moduqueue.c CC extmod/mpexception.c CC ../../lib/oofatfs/ff.c CC ../../lib/oofatfs/ffunicode.c CC ../../lib/littlefs/lfs2.c CC ../../lib/littlefs/lfs2_util.c CC ../../extmod/modbtree.c In file included from ../../lib/berkeley-db-1.xx/PORT/include/../../btree/btree.h:44:0, from ../../extmod/modbtree.c:38: ../../lib/berkeley-db-1.xx/PORT/include/mpool.h:50:2: error: expected specifier-qualifier-list before 'CIRCLEQ_ENTRY' CIRCLEQ_ENTRY(_bkt) hq; / hash queue / ^ ../../lib/berkeley-db-1.xx/PORT/include/mpool.h:61:2: error: expected specifier-qualifier-list before 'CIRCLEQ_HEAD' CIRCLEQ_HEAD(_lqh, _bkt) lqh; / lru queue head / ^ ../../extmod/modbtree.c:329:14: error: unknown type name 'FILEVTABLE' STATIC const FILEVTABLE btree_stream_fvtable = { ^ ../../extmod/modbtree.c:330:5: error: initialization makes integer from pointer without a cast [-Werror=int-conversion] mp_stream_posix_read, ^ ../../extmod/modbtree.c:330:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c:331:5: error: excess elements in scalar initializer [-Werror] mp_stream_posix_write, ^ ../../extmod/modbtree.c:331:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c:332:5: error: excess elements in scalar initializer [-Werror] mp_stream_posix_lseek, ^ ../../extmod/modbtree.c:332:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c:333:5: error: excess elements in scalar initializer [-Werror] mp_stream_posix_fsync ^ ../../extmod/modbtree.c:333:5: note: (near initialization for 'btree_stream_fvtable') ../../extmod/modbtree.c: In function 'mod_btree_open': ../../extmod/modbtree.c:362:52: error: passing argument 2 of 'bt_open' makes integer from pointer without a cast [-Werror=int-conversion] DB db = __bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &openinfo, /dflags/ 0); ^ In file included from ../../extmod/modbtree.c:37:0: ../../lib/berkeley-db-1.xx/PORT/include/db.h:230:5: note: expected 'int' but argument is of type 'const int ' DB *bt_open P((const char , int, int, const BTREEINFO , int)); ^ ../../extmod/modbtree.c:362:75: error: passing argument 3 of 'bt_open' makes integer from pointer without a cast [-Werror=int-conversion] DB db = __bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &openinfo, /dflags/ 0); ^ In file included from ../../extmod/modbtree.c:37:0: ../../lib/berkeley-db-1.xx/PORT/include/db.h:230:5: note: expected 'int' but argument is of type 'BTREEINFO {aka struct }' DB bt_open P((const char , int, int, const BTREEINFO , int)); ^ ../../extmod/modbtree.c:362:14: error: too few arguments to function 'bt_open' DB *db = bt_open(MP_OBJ_TO_PTR(pos_args[0]), &btree_stream_fvtable, &openinfo, /dflags/ 0); ^ In file included from ../../extmod/modbtree.c:37:0: ../../lib/berkeley-db-1.xx/PORT/include/db.h:230:5: note: declared here DB __bt_open __P((const char , int, int, const BTREEINFO *, int)); ^ cc1: all warnings being treated as errors ../../py/mkrules.mk:63: recipe for target 'build-GENERIC_SPIRAM/extmod/modbtree.o' failed make: *** [build-GENERIC_SPIRAM/extmod/modbtree.o] Error 1

dpgeorge commented 3 years ago

You'll need IDF version v4.0.2 or later. Try v4.2.

MRxing1 commented 3 years ago

OK ,i will try, best wishes !

MRxing1 commented 3 years ago

I tried 4.2 and it still didn't work

xkp@xkp-VirtualBox:~/esp32/micropython/ports/esp32$ make clean MicroPython v1.13-30-g1d344f446-dirty Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. Building with ESP IDF v4 rm -rf build-GENERIC_SPIRAM xkp@xkp-VirtualBox:~/esp32/micropython/ports/esp32$ make MicroPython v1.13-30-g1d344f446-dirty Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. Building with ESP IDF v4 GEN build-GENERIC_SPIRAM/sdkconfig.h Traceback (most recent call last): File "/home/xkp/esp32/esp-idf/tools/kconfig_new/confgen.py", line 641, in main() File "/home/xkp/esp32/esp-idf/tools/kconfig_new/confgen.py", line 261, in main config = kconfiglib.Kconfig(args.kconfig) File "/home/xkp/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 947, in init self._init(filename, warn, warn_to_stderr, encoding) File "/home/xkp/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 1085, in _init self._parse_block(None, self.top_node, self.top_node).next = None File "/home/xkp/esp32/esp-idf/tools/kconfig_new/kconfiglib.py", line 2978, in _parse_block if self.srctree else "unset or blank")) kconfiglib.KconfigError: /home/xkp/esp32/esp-idf/Kconfig:165: '$COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE' not found (in 'source "$COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE"'). Check that environment variables are set correctly (e.g. $srctree, which is unset or blank). Also note that unset environment variables expand to the empty string. Makefile:411: recipe for target 'build-GENERIC_SPIRAM/sdkconfig.h' failed make: *** [build-GENERIC_SPIRAM/sdkconfig.h] Error 1 xkp@xkp-VirtualBox:~/esp32/micropython/ports/esp32$

dpgeorge commented 3 years ago

MicroPython v1.13-30-g1d344f446-dirty

This is an old version. You need to use the latest version of MicroPython.

MRxing1 commented 3 years ago

OK, I see. Thank you very much. It is suggested to add support for queue in the new version of micropython. My version does not have the function of queue, so it is all added by myself.

Thank you very much! Best wishes!

YanMinge commented 3 years ago

I also encountered some compilation problems?

https://forum.micropython.org/viewtopic.php?f=2&t=10103

dpgeorge commented 3 years ago

I also encountered some compilation problems?

Those issues on the forum seem related to the CMake version, which needs to be 3.12 at a minimum to get Python3. See also #7003.