I’m trying to get platformIO set up to work on an open-source project (meshtastic), and running into a few issues.
First of all, using the CLI to enumerate the available boards simply crashes with a python traceback:
$ pio boards
AssertionError: Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/platformio/__main__.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
~~~^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.13/site-packages/platformio/cli.py", line 85, in invoke
return super().invoke(ctx)
~~~~~~~~~~~~~~^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/python3.13/site-packages/platformio/commands/boards.py", line 34, in cli
for board in _get_boards(installed):
~~~~~~~~~~~^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/platformio/commands/boards.py", line 75, in _get_boards
return pm.get_installed_boards() if installed else pm.get_all_boards()
~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/platformio/package/manager/platform.py", line 124, in get_all_boards
boards = self.get_installed_boards()
File "/usr/lib/python3.13/site-packages/platformio/util.py", line 57, in wrapper
self.cache[key] = (time.time(), func(*args, **kwargs))
~~~~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/platformio/package/manager/platform.py", line 112, in get_installed_boards
for config in p.get_boards().values():
~~~~~~~~~~~~^^
File "/home/sparrows/.platformio/platforms/raspberrypi/platform.py", line 161, in get_boards
result[key] = self._add_default_debug_tools(result[key])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/sparrows/.platformio/platforms/raspberrypi/platform.py", line 211, in _add_default_debug_tools
assert openocd_target, ("Missing target configuration for %s" %
^^^^^^^^^^^^^^
AssertionError: Missing target configuration for me25ls01-4y10td
============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`python -m pip install -U platformio` command
* Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq/index.html
* Report this problem to the developers
https://github.com/platformio/platformio-core/issues
============================================================
I am on the latest pio version, with a fresh meshtastic clone, and seem to be the only person having this issue with meshtastic. This also breaks the board selection dialogue for IDEs.
My second issue is that using emacs with CCLS and the platformio-mode plugin, as recomended by pio docs, header files seemingly are misinterpreted as being C headers, rather then C++.
Note in the above screenshot, the error message
must use 'enum' tag to refer to type 'class'
, indicating this is the case. I have done everything i can think of to resolve this issue, rebuilt the compile-commands.json
and .ccls
files, but nothing resolves it.
I have searched around but found no existing info related to either of my problems. Is there a known way to fix them?