[chbot] ARM toolchain comparisons for STM32 F0, F1, and F4

Robin Gilks robin at gilks.org
Thu Sep 13 13:32:15 BST 2018


I'm still using the openSTM32 plugin for Eclipse with openocd for
debugging that I installed about 30 months ago (although updated regularly
I've stayed with it!!)

I hate eclipse project handling and building so at the first opportunity I
create a Makefile for a project.

I've been using CubeMX to get me started on a project right from the
start, and use the HAL libraries to interface to the hardware. They were
really buggy to start with but I'm finding that bugs I report get fixed
pretty quick and there are nowhere near as many as was the case even a
year ago. As someone already mentioned, the clock routing is excellent in
CubeMX.

A great way to validate a hardware design is to spend 3-4 hours defining
the pin functions and checking that you can get all the extra stuff like
DMA on the peripherals you want with the PWM outputs on the right pins,
with the timer triggers on the ADCs etc. A 176 pin f407 design did take a
day to define everything but found that there was a DMA clash between one
of the USARTs being used and a high speed SPI block - fixed by using a
different USART and all done before PCB manufacture.

My current (work) project is about 27000 lines of code in 90 files
(according to cloc) not including headers and library files, using 3
different stm32f3/f4 MCUs, so you could say its pretty productive. Using
the HAL files means that I can make a LOT of code common across the
different CPUs. Two devices use a stm32f301 and one a stm32f303 but all
the same application code with just a few macros to define GPIO, timer &
uart control blocks and a couple of conditional blocks for functions only
required on one device.

One of the reasons I've almost given up on AVRs and Arduino is debugging
on an ARM platform is so easy. I still use AVRs for 5v stuff but
everything else now is STM32!


-- 
Robin Gilks





More information about the Chchrobotics mailing list