0

Mu Editor fails on M4 boards using M1 Mac
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Mu Editor fails on M4 boards using M1 Mac

by alex_shultz on Sat May 22, 2021 9:26 pm

I am having trouble getting Mu Editor to recognize some M4-based boards I have when I connect them to my Mac M1 computer. The computer has the latest updates installed and I have updated the boards to use the latest CircuitPython.

I have three different M4-based boards from various Adaboxes: Trellis, Matrix, and PyPortal that all fail. They are the only M4 boards I have tried.

I also have a Micro:Bit ... it connects to the Mu Editor successfully.

When I try to use Mu Editor for the Serial or Plotter connections I get an error message "Could not find attached device" that gives some info about what's not happening correctly and some hints on what to try to make the connection work. No luck following the hints. :(

I can open the terminal and use the screen command to connect to all of the device.

I can see the CIRCUITPI drive on all the devices and have also successfully flashed the boards to the latest versions CircuitPython.

I am able to use a Raspberry Pi 3 to have Mu connect to all of the devices.

Here is the text from the "Current Log" in Mu when I tried to use it to connect to the Trellis two different times this evening. I have made sure the Mode is set to CircuitPython.

Code: Select all | TOGGLE FULL SIZE
2021-05-22 19:42:09,504 - root:265(run) INFO:

-----------------

Starting Mu 1.1.0.beta.4
2021-05-22 19:42:09,505 - root:266(run) INFO: uname_result(system='Darwin', node='MacBook-Air', release='20.4.0', version='Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:41 PDT 2021; root:xnu-7195.101.2~1/RELEASE_ARM64_T8101', machine='x86_64', processor='i386')
2021-05-22 19:42:09,505 - root:267(run) INFO: Python path: ['/', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python38.zip', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/lib-dynload', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/setuptools-49.6.0-py3.8.egg', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/pip-20.2.2-py3.8.egg', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/IPython/extensions']
2021-05-22 19:42:09,505 - root:268(run) INFO: Language code: en_US
2021-05-22 19:42:09,505 - mu.settings:220(load) WARNING: No settings file found at /Users/alex/Library/Application Support/mu/settings.json; skipping
2021-05-22 19:42:10,098 - mu.virtual_environment:480(ensure_and_create) INFO: Added log handler.
2021-05-22 19:42:10,098 - mu.virtual_environment:491(ensure_and_create) DEBUG: Checking virtual environment; attempt #1.
2021-05-22 19:42:10,099 - mu.virtual_environment:542(ensure_path) INFO: Virtual Environment found at: /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107
2021-05-22 19:42:10,099 - mu.virtual_environment:555(ensure_interpreter) INFO: Interpreter found at: /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107/bin/python
2021-05-22 19:42:10,266 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output: 38
2021-05-22 19:42:10,269 - mu.virtual_environment:585(ensure_interpreter_version) INFO: Both interpreters at version 38
2021-05-22 19:42:10,271 - mu.virtual_environment:611(ensure_pip) INFO: Pip found at: /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107/bin/pip
2021-05-22 19:42:10,273 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: pygame
2021-05-22 19:42:11,075 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output: pygame 2.0.1 (SDL 2.0.14, Python 3.8.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
2021-05-22 19:42:11,075 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: numpy
2021-05-22 19:42:11,561 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 19:42:11,562 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: pgzero
2021-05-22 19:42:11,593 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 19:42:11,594 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: flask
2021-05-22 19:42:11,757 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 19:42:11,757 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: qtconsole
2021-05-22 19:42:11,789 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 19:42:11,789 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: esptool
2021-05-22 19:42:11,840 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 19:42:11,840 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: adafruit_board_toolkit
2021-05-22 19:42:11,869 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 19:42:11,869 - mu.virtual_environment:496(ensure_and_create) INFO: Valid virtual environment found at /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107
2021-05-22 19:42:11,869 - mu.settings:169(save) DEBUG: Saving to /Users/alex/Library/Application Support/mu/venv.json
2021-05-22 19:42:11,873 - mu.virtual_environment:509(ensure_and_create) DEBUG: Emitter: <bound PYQT_SIGNAL display_text of StartupWorker object at 0x118761b80>; Splash Handler; <SplashLogHandler (INFO)>
2021-05-22 19:42:11,992 - mu.logic:758(__init__) INFO: Setting up editor.
2021-05-22 19:42:11,993 - mu.logic:778(__init__) INFO: Log directory: /Users/alex/Library/Logs/mu
2021-05-22 19:42:11,993 - mu.logic:779(__init__) INFO: Data directory: /Users/alex/Library/Application Support/mu
2021-05-22 19:42:11,994 - mu.logic:793(setup) INFO: Available modes: python, circuitpython, microbit, esp, web, pyboard, debugger, pygamezero, lego, pico
2021-05-22 19:42:11,994 - mu.modes.base:61(get_default_workspace) INFO: Using workspace /Users/alex/mu_code from settings file
2021-05-22 19:42:12,125 - mu.modes.base:61(get_default_workspace) INFO: Using workspace /Users/alex/mu_code from settings file
2021-05-22 19:42:12,125 - mu.logic:1521(change_mode) INFO: Workspace directory: /Users/alex/mu_code
2021-05-22 19:42:12,125 - mu.logic:867(restore_session) DEBUG: <SessionSettings from /Users/alex/Library/Application Support/mu/session.json>
2021-05-22 19:42:12,131 - mu.logic:889(restore_session) INFO: Loaded files.
2021-05-22 19:42:12,131 - mu.logic:892(restore_session) INFO: User defined environment variables: []
2021-05-22 19:42:12,131 - mu.logic:897(restore_session) INFO: Minify scripts on micro:bit? False
2021-05-22 19:42:12,176 - mu.logic:1521(change_mode) INFO: Workspace directory: /Volumes/CIRCUITPY
2021-05-22 19:42:12,284 - mu.logic:943(restore_session) INFO: Starting with blank file.
2021-05-22 19:42:22,053 - mu.logic:1394(show_admin) INFO: Showing admin with logs from /Users/alex/Library/Logs/mu/mu.log
2021-05-22 19:42:22,054 - mu.virtual_environment:788(installed_packages) INFO: Discovering installed third party modules in venv.
2021-05-22 19:42:22,439 - mu.virtual_environment:193(run) DEBUG: Process output: Package                Version
---------------------- -------
adafruit-board-toolkit 1.0.1
appnope                0.1.2
backcall               0.2.0
bitstring              3.1.7
cffi                   1.14.5
click                  7.1.2
cryptography           3.4.7
decorator              5.0.7
ecdsa                  0.16.1
esptool                3.0
Flask                  1.1.2
ipykernel              5.5.3
ipython                7.22.0
ipython-genutils       0.2.0
itsdangerous           1.1.0
jedi                   0.18.0
Jinja2                 2.11.3
jupyter-client         6.1.12
jupyter-core           4.7.1
MarkupSafe             1.1.1
numpy                  1.20.1
parso                  0.8.2
pexpect                4.8.0
pgzero                 1.2
pickleshare            0.7.5
pip                    21.1.1
prompt-toolkit         3.0.18
ptyprocess             0.7.0
pycparser              2.20
pygame                 2.0.1
Pygments               2.8.1
pyserial               3.5
python-dateutil        2.8.1
pyzmq                  22.0.3
qtconsole              4.7.4
QtPy                   1.9.0
reedsolo               1.5.4
setuptools             56.0.0
six                    1.15.0
tornado                6.1
traitlets              5.0.5
wcwidth                0.2.5
Werkzeug               1.0.1
wheel                  0.36.2
2021-05-22 19:42:22,439 - mu.virtual_environment:797(installed_packages) INFO: []
2021-05-22 19:42:50,088 - mu.logic:1440(show_admin) INFO: No admin settings changed.
2021-05-22 19:42:52,930 - mu.logic:1468(select_mode) INFO: Showing available modes: ['python', 'circuitpython', 'microbit', 'esp', 'web', 'pyboard', 'debugger', 'pygamezero', 'lego', 'pico']
2021-05-22 19:42:58,922 - mu.interface.main:942(show_message) DEBUG: Could not find an attached device.
2021-05-22 19:42:58,922 - mu.interface.main:943(show_message) DEBUG: Please make sure the device is plugged into this computer.

It must have a version of MicroPython (or CircuitPython) flashed onto it before the REPL will work.

Finally, press the device's reset button and wait a few seconds before trying again.
2021-05-22 19:43:04,891 - mu.modes.base:474(toggle_repl) INFO: Toggle REPL on.
2021-05-22 19:43:25,698 - mu.interface.main:942(show_message) DEBUG: Could not find an attached device.
2021-05-22 19:43:25,699 - mu.interface.main:943(show_message) DEBUG: Please make sure the device is plugged into this computer.

It must have a version of MicroPython (or CircuitPython) flashed onto it before the REPL will work.

Finally, press the device's reset button and wait a few seconds before trying again.
2021-05-22 19:43:27,441 - mu.modes.base:474(toggle_repl) INFO: Toggle REPL on.
2021-05-22 19:51:31,060 - mu.interface.main:942(show_message) DEBUG: Could not find an attached device.
2021-05-22 19:51:31,060 - mu.interface.main:943(show_message) DEBUG: Please make sure the device is plugged into this computer.

It must have a version of MicroPython (or CircuitPython) flashed onto it before the REPL will work.

Finally, press the device's reset button and wait a few seconds before trying again.
2021-05-22 20:07:46,819 - mu.modes.base:474(toggle_repl) INFO: Toggle REPL on.
2021-05-22 20:07:48,418 - mu.logic:1394(show_admin) INFO: Showing admin with logs from /Users/alex/Library/Logs/mu/mu.log
2021-05-22 20:07:48,419 - mu.virtual_environment:788(installed_packages) INFO: Discovering installed third party modules in venv.
2021-05-22 20:07:48,800 - mu.virtual_environment:193(run) DEBUG: Process output: Package                Version
---------------------- -------
adafruit-board-toolkit 1.0.1
appnope                0.1.2
backcall               0.2.0
bitstring              3.1.7
cffi                   1.14.5
click                  7.1.2
cryptography           3.4.7
decorator              5.0.7
ecdsa                  0.16.1
esptool                3.0
Flask                  1.1.2
ipykernel              5.5.3
ipython                7.22.0
ipython-genutils       0.2.0
itsdangerous           1.1.0
jedi                   0.18.0
Jinja2                 2.11.3
jupyter-client         6.1.12
jupyter-core           4.7.1
MarkupSafe             1.1.1
numpy                  1.20.1
parso                  0.8.2
pexpect                4.8.0
pgzero                 1.2
pickleshare            0.7.5
pip                    21.1.1
prompt-toolkit         3.0.18
ptyprocess             0.7.0
pycparser              2.20
pygame                 2.0.1
Pygments               2.8.1
pyserial               3.5
python-dateutil        2.8.1
pyzmq                  22.0.3
qtconsole              4.7.4
QtPy                   1.9.0
reedsolo               1.5.4
setuptools             56.0.0
six                    1.15.0
tornado                6.1
traitlets              5.0.5
wcwidth                0.2.5
Werkzeug               1.0.1
wheel                  0.36.2
2021-05-22 20:07:48,801 - mu.virtual_environment:797(installed_packages) INFO: []
2021-05-22 20:07:54,345 - mu.logic:1440(show_admin) INFO: No admin settings changed.
2021-05-22 20:07:55,016 - mu.settings:169(save) DEBUG: Saving to /Users/alex/Library/Application Support/mu/session.json
2021-05-22 20:07:55,017 - mu.logic:1385(quit) INFO: Quitting.


2021-05-22 20:07:55,018 - mu.settings:169(save) DEBUG: Saving to /Users/alex/Library/Application Support/mu/session.json
2021-05-22 20:07:55,018 - mu.settings:169(save) DEBUG: Saving to /Users/alex/Library/Application Support/mu/venv.json
2021-05-22 20:08:06,161 - root:265(run) INFO:

-----------------

Starting Mu 1.1.0.beta.4
2021-05-22 20:08:06,161 - root:266(run) INFO: uname_result(system='Darwin', node='MacBook-Air', release='20.4.0', version='Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:41 PDT 2021; root:xnu-7195.101.2~1/RELEASE_ARM64_T8101', machine='x86_64', processor='i386')
2021-05-22 20:08:06,162 - root:267(run) INFO: Python path: ['/', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python38.zip', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/lib-dynload', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/setuptools-49.6.0-py3.8.egg', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/pip-20.2.2-py3.8.egg', '/Applications/Mu Editor.app/Contents/Resources/Python/lib/python3.8/site-packages/IPython/extensions']
2021-05-22 20:08:06,162 - root:268(run) INFO: Language code: en_US
2021-05-22 20:08:06,162 - mu.settings:220(load) WARNING: No settings file found at /Users/alex/Library/Application Support/mu/settings.json; skipping
2021-05-22 20:08:06,330 - mu.virtual_environment:480(ensure_and_create) INFO: Added log handler.
2021-05-22 20:08:06,331 - mu.virtual_environment:491(ensure_and_create) DEBUG: Checking virtual environment; attempt #1.
2021-05-22 20:08:06,331 - mu.virtual_environment:542(ensure_path) INFO: Virtual Environment found at: /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107
2021-05-22 20:08:06,331 - mu.virtual_environment:555(ensure_interpreter) INFO: Interpreter found at: /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107/bin/python
2021-05-22 20:08:06,453 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output: 38
2021-05-22 20:08:06,458 - mu.virtual_environment:585(ensure_interpreter_version) INFO: Both interpreters at version 38
2021-05-22 20:08:06,460 - mu.virtual_environment:611(ensure_pip) INFO: Pip found at: /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107/bin/pip
2021-05-22 20:08:06,462 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: pygame
2021-05-22 20:08:06,552 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output: pygame 2.0.1 (SDL 2.0.14, Python 3.8.5)
Hello from the pygame community. https://www.pygame.org/contribute.html
2021-05-22 20:08:06,553 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: numpy
2021-05-22 20:08:06,725 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 20:08:06,726 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: pgzero
2021-05-22 20:08:06,754 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 20:08:06,754 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: flask
2021-05-22 20:08:06,889 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 20:08:06,889 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: qtconsole
2021-05-22 20:08:06,918 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 20:08:06,918 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: esptool
2021-05-22 20:08:06,966 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 20:08:06,967 - mu.virtual_environment:597(ensure_key_modules) DEBUG: Verifying import of: adafruit_board_toolkit
2021-05-22 20:08:06,995 - mu.virtual_environment:379(run_subprocess) DEBUG: Process returned 0; output:
2021-05-22 20:08:06,996 - mu.virtual_environment:496(ensure_and_create) INFO: Valid virtual environment found at /Users/alex/Library/Application Support/mu/mu_venv-38-20210512-194107
2021-05-22 20:08:06,996 - mu.settings:169(save) DEBUG: Saving to /Users/alex/Library/Application Support/mu/venv.json
2021-05-22 20:08:06,999 - mu.virtual_environment:509(ensure_and_create) DEBUG: Emitter: <bound PYQT_SIGNAL display_text of StartupWorker object at 0x11c4efb80>; Splash Handler; <SplashLogHandler (INFO)>
2021-05-22 20:08:07,091 - mu.logic:758(__init__) INFO: Setting up editor.
2021-05-22 20:08:07,091 - mu.logic:778(__init__) INFO: Log directory: /Users/alex/Library/Logs/mu
2021-05-22 20:08:07,091 - mu.logic:779(__init__) INFO: Data directory: /Users/alex/Library/Application Support/mu
2021-05-22 20:08:07,091 - mu.logic:793(setup) INFO: Available modes: python, circuitpython, microbit, esp, web, pyboard, debugger, pygamezero, lego, pico
2021-05-22 20:08:07,091 - mu.modes.base:61(get_default_workspace) INFO: Using workspace /Users/alex/mu_code from settings file
2021-05-22 20:08:07,129 - mu.modes.base:61(get_default_workspace) INFO: Using workspace /Users/alex/mu_code from settings file
2021-05-22 20:08:07,129 - mu.logic:1521(change_mode) INFO: Workspace directory: /Users/alex/mu_code
2021-05-22 20:08:07,129 - mu.logic:867(restore_session) DEBUG: <SessionSettings from /Users/alex/Library/Application Support/mu/session.json>
2021-05-22 20:08:07,133 - mu.logic:889(restore_session) INFO: Loaded files.
2021-05-22 20:08:07,133 - mu.logic:892(restore_session) INFO: User defined environment variables: []
2021-05-22 20:08:07,133 - mu.logic:897(restore_session) INFO: Minify scripts on micro:bit? False
2021-05-22 20:08:07,171 - mu.logic:1521(change_mode) INFO: Workspace directory: /Volumes/CIRCUITPY
2021-05-22 20:08:07,250 - mu.logic:943(restore_session) INFO: Starting with blank file.
2021-05-22 20:08:10,536 - mu.interface.main:942(show_message) DEBUG: Could not find an attached device.
2021-05-22 20:08:10,537 - mu.interface.main:943(show_message) DEBUG: Please make sure the device is plugged into this computer.

It must have a version of MicroPython (or CircuitPython) flashed onto it before the REPL will work.

Finally, press the device's reset button and wait a few seconds before trying again.
2021-05-22 20:08:12,159 - mu.modes.base:474(toggle_repl) INFO: Toggle REPL on.
2021-05-22 20:08:13,250 - mu.logic:1394(show_admin) INFO: Showing admin with logs from /Users/alex/Library/Logs/mu/mu.log
2021-05-22 20:08:13,251 - mu.virtual_environment:788(installed_packages) INFO: Discovering installed third party modules in venv.
2021-05-22 20:08:13,564 - mu.virtual_environment:193(run) DEBUG: Process output: Package                Version
---------------------- -------
adafruit-board-toolkit 1.0.1
appnope                0.1.2
backcall               0.2.0
bitstring              3.1.7
cffi                   1.14.5
click                  7.1.2
cryptography           3.4.7
decorator              5.0.7
ecdsa                  0.16.1
esptool                3.0
Flask                  1.1.2
ipykernel              5.5.3
ipython                7.22.0
ipython-genutils       0.2.0
itsdangerous           1.1.0
jedi                   0.18.0
Jinja2                 2.11.3
jupyter-client         6.1.12
jupyter-core           4.7.1
MarkupSafe             1.1.1
numpy                  1.20.1
parso                  0.8.2
pexpect                4.8.0
pgzero                 1.2
pickleshare            0.7.5
pip                    21.1.1
prompt-toolkit         3.0.18
ptyprocess             0.7.0
pycparser              2.20
pygame                 2.0.1
Pygments               2.8.1
pyserial               3.5
python-dateutil        2.8.1
pyzmq                  22.0.3
qtconsole              4.7.4
QtPy                   1.9.0
reedsolo               1.5.4
setuptools             56.0.0
six                    1.15.0
tornado                6.1
traitlets              5.0.5
wcwidth                0.2.5
Werkzeug               1.0.1
wheel                  0.36.2
2021-05-22 20:08:13,564 - mu.virtual_environment:797(installed_packages) INFO:
[]

alex_shultz
 
Posts: 2
Joined: Wed Nov 30, 2016 10:15 pm

Re: Mu Editor fails on M4 boards using M1 Mac

by fishycircuits on Sat May 22, 2021 10:46 pm

Adafruit does not develop Mu, the official forum for Mu is https://github.com/mu-editor/mu/discussions/.

That being said, this is a known issue (https://github.com/mu-editor/mu/issues/1543). A fix is in place, and a new version of Mu will be released soon.

fishycircuits
 
Posts: 45
Joined: Wed Oct 28, 2020 5:04 pm

Re: Mu Editor fails on M4 boards using M1 Mac

by rossini on Sun Jul 11, 2021 7:24 pm

Mu has Serial Monitor support for Mac now; yay!
Mu 1.1.0 beta 5

https://codewith.mu/en/download

rossini
 
Posts: 7
Joined: Mon Jul 05, 2021 4:33 pm

Please be positive and constructive with your questions and comments.