Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32 C0 Family - Missing Board #693

Open
tgrotowski opened this issue Apr 5, 2023 · 7 comments
Open

stm32 C0 Family - Missing Board #693

tgrotowski opened this issue Apr 5, 2023 · 7 comments

Comments

@tgrotowski
Copy link

Hello,
I can't find nucleo board stm32 C031C6. https://www.st.com/en/evaluation-tools/nucleo-c031c6.html

C0 it's quite new stm32 family with Cortex M0+ but becomes popular. There are more and more each day, it would be really useful to programming it on PlatformIO.

@minumn
Copy link

minumn commented Jun 19, 2023

I would like to use this board as well and together with zephyr. Can anyone help me with how I could implement this?

@RudolphRiedel
Copy link

The Arduino core v2.5.0 added support for C031C6 back in end of march but the last update of the Arduino core was to v2.4.0 back in 15.5.0.
So at least for Arduino this is looking promising.

@RudolphRiedel
Copy link

RudolphRiedel commented Jul 21, 2023

I made a board definition for the nucleo-c031c6:
nucleo_c031c6.zip

It kind of works but not entirely as expected or I would have opened a pull-request for this.
First of all stlink upload does not work, I set it to mbed and that works.
And then I only used it to compile an Arduino test-project which works in general but for some reason this is awfully slow, at least with SPI, I measure huge pauses between SPI.transfer(byte) calls of almost 6µs.
I deleted framework Arduino-mbed and it is not getting installed, so it runs on framework-arduinoststm32.

I am using the development version of platform-ststm32 now but that also makes no difference.

@RudolphRiedel
Copy link

I just tried this again in order to perhaps put in a pull request but now my board definition does not work anymore:
Resolving STM32C0C31 dependencies...
KeyError: Traceback (most recent call last):
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio_main_.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
File "C:\Users\Ich.platformio\penv\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\Ich.platformio\penv\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\cli.py", line 85, in invoke
return super().invoke(ctx)
File "C:\Users\Ich.platformio\penv\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Ich.platformio\penv\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Ich.platformio\penv\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Ich.platformio\penv\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\package\commands\list.py", line 56, in package_list_cmd
list_project_packages(options)
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\package\commands\list.py", line 179, in list_project_packages
_found = print_project_env_platform_packages(env, options)
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\package\commands\list.py", line 192, in print_project_env_platform_packages
p = PlatformFactory.from_env(project_env)
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\platform\factory.py", line 102, in from_env
p.configure_project_packages(env, targets)
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\platform\base.py", line 184, in configure_project_packages
self.configure_default_packages(options, targets or [])
File "C:\Users\Ich.platformio\platforms\ststm32\platform.py", line 110, in configure_default_packages
return PlatformBase.configure_default_packages(self, variables,
File "C:\Users\Ich.platformio\penv\lib\site-packages\platformio\platform\base.py", line 196, in configure_default_packages
self.packages[_pkg_name]["optional"] = False
KeyError: 'framework-stm32cubec0'

Looks like there was a change to PlatformIO itself that removed framework-stm32cubec0???

@RudolphRiedel
Copy link

I tried this again adding my nucleo_c031c6.json to .platformio\platforms\ststm32\boards after installing 17.2.0 and I can not get this to work anymore.

It really would be nice if someone could take a look at this who has some understanding of what is going on there in regards of PlatformIO.

Overall I have to say that PlatformIO really is nice as long there already is support for the board you want to use and when the board definition supports the framework you like to use.
But beyond that PlatformIO tends to be a major pain for those like me who are unfamiliar with the inner workings of PlatformIO itself.
Do I want to know how to fix these things? Yes and No.
Yes, I am interested in fixing these things myself and therefore I would apreciate it if beeing pointed to a tutorial on how to add new boards.
But no in the sense that what I am actually trying to do is to compile software for the board I have right before me.

@ftab
Copy link

ftab commented Aug 15, 2024

I got the same error after making a custom board definition for the STM32C0116-DK. (It works in Arduino, but I can't use Arduino due to the license)

What do we need to do to get it to recognize c0 for stm32cube?

@jikkert
Copy link

jikkert commented Nov 18, 2024

This is still a problem with the current PlatformIO version. My suggestion is just like this issue #686 is adding the C0 chip range package: https://github.com/STMicroelectronics/STM32CubeC0 to the PlatformIO registry. Currently I'm tight on time but I will have a try to update it whenever I do have some.

@valeros valeros marked this as a duplicate of #834 Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants