breakstring / eInkCalendarOfToxicSoul

毒鸡汤墨水屏日历
MIT License
592 stars 96 forks source link

编译报错:xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory #20

Closed giottolee closed 3 years ago

giottolee commented 3 years ago

在build的过程中报错,尝试查找了一些原因,有认为是编译出来的ELF是32位,与系统的GCC不兼容,想问下您有什么解决方案吗?谢谢


/Users/giotto/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or director/
/Users/giotto/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1

OS: macOS
IDE:Visualstudio Code + platformio
giottolee commented 3 years ago

目前原因未知,但找到了解决方案,你需要注视掉platformio.ini中的platform_packages

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
platform = espressif32
board = esp32dev
board_build.mcu = esp32
framework = arduino
lib_deps = 
    adafruit/Adafruit GFX Library@^1.10.4
    olikraus/U8g2@^2.28.8
    zinggjm/GxEPD2@^1.2.14
    olikraus/U8g2_for_Adafruit_GFX@^1.7.0
    SPI
    Wire
    SPIFFS
    FS
    adafruit/Adafruit BusIO@^1.7.1
    bblanchon/ArduinoJson@^6.17.2
    mcxiaoke/ESPDateTime@^0.2.0
monitor_speed = 115200
board_build.partitions = huge_app.csv
; platform_packages = platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
build_flags = -D ESP32
breakstring commented 3 years ago

目前原因未知,但找到了解决方案,你需要注视掉platformio.ini中的platform_packages

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
platform = espressif32
board = esp32dev
board_build.mcu = esp32
framework = arduino
lib_deps = 
  adafruit/Adafruit GFX Library@^1.10.4
  olikraus/U8g2@^2.28.8
  zinggjm/GxEPD2@^1.2.14
  olikraus/U8g2_for_Adafruit_GFX@^1.7.0
  SPI
  Wire
  SPIFFS
  FS
  adafruit/Adafruit BusIO@^1.7.1
  bblanchon/ArduinoJson@^6.17.2
  mcxiaoke/ESPDateTime@^0.2.0
monitor_speed = 115200
board_build.partitions = huge_app.csv
; platform_packages = platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
build_flags = -D ESP32

同 #19 后面我的回复: 我原来的版本就是Git上的platformio.ini里面指定的版本。原来使用这个指定版本貌似是因为要访问https的网站,可以直接在client里面setInsecure()比较方便些,不用代码里面硬编码证书相关信息。

可能现在新的正式版本的package里面已经解决这个问题了,所以可以注释掉了吧。

giottolee commented 3 years ago

目前原因未知,但找到了解决方案,你需要注视掉platformio.ini中的platform_packages

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32dev]
platform = espressif32
board = esp32dev
board_build.mcu = esp32
framework = arduino
lib_deps = 
    adafruit/Adafruit GFX Library@^1.10.4
    olikraus/U8g2@^2.28.8
    zinggjm/GxEPD2@^1.2.14
    olikraus/U8g2_for_Adafruit_GFX@^1.7.0
    SPI
    Wire
    SPIFFS
    FS
    adafruit/Adafruit BusIO@^1.7.1
    bblanchon/ArduinoJson@^6.17.2
    mcxiaoke/ESPDateTime@^0.2.0
monitor_speed = 115200
board_build.partitions = huge_app.csv
; platform_packages = platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
build_flags = -D ESP32

同 #19 后面我的回复: 我原来的版本就是Git上的platformio.ini里面指定的版本。原来使用这个指定版本貌似是因为要访问https的网站,可以直接在client里面setInsecure()比较方便些,不用代码里面硬编码证书相关信息。

可能现在新的正式版本的package里面已经解决这个问题了,所以可以注释掉了吧。

感谢解惑!这是一个很棒的项目,学到了很多!