Close

Getting Set up

A project log for Hack-Man SAO

A Pac-Man themed SAO using an obscure but cheap microcontroller

instantarcade-bobInstantArcade (Bob) 10/07/2024 at 03:010 Comments

The Puya PY32F002A at the time of writing is not as widely supported as many other micro-controllers, but it is really cheap - ~$0.12 each when you buy 100 qty.

Getting a dev environment up was a challenge and it took a frustrating amount of time to find something workable, with many missteps along the way.

What I ultimately landed on (and recommend), is using ARM's Keil MDK with uVision which can be downloaded for just the cost of your email here.

Once you have that, get the latest Puya firmware from their website. At the time of writing, that's version 1.41 and can be found here.

The SDK includes several projects that are already set up for uVision, and I recommend using them as a starting point.

The last thing you'll need is a programmer - You can't (easily) program the PY32F002A over UART like you're used to, so you need a programmer compatible with ARM's Serial Wire Debug (SWD) protocol. I ended up with 3 different programmers, but to be honest on of the cheap ST-Link v2 clones works just fine. The bonus for jumping through this particular hoop is that you will have breakpoints and step by step debugging - absolute luxury!

Discussions