I am developing on an STM32WLE5, using the stm32cube framework. This is not yet supported out of the box by PlatformIO, as the STMicroelectronics/STM32CubeWL is not installed by default.
But by manually cloning this into c:\users<user>.platformio/packages/framework-stm32cubewl I am able to use this framework for local builds.
As I am using a CI/CD workflow to do unittest / coverage / builds through github actions, I also need to install this package from this workflow.
I am having some troubles getting the path (or other settings…) right and could use some help here.
The repository is public on GitHub - Strooom/STM32WLE_PlatformIO at develop
I have a custom board defined in the boards directory
After installing / upgrading PIO, I added another step to clone the STM32CubeWL package
- name: Install STM32CubeWL
uses: actions/checkout@v4
with:
repository: STMicroelectronics/STM32CubeWL
path: .platformio/packages/framework-stm32cubewl
submodules: true
The output of this action is
Run actions/checkout@v4
Syncing repository: STMicroelectronics/STM32CubeWL
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/f3484dfe-bde0-49e2-abc6-d26bf3266759' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/STM32WLE_PlatformIO/STM32WLE_PlatformIO/.platformio/packages/framework-stm32cubewl
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Determining the default branch
Fetching the repository
Determining the checkout info
Checking out the ref
Setting up auth for fetching submodules
Fetching submodules
Persisting credentials for submodules
/usr/bin/git log -1 --format='%H'
'12becb489ee12a84d3473333c0e37b92199b7413'
It looks like the repository is not cloned in the correct location, but I’m not sure…
I am a windows user, and the github actions runs on linux
The output of the build afterwards is
Run pio run -e production
Processing production (platform: ststm32; board: mumo_stm32wle5jc; framework: stm32cube)
--------------------------------------------------------------------------------
Platform Manager: Installing ststm32
Downloading 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Unpacking 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
Platform Manager: ststm32@17.0.0 has been installed!
KeyError: Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/__main__.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/cli.py", line 85, in invoke
return super().invoke(ctx)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/run/cli.py", line 145, in cli
process_env(
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/run/cli.py", line 198, in process_env
result["succeeded"] = EnvironmentProcessor(
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/run/processor.py", line 81, in process
install_project_env_dependencies(
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/package/commands/install.py", line 132, in install_project_env_dependencies
_install_project_env_platform(project_env, options),
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/package/commands/install.py", line 149, in _install_project_env_platform
PlatformPackageManager().install(
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/package/manager/platform.py", line 60, in install
p.configure_project_packages(project_env, project_targets)
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/platform/base.py", line 184, in configure_project_packages
self.configure_default_packages(options, targets or [])
File "/home/runner/.platformio/platforms/ststm32/platform.py", line 111, in configure_default_packages
return PlatformBase.configure_default_packages(self, variables,
File "/opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/platformio/platform/base.py", line 196, in configure_default_packages
self.packages[_pkg_name]["optional"] = False
KeyError: 'framework-stm32cubewl'
============================================================
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
============================================================