New ST tool for STM32F series

For STM32F native coders, I suggest to take a look to the new STM32CubeMX tool. This is very interesting MCU configurator for the STM32F chip series. It borrows the idea from the MicroExplorer software.

This tool finally has the ability to generate startup C code and clock configuration for the chip, based on the ST library STM32Cube.


Very interesting. One of the big features of the Cortex-M is the ability to run with C startup code instead of assembly. One can completely start and initialize with no assembly whatsoever, which simplifies the toolchain. Unfortunately, STM’s samples normally use assembly startup.

It would be interesting to see what a NETMF port based on STM32CubeF4 looked like. It seems pretty feature-rich:
[ul]Full USB Host and Device stack supporting many classes.
Host Classes: HID, MSC, CDC, Audio, MTP
Device Classes: HID, MSC, CDC, Audio, DFU
STemWin, a professional graphical stack solution available in binary format and based on the emWin solution from ST’s partner Segger
CMSIS-RTOS implementation with FreeRTOS open source solution
FAT File system based on open source FatFS solution
TCP/IP stack based on open source LwIP solution
SSL/TLS secure layer based on open source PolarSSL[/ul]

Further, it’s all BSD licensed, so it can even be used as the foundation of commercial solutions.

I tested a bit for a native project (no .NETMF) and I noted that on a STM32F407:
2x I2C bus
1x SPI
2xTIM 16bit
1xTIM 32bit
3ch xADC
1x DAC
1xUSB Device
External Osc 16mhz

I get a do-nothing template of compiled code of 14.09Kb on MDK 5.02. Not Bad.

What are “TIM”?

Timer ?

@ mhectorgato - sorry it’s for timer. The ST use TIM for short.

Hey all,
Although its been a long time since anyone posted, I was just wondering if anyone could give me a hand with this (sorry its not a direct NETMF question).
Using the STM32CubeMX tool, godefroi said it generates both startup and config code. I use the CooCox CoIDE and I want to start using the STM32Cube-generated files for my STM32F4 discovery. Hence, anyone know if it’ll be possible to just compile my user code and the generated files without using any of the assembly start files I’ve seen in Coocox examples, naturally with the correct linker settings?

That’s the theory, but I personally have never tried it.

Also, the tool at least partially supports the F0 series as well. It’s quite a slick little tool!

So I tried it yesterday, just for kicks. Mostly works except that you need to remove all defined symbols and define STM32F407xx i.e define it as a symbol (the project compile settings in Coocox have a nice window for that). In addition, there were odd errors and I figured it had something to do with the startup code, which is provided in Assembly from STM32CubeMX. However, that didn’t work, so I ended up borrowing the startup code Coocox uses for the STM32F407xx which is written in C (it appears they borrowed that from Raisonance as well). Once that was done, I was able to compile and debug successfully.
I’m only worried about the legality of borrowing startup code…although there isn’t some sort of copyright warning in there…