Open ptal78 opened 3 years ago
Seems to be because micropython needs a cmake interface file now
https://github.com/devbis/st7789_mpy/pull/20 appears to be a fix for this
I finally got it to work using an absolute path
make USER_C_MODULES=~/st7789_mpy/st7789/micropython.cmake all
Thanks.
I'll try this, but the file is a .mk not a .cmake
Do I possibly have the wrong files?
Phil
On Fri, Apr 16, 2021, 08:01 Colin Alston @.***> wrote:
I finally got it to work using an absolute path
make USER_C_MODULES=~/st7789_mpy/st7789/micropython.cmake all
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/devbis/st7789_mpy/issues/21#issuecomment-820757024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF6UV35MJ5WTF3YOYYHXSODTI5O3NANCNFSM4272UNJA .
it has changed in the new micropython codebase. See the pull requests fork at https://github.com/udifuchs/st7789_mpy - I just got it working now
It's making more progress, but now I get the following error.
Building C object esp-idf/main/CMakeFiles/idf_main.dir///frozen_content.c.obj FAILED: esp-idf/main/CMakeFiles/idf_main.dir///frozen_content.c.obj
try a make clean
and run it again. I also had a few strange issues but it eventually worked
Champion. That has worked a treat!
So it builds with the following and works great now thanks so much.
To sumerize I did the following:
make clean make USER_C_MODULES=~/st7789_mpy/st7789/micropython.cmake all
I have flashed the ESP32 using the following code changing the port and baud rate.
/home/pico/.espressif/python_env/idf4.3_py3.8_env/bin/python ../../../esp/esp-idf/components/esptool_py/esptool/esptool.py -p /dev/ttyS12 -b 921600 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build-GENERIC/bootloader/bootloader.bin 0x8000 build-GENERIC/partition_table/partition-table.bin 0x10000 build-GENERIC/micropython.bin
Then I use putty serial at 15200 baud rate (in Windows on COM12)
Doesn't build.
❯ make USER_C_MODULES=$HOME/devel/mine/micropython/st7789_mpy all
idf.py -D MICROPY_BOARD=ESP32_GENERIC -D MICROPY_BOARD_DIR="/Users/I530566/devel/mine/esp32/micropython/ports/esp32/boards/ESP32_GENERIC" -DUSER_C_MODULES=/Users/I530566/devel/mine/micropython/st7789_mpy -B build-ESP32_GENERIC build || (echo -e "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m"; false)
Executing action: all (aliases: build)
Running cmake in directory /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC
Executing "cmake -G 'Unix Makefiles' -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/I530566/.espressif/python_env/idf5.2_py3.11_env/bin/python -DESP_PLATFORM=1 -DMICROPY_BOARD=ESP32_GENERIC -DMICROPY_BOARD_DIR=/Users/I530566/devel/mine/esp32/micropython/ports/esp32/boards/ESP32_GENERIC -DUSER_C_MODULES=/Users/I530566/devel/mine/micropython/st7789_mpy -DCCACHE_ENABLE=0 /Users/I530566/devel/mine/esp32/micropython/ports/esp32"...
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig'
-- Found Git: /opt/homebrew/bin/git (found version "2.47.0")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/I530566/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/I530566/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/I530566/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
Processing 2 dependencies:
[1/2] espressif/mdns (1.1.0)
[2/2] idf (5.2.2)
-- Project sdkconfig file /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig
Loading defaults file /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined...
/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined:100 CONFIG_ESP32_WIFI_IRAM_OPT was replaced with CONFIG_ESP_WIFI_IRAM_OPT
/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined:101 CONFIG_ESP32_WIFI_RX_IRAM_OPT was replaced with CONFIG_ESP_WIFI_RX_IRAM_OPT
/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined:161 CONFIG_BT_NIMBLE_TASK_STACK_SIZE was replaced with CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE
-- Compiler supported targets: xtensa-esp-elf
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: /Users/I530566/.espressif/python_env/idf5.2_py3.11_env/bin/python (found version "3.11.6") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "micropython" version: v1.24.0
-- Adding linker script /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
Including User C Module(s) from /Users/I530566/devel/mine/micropython/st7789_mpy
CMake Error at /Users/I530566/devel/mine/esp32/micropython/py/usermod.cmake:46 (include):
include requested file is a directory:
/Users/I530566/devel/mine/micropython/st7789_mpy
Call Stack (most recent call first):
esp32_common.cmake:22 (include)
main_esp32/CMakeLists.txt:11 (include)
Found User C Module(s):
-- Components: app_trace app_update bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_format esp_bootloader_format esp_coex esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_mm esp_netif esp_netif_stack esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp_wifi espcoredump espressif__mdns esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json log lwip main_esp32 mbedtls mqtt newlib nvs_flash nvs_sec_provider openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /Users/I530566/devel/mine/esp32/esp-idf/components/app_trace /Users/I530566/devel/mine/esp32/esp-idf/components/app_update /Users/I530566/devel/mine/esp32/esp-idf/components/bootloader /Users/I530566/devel/mine/esp32/esp-idf/components/bootloader_support /Users/I530566/devel/mine/esp32/esp-idf/components/bt /Users/I530566/devel/mine/esp32/esp-idf/components/cmock /Users/I530566/devel/mine/esp32/esp-idf/components/console /Users/I530566/devel/mine/esp32/esp-idf/components/cxx /Users/I530566/devel/mine/esp32/esp-idf/components/driver /Users/I530566/devel/mine/esp32/esp-idf/components/efuse /Users/I530566/devel/mine/esp32/esp-idf/components/esp-tls /Users/I530566/devel/mine/esp32/esp-idf/components/esp_adc /Users/I530566/devel/mine/esp32/esp-idf/components/esp_app_format /Users/I530566/devel/mine/esp32/esp-idf/components/esp_bootloader_format /Users/I530566/devel/mine/esp32/esp-idf/components/esp_coex /Users/I530566/devel/mine/esp32/esp-idf/components/esp_common /Users/I530566/devel/mine/esp32/esp-idf/components/esp_eth /Users/I530566/devel/mine/esp32/esp-idf/components/esp_event /Users/I530566/devel/mine/esp32/esp-idf/components/esp_gdbstub /Users/I530566/devel/mine/esp32/esp-idf/components/esp_hid /Users/I530566/devel/mine/esp32/esp-idf/components/esp_http_client /Users/I530566/devel/mine/esp32/esp-idf/components/esp_http_server /Users/I530566/devel/mine/esp32/esp-idf/components/esp_https_ota /Users/I530566/devel/mine/esp32/esp-idf/components/esp_https_server /Users/I530566/devel/mine/esp32/esp-idf/components/esp_hw_support /Users/I530566/devel/mine/esp32/esp-idf/components/esp_lcd /Users/I530566/devel/mine/esp32/esp-idf/components/esp_local_ctrl /Users/I530566/devel/mine/esp32/esp-idf/components/esp_mm /Users/I530566/devel/mine/esp32/esp-idf/components/esp_netif /Users/I530566/devel/mine/esp32/esp-idf/components/esp_netif_stack /Users/I530566/devel/mine/esp32/esp-idf/components/esp_partition /Users/I530566/devel/mine/esp32/esp-idf/components/esp_phy /Users/I530566/devel/mine/esp32/esp-idf/components/esp_pm /Users/I530566/devel/mine/esp32/esp-idf/components/esp_psram /Users/I530566/devel/mine/esp32/esp-idf/components/esp_ringbuf /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom /Users/I530566/devel/mine/esp32/esp-idf/components/esp_system /Users/I530566/devel/mine/esp32/esp-idf/components/esp_timer /Users/I530566/devel/mine/esp32/esp-idf/components/esp_wifi /Users/I530566/devel/mine/esp32/esp-idf/components/espcoredump /Users/I530566/devel/mine/esp32/micropython/ports/esp32/managed_components/espressif__mdns /Users/I530566/devel/mine/esp32/esp-idf/components/esptool_py /Users/I530566/devel/mine/esp32/esp-idf/components/fatfs /Users/I530566/devel/mine/esp32/esp-idf/components/freertos /Users/I530566/devel/mine/esp32/esp-idf/components/hal /Users/I530566/devel/mine/esp32/esp-idf/components/heap /Users/I530566/devel/mine/esp32/esp-idf/components/http_parser /Users/I530566/devel/mine/esp32/esp-idf/components/idf_test /Users/I530566/devel/mine/esp32/esp-idf/components/ieee802154 /Users/I530566/devel/mine/esp32/esp-idf/components/json /Users/I530566/devel/mine/esp32/esp-idf/components/log /Users/I530566/devel/mine/esp32/esp-idf/components/lwip /Users/I530566/devel/mine/esp32/micropython/ports/esp32/main_esp32 /Users/I530566/devel/mine/esp32/esp-idf/components/mbedtls /Users/I530566/devel/mine/esp32/esp-idf/components/mqtt /Users/I530566/devel/mine/esp32/esp-idf/components/newlib /Users/I530566/devel/mine/esp32/esp-idf/components/nvs_flash /Users/I530566/devel/mine/esp32/esp-idf/components/nvs_sec_provider /Users/I530566/devel/mine/esp32/esp-idf/components/openthread /Users/I530566/devel/mine/esp32/esp-idf/components/partition_table /Users/I530566/devel/mine/esp32/esp-idf/components/perfmon /Users/I530566/devel/mine/esp32/esp-idf/components/protobuf-c /Users/I530566/devel/mine/esp32/esp-idf/components/protocomm /Users/I530566/devel/mine/esp32/esp-idf/components/pthread /Users/I530566/devel/mine/esp32/esp-idf/components/sdmmc /Users/I530566/devel/mine/esp32/esp-idf/components/soc /Users/I530566/devel/mine/esp32/esp-idf/components/spi_flash /Users/I530566/devel/mine/esp32/esp-idf/components/spiffs /Users/I530566/devel/mine/esp32/esp-idf/components/tcp_transport /Users/I530566/devel/mine/esp32/esp-idf/components/ulp /Users/I530566/devel/mine/esp32/esp-idf/components/unity /Users/I530566/devel/mine/esp32/esp-idf/components/usb /Users/I530566/devel/mine/esp32/esp-idf/components/vfs /Users/I530566/devel/mine/esp32/esp-idf/components/wear_levelling /Users/I530566/devel/mine/esp32/esp-idf/components/wifi_provisioning /Users/I530566/devel/mine/esp32/esp-idf/components/wpa_supplicant /Users/I530566/devel/mine/esp32/esp-idf/components/xtensa
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/log/idf_py_stderr_output_35507 and /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/log/idf_py_stdout_output_35507
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [all] Error 1
❯ make USER_C_MODULES=$HOME/devel/mine/micropython/st7789_mpy/st7789/micropython.mk all
idf.py -D MICROPY_BOARD=ESP32_GENERIC -D MICROPY_BOARD_DIR="/Users/I530566/devel/mine/esp32/micropython/ports/esp32/boards/ESP32_GENERIC" -DUSER_C_MODULES=/Users/I530566/devel/mine/micropython/st7789_mpy/st7789/micropython.mk -B build-ESP32_GENERIC build || (echo -e "See \033[1;31mhttps://github.com/micropython/micropython/wiki/Build-Troubleshooting\033[0m"; false)
Executing action: all (aliases: build)
Running cmake in directory /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC
Executing "cmake -G 'Unix Makefiles' -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/I530566/.espressif/python_env/idf5.2_py3.11_env/bin/python -DESP_PLATFORM=1 -DMICROPY_BOARD=ESP32_GENERIC -DMICROPY_BOARD_DIR=/Users/I530566/devel/mine/esp32/micropython/ports/esp32/boards/ESP32_GENERIC -DUSER_C_MODULES=/Users/I530566/devel/mine/micropython/st7789_mpy/st7789/micropython.mk -DCCACHE_ENABLE=0 /Users/I530566/devel/mine/esp32/micropython/ports/esp32"...
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig'
-- Found Git: /opt/homebrew/bin/git (found version "2.47.0")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/I530566/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/I530566/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/I530566/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
Processing 2 dependencies:
[1/2] espressif/mdns (1.1.0)
[2/2] idf (5.2.2)
-- Project sdkconfig file /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig
Loading defaults file /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined...
/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined:100 CONFIG_ESP32_WIFI_IRAM_OPT was replaced with CONFIG_ESP_WIFI_IRAM_OPT
/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined:101 CONFIG_ESP32_WIFI_RX_IRAM_OPT was replaced with CONFIG_ESP_WIFI_RX_IRAM_OPT
/Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/sdkconfig.combined:161 CONFIG_BT_NIMBLE_TASK_STACK_SIZE was replaced with CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE
-- Compiler supported targets: xtensa-esp-elf
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Found Python3: /Users/I530566/.espressif/python_env/idf5.2_py3.11_env/bin/python (found version "3.11.6") found components: Interpreter
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "micropython" version: v1.24.0
-- Adding linker script /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /Users/I530566/devel/mine/esp32/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
Including User C Module(s) from /Users/I530566/devel/mine/micropython/st7789_mpy/st7789/micropython.mk
CMake Error at /Users/I530566/devel/mine/micropython/st7789_mpy/st7789/micropython.mk:1:
Parse error. Expected "(", got unquoted argument with text ":=".
Call Stack (most recent call first):
/Users/I530566/devel/mine/esp32/micropython/py/usermod.cmake:46 (include)
esp32_common.cmake:22 (include)
main_esp32/CMakeLists.txt:11 (include)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/log/idf_py_stderr_output_39263 and /Users/I530566/devel/mine/esp32/micropython/ports/esp32/build-ESP32_GENERIC/log/idf_py_stdout_output_39263
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [all] Error 1
The 4.3 release of ESP-IDF won't compile the c modules into the micropython firmware as has some error using 'make' 'all' that it can't find the 'file' st7789_mpy, when this is actually a folder and not a file.