adafruit / tinyuf2

UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32F4 and iMX RT10xx
MIT License
302 stars 165 forks source link

Can't build Espressif boards on macOS with latest master. #370

Closed UnexpectedMaker closed 6 months ago

UnexpectedMaker commented 6 months ago

Operating System

MacOS

INFO_UF2.TXT

I don't have one - can't even build.

What happened ?

ESP-IDF was removed from lib/esp-idf, but build script is still looking for it and failing when it's not there.

error: pathspec '/Users/seon/tinyuf2/ports/../lib/esp-idf' did not match any file(s) known to git

Reference here I think. https://github.com/adafruit/tinyuf2/blob/fd8b95078ff1249c863a56ec017766921d8ae087/ports/espressif/CMakeLists.txt#L19

Even if I create a symbolic link from my esp-idf folder to lib/esp-idf, it still fails with the same error.

Maybe I'm missing a step - but I can't find any instructions that tap about how to include or reference the IDF now that it's been moved to 5.1.1 and removed as a submodule from lib.

How to reproduce ?

clone a fresh repo, try to build.

Debug Log


idf.py -B_build/unexpectedmaker_tinywatch_s3 -DBOARD=unexpectedmaker_tinywatch_s3 build
Executing action: all (aliases: build)
Running cmake in directory /Users/seon/tinyuf2/ports/espressif/_build/unexpectedmaker_tinywatch_s3
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/Users/seon/.espressif/python_env/idf5.1_py3.11_env/bin/python -DESP_PLATFORM=1 -DBOARD=unexpectedmaker_tinywatch_s3 -DCCACHE_ENABLE=0 /Users/seon/tinyuf2/ports/espressif"...
-- Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found version "3.12.0") found components: Interpreter 
-- Found Git: /opt/homebrew/bin/git (found version "2.42.0") 
error: pathspec '/Users/seon/tinyuf2/ports/../lib/esp-idf' did not match any file(s) known to git
CMake Error at CMakeLists.txt:22 (string):
  string sub-command REPLACE requires at least four arguments.

CMake Error at CMakeLists.txt:23 (string):
  string sub-command REPLACE requires at least four arguments.

CMake Error at CMakeLists.txt:24 (string):
  string sub-command STRIP requires two arguments.

-- GIT_VERSION="0.18.1-34-gfd8b950" ; GIT_SUBMODULE_VERSIONS=""
-- Component directory /Users/seon/tinyuf2/src/favicon does not contain a CMakeLists.txt file. No component will be added
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/seon/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/seon/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-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/seon/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s3
Processing 1 dependencies:
[1/1] idf (5.1.1)
-- Project sdkconfig file /Users/seon/tinyuf2/ports/espressif/_build/unexpectedmaker_tinywatch_s3/sdkconfig
Loading defaults file /Users/seon/tinyuf2/ports/espressif/sdkconfig.defaults...
/Users/seon/tinyuf2/ports/espressif/sdkconfig.defaults:21 CONFIG_FLASHMODE_QIO was replaced with CONFIG_ESPTOOLPY_FLASHMODE_QIO
Loading defaults file /Users/seon/tinyuf2/ports/espressif/boards/unexpectedmaker_tinywatch_s3/sdkconfig...
Compiler supported targets: xtensa-esp32s3-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/seon/.espressif/python_env/idf5.1_py3.11_env/bin/python (found version "3.11.6") found components: Interpreter 
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "tinyuf2" version: 0.18.1-34-gfd8b950
-- Adding linker script /Users/seon/tinyuf2/ports/espressif/_build/unexpectedmaker_tinywatch_s3/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /Users/seon/esp-idf/components/esp_system/ld/esp32s3/sections.ld.in
-- Adding linker script /Users/seon/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.ld
-- Adding linker script /Users/seon/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.api.ld
-- Adding linker script /Users/seon/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.libgcc.ld
-- Adding linker script /Users/seon/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.newlib.ld
-- Adding linker script /Users/seon/esp-idf/components/esp_rom/esp32s3/ld/esp32s3.rom.version.ld
-- Adding linker script /Users/seon/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Components: XPowersLib app_trace app_update boards bootloader bootloader_support bt cmock console cxx driver efuse esp-tls esp_adc esp_app_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 esptool_py fatfs freertos hal heap http_parser idf_test ieee802154 json lcd led_strip log lwip main mbedtls mqtt newlib nvs_flash openthread partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs ssd1306 tcp_transport tinyusb_src touch_element ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /Users/seon/tinyuf2/ports/espressif/components/XPowersLib /Users/seon/esp-idf/components/app_trace /Users/seon/esp-idf/components/app_update /Users/seon/tinyuf2/ports/espressif/boards /Users/seon/tinyuf2/ports/espressif/components/bootloader /Users/seon/esp-idf/components/bootloader_support /Users/seon/esp-idf/components/bt /Users/seon/esp-idf/components/cmock /Users/seon/esp-idf/components/console /Users/seon/esp-idf/components/cxx /Users/seon/esp-idf/components/driver /Users/seon/esp-idf/components/efuse /Users/seon/esp-idf/components/esp-tls /Users/seon/esp-idf/components/esp_adc /Users/seon/esp-idf/components/esp_app_format /Users/seon/esp-idf/components/esp_coex /Users/seon/esp-idf/components/esp_common /Users/seon/esp-idf/components/esp_eth /Users/seon/esp-idf/components/esp_event /Users/seon/esp-idf/components/esp_gdbstub /Users/seon/esp-idf/components/esp_hid /Users/seon/esp-idf/components/esp_http_client /Users/seon/esp-idf/components/esp_http_server /Users/seon/esp-idf/components/esp_https_ota /Users/seon/esp-idf/components/esp_https_server /Users/seon/esp-idf/components/esp_hw_support /Users/seon/esp-idf/components/esp_lcd /Users/seon/esp-idf/components/esp_local_ctrl /Users/seon/esp-idf/components/esp_mm /Users/seon/esp-idf/components/esp_netif /Users/seon/esp-idf/components/esp_netif_stack /Users/seon/esp-idf/components/esp_partition /Users/seon/esp-idf/components/esp_phy /Users/seon/esp-idf/components/esp_pm /Users/seon/esp-idf/components/esp_psram /Users/seon/esp-idf/components/esp_ringbuf /Users/seon/esp-idf/components/esp_rom /Users/seon/esp-idf/components/esp_system /Users/seon/esp-idf/components/esp_timer /Users/seon/esp-idf/components/esp_wifi /Users/seon/esp-idf/components/espcoredump /Users/seon/esp-idf/components/esptool_py /Users/seon/esp-idf/components/fatfs /Users/seon/esp-idf/components/freertos /Users/seon/esp-idf/components/hal /Users/seon/esp-idf/components/heap /Users/seon/esp-idf/components/http_parser /Users/seon/esp-idf/components/idf_test /Users/seon/esp-idf/components/ieee802154 /Users/seon/esp-idf/components/json /Users/seon/tinyuf2/ports/espressif/components/lcd /Users/seon/tinyuf2/ports/espressif/components/led_strip /Users/seon/esp-idf/components/log /Users/seon/esp-idf/components/lwip /Users/seon/tinyuf2/ports/espressif/main /Users/seon/esp-idf/components/mbedtls /Users/seon/esp-idf/components/mqtt /Users/seon/esp-idf/components/newlib /Users/seon/esp-idf/components/nvs_flash /Users/seon/esp-idf/components/openthread /Users/seon/esp-idf/components/partition_table /Users/seon/esp-idf/components/perfmon /Users/seon/esp-idf/components/protobuf-c /Users/seon/esp-idf/components/protocomm /Users/seon/esp-idf/components/pthread /Users/seon/esp-idf/components/sdmmc /Users/seon/esp-idf/components/soc /Users/seon/esp-idf/components/spi_flash /Users/seon/esp-idf/components/spiffs /Users/seon/tinyuf2/ports/espressif/components/ssd1306 /Users/seon/esp-idf/components/tcp_transport /Users/seon/tinyuf2/ports/espressif/components/tinyusb_src /Users/seon/esp-idf/components/touch_element /Users/seon/esp-idf/components/ulp /Users/seon/esp-idf/components/unity /Users/seon/esp-idf/components/usb /Users/seon/esp-idf/components/vfs /Users/seon/esp-idf/components/wear_levelling /Users/seon/esp-idf/components/wifi_provisioning /Users/seon/esp-idf/components/wpa_supplicant /Users/seon/esp-idf/components/xtensa
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /Users/seon/tinyuf2/ports/espressif/_build/unexpectedmaker_tinywatch_s3/log/idf_py_stderr_output_9612 and /Users/seon/tinyuf2/ports/espressif/_build/unexpectedmaker_tinywatch_s3/log/idf_py_stdout_output_9612
make: *** [all] Error 2```

### Screenshots

_No response_
UnexpectedMaker commented 6 months ago

Hey @hathach - Happy new year :) Any idea what's going on here? I have new boards I want to create a PR for, but I want to test them first, and I am unable to build due to this issue. Thanks

hathach commented 6 months ago

should be fixed, please pull and try again.

UnexpectedMaker commented 6 months ago

Thanks! I'll give it a whirl today :)