I created a clone of platform-atmelsam and modified it to work with the Omzlo NoCAN CANZERO boards. I used the guide “Custom Development Platforms”.
The CANZERO board is essentially an Arduino MKR ZERO clone, but with a custom CAN-based network. The network is managed by a Raspberry-Pi HAT. The nocanc daemon runs on the Raspberry and exposes an API to the network.
A development machine can upload code using the nocanc binary through the raspberry using the NoCAN network directly to a CANZERO board.
I tried to make all the necessary changes, but now platform.io gives an error when I navigate to “Platforms” in VisualStudioCode (platform.io) on macOS.
PIO Core Call Error: "Error: Traceback (most recent call last):
[block removed because of new user link limit]
.platformio/penv/lib/python3.9/site-packages/platformio/platform/factory.py\", line 77, in new
platform_cls = getattr(
AttributeError: module 'platformio.platform.nocan' has no attribute 'NocanPlatform'
============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`pip install -U platformio` command
============================================================"
PIO Core Call Error: "Error: Traceback (most recent call last):
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/platformio/__main__.py\", line 102, in main
cli() # pylint: disable=no-value-for-parameter
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/core.py\", line 1130, in __call__
return self.main(*args, **kwargs)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/core.py\", line 1055, in main
rv = self.invoke(ctx)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/platformio/cli.py\", line 71, in invoke
return super().invoke(ctx)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/core.py\", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/core.py\", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/core.py\", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/core.py\", line 760, in invoke
return __callback(*args, **kwargs)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/click/decorators.py\", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/platformio/commands/platform.py\", line 121, in platform_list
_get_installed_platform_data(pkg, with_boards=False, expose_packages=False)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/platformio/commands/platform.py\", line 300, in _get_installed_platform_data
p = PlatformFactory.new(platform)
File \"/Users/dani/.platformio/penv/lib/python3.9/site-packages/platformio/platform/factory.py\", line 77, in new
platform_cls = getattr(
AttributeError: module 'platformio.platform.nocan' has no attribute 'NocanPlatform'
============================================================
An unexpected error occurred. Further steps:
* Verify that you have the latest version of PlatformIO using
`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
============================================================"