在 m1 mac arduino 上找不到 Pyserial 或 esptool 目录

Mil*_*les 1 arduino macos-big-sur apple-m1

我正在使用 m1 MacBook pro 并尝试在 ESP8266 上运行 arduino 代码。每次它都会给我这个错误

Arduino: 1.8.13 (Mac OS X (BigSur)), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Executable segment sizes:
IROM   : 246940          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 27260   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 
DATA   : 1268  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 924   ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 25096 )         - zeroed variables      (global, static) in RAM/HEAP 
Sketch uses 276392 bytes (26%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27288 bytes (33%) of dynamic memory, leaving 54632 bytes for local variables. Maximum is 81920 bytes.
pyserial or esptool directories not found next to this upload.py tool.
An error occurred while uploading the sketch
Run Code Online (Sandbox Code Playgroud)

我不知道问题是什么,我尝试用在另一个问题上找到的新文件夹更新这两个文件夹,但没有成功。我希望有一种方法可以运行它。否则,我在 Windows10 虚拟机上尝试过,但它没有看到驱动程序,所以我也无法上传到那里。

Mil*_*les 6

我找到了我的问题的答案:)这也可能取决于问题,但总的来说,您需要按照以下步骤操作:

  1. 下载https://github.com/espressif/esptool/archive/v3.0.zip
  2. 下载https://github.com/pyserial/pyserial/archive/v3.4.zip
  3. 解压缩它们(如果需要)
  4. 转到~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/
  5. 删除 esptool 和 pyserial 文件夹并替换为您安装的文件夹
  6. 重命名这些文件夹 pyserial 和 esptool (删除数字和空格)

7.重新启动Arduino,就可以了。这里的事情是确保你删除了版本号并只留下“esptool”和“pyserial”名称,如果你不这样做,Arduino将无法识别它并且仍然会给出错误。