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

Arduino core support #6

Open
hackery opened this issue Jul 8, 2024 · 1 comment
Open

Arduino core support #6

hackery opened this issue Jul 8, 2024 · 1 comment

Comments

@hackery
Copy link

hackery commented Jul 8, 2024

What's needed to make this board work with the Arduino core for CH32 ?

I tried using the standard blink sketch, it builds and downloads to the nanoCH32V203, but no blinking LED.
It looks like the core does not define LED_BUILTIN, but defining it as GPIO_Pin_15 as in the makefile-example doesn't work.

The example files for the WCH EVT boards (in doc/EVT/EXAM/GPIO/GPIO_Toggle) use GPIO_Pin_0. I'm working through all the available GPIOs to see if the LED is attached to another pin, but I suspect there's something else missing from the board definitions.

@hackery hackery changed the title Arduino core Arduino core support Jul 8, 2024
@hackery
Copy link
Author

hackery commented Jul 9, 2024

I got a workaround for the simple case for blink - adding this to user code

#define LED_BUILTIN 15

I imagine there are a bunch more board-specific definitions needed, will try a few peripheral samples and update.
(I was using GPIO_Pin_15 in pinMode etc but of course that's a bitfield)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant