【问题标题】:ESP32 cannot program on Eclipse with Arduino Plug-inESP32 无法使用 Arduino 插件在 Eclipse 上编程
【发布时间】:2018-11-02 12:20:48
【问题描述】:

我正在尝试使用 Eclipse 的 Arduino 插件对 ESP32 开发模块进行编程。

我能够成功构建项目,但无法对目标进行编程(以“运行”模式启动)。我收到以下错误:

usage: esptool write_flash [-h] [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: './ESP32_Test.partitions.bin'

我正在编译随 Arduino IDE 提供的用于 ESP32 的“LEDC Software Fade”示例代码。代码在 ARDUINO IDE 中成功编译,我可以使用 ARDUINO IDE 进行编程,但不能使用 ECLIPSE。

这是我的设置:

面向 C/C++ 开发人员的 Eclipse IDE 版本:2018-09 (4.9.0) 版本号:20180917-1800 操作系统:Windows 7,v.6.1,x86_64 / win32 Java版本:1.8.0_121

我从市场上安装了适用于 Arduino 3.0 的 Eclipse C++ IDE

在 Arduino Preferences 中,我指定了 ESP32 平台的包源:https://dl.espressif.com/dl/package_esp32_index.json

我设置了一个带有板类型的 Ardiuno 目标:ESP32 开发模型。这 其余的taget设置与Arduino IDE中指定的完全相同。

我在这里错过了什么?

【问题讨论】:

  • 更新:我发现在 Arduino IDE 中,调用了以下工具:\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.0/tools/gen_esp32part.exe",而在 Eclipse 中从未使用 C++ Arduino 插件调用此工具。我已经从https://dl.espressif.com/dl/package_esp32_index.json 为 Arduino IDE 和 Eclipse 下载了完全相同的工具链。我不知道如何在 Eclipse 中添加它。似乎它定义了分区。
  • 使用 Sloeber Arduino Eclipse 插件

标签: eclipse arduino esp32


【解决方案1】:

我遇到了同样的问题。我通过修改.arduinocdt\packages\esp32\hardware\esp32\1.0.4\platform.txt中的下一行找到了解决方法:

\#\# Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf" && {tools.gen_esp32part.cmd.windows} -q "{runtime.platform.path}/tools/partitions/{build.partitions}.csv" "{build.path}/{build.project_name}.partitions.bin"

【讨论】:

    猜你喜欢
    • 2022-12-18
    • 1970-01-01
    • 1970-01-01
    • 2021-12-27
    • 1970-01-01
    • 2019-03-18
    • 1970-01-01
    • 2021-12-01
    • 1970-01-01
    相关资源
    最近更新 更多