macOS Big Sur에서 ESP32 컴파일이 통과하지 못한 문제를 해결한 메모 #m5stack

Atom Lite를 만지려고 하면 에러가 나왔기 때문에 메모입니다.

환경


  • macOS v11.0.1 Big Sur
  • Arduino IDE 1.8.13

  • 나온 오류


    In file included from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/M5Atom.h:52:0,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/examples/Basics/LEDSet/LedSet.ino:1:
    /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
     #    pragma message "FastLED version 3.003.003"
                         ^
    In file included from /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/FastLED.h:65:0,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/M5Atom.h:52,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/examples/Basics/LEDSet/LedSet.ino:1:
    /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
     #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                           ^
    In file included from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/M5Atom.h:52:0,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/M5Atom.cpp:4:
    /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
     #    pragma message "FastLED version 3.003.003"
                         ^
    In file included from /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/FastLED.h:65:0,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/M5Atom.h:52,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/M5Atom.cpp:4:
    /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
     #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                           ^
    In file included from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/utility/LED_Display.h:4:0,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/utility/LED_DisPlay.cpp:1:
    /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.003.003
     #    pragma message "FastLED version 3.003.003"
                         ^
    In file included from /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/FastLED.h:65:0,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/utility/LED_Display.h:4,
                     from /Users/n0bisuke/Documents/ds/Arduino/libraries/M5Atom/src/utility/LED_DisPlay.cpp:1:
    /Users/n0bisuke/Documents/ds/Arduino/libraries/FastLED/fastspi.h:130:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
     #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                           ^
    Traceback (most recent call last):
      File "esptool.py", line 57, in <module>
      File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
      File "serial/tools/list_ports.py", line 29, in <module>
      File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
      File "serial/tools/list_ports_posix.py", line 31, in <module>
      File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
      File "serial/tools/list_ports_osx.py", line 32, in <module>
    ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
    Failed to execute script esptool
    exit status 255
    /Applications/Arduino.app/Contents/Java/arduino-builderが255を返しました。
    ボードESP32 Pico Kitに対するコンパイル時にエラーが発生しました。
    

    마지막이이 변이 수상합니다.
    Traceback (most recent call last):
      File "esptool.py", line 57, in <module>
      File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
      File "serial/tools/list_ports.py", line 29, in <module>
      File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
      File "serial/tools/list_ports_posix.py", line 31, in <module>
      File "/Library/Python/2.7/site-packages/PyInstaller/loader/pyimod03_importers.py", line 389, in load_module
      File "serial/tools/list_ports_osx.py", line 32, in <module>
    ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
    Failed to execute script esptool
    exit status 255
    

    선인이 있었다.



    알아보면 이미 해결하고 있는 사람이 있어 똑같은 형태로 해결할 수 있었습니다.
  • macOS Big Sur에서 Arduino IDE에서 ESP32를 쓸 수없는 문제

  • 여기 이슈 하지만 쓰고 있습니다.

  • 절차


  • 1. plathome.txt 다시 쓰기

  • packages/esp32/hardware/esp32/1.x.x 폴더 안에 있는 plathome.txt를 열고 7행에 있는 tools.esptool_py.cmd=esptool인 부분을 tools.esptool_py.cmd=esptool.py와 다시 쓰고 저장하기


  • 2. esptool.py 복사

  • packages/esp32/hardware/esp32/1.x.x/tools 폴더의 esptool.py를 packages/esp32/tools/esptool_py/2.x.x/폴더에 복사합니다.
  • 3. esptool.py에 실행 권한 부여

  • 복사한 esptool.py에 실행 권한을 부여합니다. chmod +x packages/esp32/tools/esptool_py/2.x.x/esptool.py


    여기까지 할 수 있는 사람은 할 수 있는 것 같습니다만, 나는 할 수 없었으므로 다음의 순서입니다.
  • 4. serial 및 pyserial 설치
  • pyserial 그냥 괜찮을지도 모르지만, 지금까지 시도했을 때 ImportError: No module named serial 와 오류가 발생했기 때문에 serial 의 설치도 했습니다.
    pip3 install serial
    pip3 install pyserial
    
  • 5. esptool.py를 env 변경

  • esptool.py를 python3에서 실행하도록 합니다. 2.x.x 폴더에 복사한 2.x.x/esptool.py
    내 환경의 경우 /usr/local/bin/python3에 python3이 설치되어 있습니다.
    $ which python3
    /usr/local/bin/python3
    

    첫 번째 줄의 #!/usr/bin/env python#!/usr/local/bin/python3로 변경했습니다.
  • 6. Arduino IDE 재시작

  • 마지막으로 재시작하면 무사 컴파일이 통과하게 되었습니다.

    참고



    선인이있어 도움이 될 것입니다. 고마워요.
  • Big Sur로 하면, Arduino에서 ESP32가 움직이지 않게 되었기 때문에 대응했다 (ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found Failed to execute script esptool)
  • 좋은 웹페이지 즐겨찾기