UPDATE: I decided to delete the GitHub repository discussed below as the components therein are bound to different licensing agreements that I am not sure I can satisfy all at once.
As a matter of fact, I think ST Microelectronics are themselves in a questionable position for distributing the source version of certain third party components that are covered by non-disclosure agreements.
I decided to make my most recent efforts with STM32 microcontrollers available to the public on GitHub. It’s true that the STM32F10x is a somewhat old class of microcontrollers, but it’s also true that they are incredibly good value for money running at up to 72 MHz, and the software ecosystem for them is quite mature. Standard libraries also offer a hardware abstraction layer (HAL) that facilitates migration to newer microcontrollers.
Specifically, my “bonus” content refers to the board as per below:
This board is supported to some extent by the mbed community, as per start-up project at this location. However, there seems to be an issue with the 16-bit SPI software abstraction, and who knows what else.
There is also some unofficial Arduino support Roger Clark has been working at, as per link. If that’s what floats your boat, you might want to give it a go. I seem to recall the hardware control layer is based on STM’s standard peripheral library anyway.
My own contribution comes in two different approaches:
- Makefile approach: download and install GNU for ARM embedded tools (I tested with 4.9 and 5.0), clone my GitHub repo STM32F10x_StdPeriph_Lib, open a GCC CLI, navigate to the SysTick example project, issue “make” to build it, upload to the board and enjoy the result;
- TrueSTUDIO approach: clone my repo, open the workspace in TrueSTUDIO, replace template project files with the ones from the SysTick example, import the STM32F103C8T6-BLUE project and build it. If you get an error around strexb or strexh, refer to this previous post of mine.
Out of the two, I will be mainly using the Makefile route if I have to start new projects for this board.
The second approach actually extends STM’s standard peripheral library with a custom family of boards and a custom board so the extension has the look and feel of the official projects and templates. Further extensions can be done in pretty much the same way as I did.
Closing note. If you need USB, use STM’s USB device library: you can find it on their website by looking for “STM32F10x, STM32L1xx and STM32F3xx USB full speed device library (UM0424)”. I’ve successfully tested the Virtual COM Port example on the above mentioned board and I will be providing a similar extension to the USB library as I did for the standard peripheral one.