Hi,now I’m using Core 6.1.18, VSC 1.98.2 and seams there are problems with custom boards or I’m doing something wrong.
I’ll start by saying that I hadn’t used the project for a few months, then I ran some tests for a day (all ok) and in the meantime I performed some updates in Visual Studio Code and PlatformIo, after all I’m not able to compile, debug and every other action. I have investigated the problem and is linked to custom board.
The project is for Arduino Framewor on Arduino MINIMA R4.
I have created a custom board json file in
<project_root>
├── boards
│ └── uno_r4_minima_gmg.json
└── platformio.ini
uno_r4_minima_gmg.json is the exact copy of uno_r4_minima.json present in “.platformio\platforms\renesas-ra\boards”
Inside uno_r4_minima_gmg.json I have modified
"variant": "MINIMA_GMG"
Then inside “.platformio\packages\framework-arduinorenesas-uno\variants” I have created a copy of “MINIMA” in “MINIMA_GMG” where I have modified the linker script file for my board.
Now in “platformio.ini” I have created (before updates this env worked correctly)
[env:uno_r4_minima_gmg]
platform = renesas-ra
board = uno_r4_minima_gmg
framework = arduino
monitor_speed = 115200
upload_protocol = jlink
debug_build_flags = -O0 -g3
build_flags = -DSERIAL_RX_BUFFER_SIZE=256
debug_tool = jlink
All the process seams to be correct but I have a lot of python errors using this env.
if I use the following env, so using the standard variant and I override variant with “board_build.variant = MINIMA_GMG” all is working.
[env:uno_r4_minima]
platform = renesas-ra
board = uno_r4_minima
board_build.variant = MINIMA_GMG
framework = arduino
monitor_speed = 115200
upload_protocol = jlink
debug_build_flags = -O0 -g3
build_flags = -DSERIAL_RX_BUFFER_SIZE=256
debug_tool = jlink
I can’t figure out where the problem is but something must have changed with the PlatformIo update or some platform dependency
The error log is the following
Resolving uno_r4_minima_gmg dependencies...
KeyError: Traceback (most recent call last):
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\__main__.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\cli.py", line 85, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\project\commands\init.py", line 106, in project_init_cmd
install_project_dependencies(
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 107, in install_project_dependencies
already_up_to_date = not install_project_env_dependencies(env, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 132, in install_project_env_dependencies
_install_project_env_platform(project_env, options),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\package\commands\install.py", line 149, in _install_project_env_platform
PlatformPackageManager().install(
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\package\manager\platform.py", line 60, in install
p.configure_project_packages(project_env, project_targets)
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\platform\base.py", line 185, in configure_project_packages
self.configure_default_packages(options, targets or [])
File "C:\Users\gmg\.platformio\platforms\renesas-ra\platform.py", line 48, in configure_default_packages
_configure_uploader_packages(package, interface)
File "C:\Users\gmg\.platformio\platforms\renesas-ra\platform.py", line 32, in _configure_uploader_packages
board_config = self.board_config(variables.get("board"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\penv\Lib\site-packages\platformio\platform\base.py", line 173, in board_config
return self.get_boards(id_)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\platforms\renesas-ra\platform.py", line 69, in get_boards
return self._add_default_debug_tools(result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gmg\.platformio\platforms\renesas-ra\platform.py", line 159, in _add_default_debug_tools
debug["tools"][link]["onboard"] = link in debug.get(
~~~~~~~~~~~~~~^^^^^^
KeyError: 'cmsis-dap'
Best regards
GMG