STM32 controllers
Related: hacks, Stellaris, Maple
This page should contain projects, ideas, observations, and resources relating to the ST STM32 line of ARM controllers and tools.
There may be some affinity with STM8 that seems to be very affordable and available. There are less tools, though, and the price difference is not that great in small numbers.
You can find many people saying that ST seems to completely ignore any bug reports for their documentation and libraries.
Hardware
- Post about my STM32 boards
- STM32 quick start at DP
- Supposedly you can get by with a lot less (1-2) caps in minimal circuits
- Raw chips and some boards can be found through aliexpress
- E.g. lc-tech board
- Futurlec has reasonable shipping by mail and I think I have ordered from there before
- ST chips
- STM32 devkit, more expensive and extensive connectors than many
- STM32 stamp also a bit higher spec and cost
- ELFA sells some discovery boards (twice the list price, of course) and chips
- ST estore relies on Flash and shipping is from $30 up
- Olimex boards
- Black Knight is a fairly minimal board
- 2 for 1 - sawing a Discovery board in half
- micro4you "free shipping worldwide"?
- STLink V2 DIY
STM32 is also used in Ruuvitracker :)
STM32F103
I have a board with STM32F103RBT6. There is a nice set of family members available. It's slightly up the scale from the F100 on the VL discovery board.
- ARM Cortex™-M3
- 2.0 to 3.6 V power supply
- –40 to +85 °C temperature range
- –40 to +105 °C extended temperature range
- 36 pins to 100 pins
- 64 or 128 KB of Flash memory
- 20 KB of SRAM
- 2 x 12-bit, 1 μs A/D converters (up to 16 channels)
- 26/37/51/80 GPIO, all mappable on 16 external interrupt vectors and almost all 5 V-tolerant
- Serial wire debug (SWD) & JTAG interfaces
- Also UART flashing, I believe
- Lots of peripherals
On-board DAC sounds like an interesting thing, but sadly doesn't seem to appear in the RB "mid-range" devices.
STM32F030
A smaller Cortex M0 chip.
Maple
Leaflabs Maple board, library...
Toolchain
Most documents are ancient, as usual, and show either proprietary or scripted unmanaged installs. It should be possible to do better by now. MSP430 (pre-RH) and AVR are nice examples of how far proper distributed development environments have come from these early phases.
I initially tested OpenOCD/JLink/STM32 combo and could scan a board.
Found some useful looking ARM tutorials at embedds.com on linker scripts and startup code.
I'm testing Debian "bare metal" GCC. Building things and objdump etc work as usual. Gdb also runs and interfaces happily with OpenOCD. OpenOCD should also have support for STLink. JTAG with j-link and lc-tech board works as far as I've got with that.
There are texane/stlink packages of various ages in Debian as well as stm32flash.
DFU may be supported in places, using dfu-util
.
Another approach could be Mecrisp Forth.
- texane/stlink flasher and GDB proxy
- GDB/openocd/ddd etc instructions
- STM32 uart bootloader python sw
- STM32 uart bootloader C sw, supposedly more fresh and capable?
- Ruuvitracker dev notes
- Ruuvitracker debug connections (SWD)
- Decent startup guide from sigalrm
- Some useful old notes (minimal hello, linking, flashing)
- Memory map info?
- More linker scripts
- Emulation!
- more qemu
- more qemu
- thumbulator may be interesting
- Programming the STM32F10x via USART
- Bare metal STM32F0
- Bare metal STM32F3
Firmware
See stellaris page for some overlapping text on libraries and licensing.
- Embedds tutorials
- Gostm32 tutorials
- dwelch's stm0 repo
- Baselibc might be interesting
Random notes
FSMC looks like a fascinating feature on the bigger devices.
The FSMC is present in devices delivered in both 144-pin and 100-pin packages. For devices in 100-pin packages, however, only some FSMC banks can be used because not all pins are available. (AN2784)
- R0-R12 are GPR
- R13 is the Stack Pointer (SP)
- R14 is the Link Register
- R15 is the Program Counter (PC)
On reset, SP is loaded from 0x0000.0000 and PC form 0x0000.0004.
M3 has a fixed memory map:
- 0x0000.0000 Flash
- 0x2000.0000 SRAM
- 0x4000.0000 Peripherals
Projects and links
- Put the LC-tech board into something semi-interesting for motivation
- One dollar one minute ARM dev thread
- STM32, Ghetto style
- STM32F4 Discovery Demo Firmware for arm-none-eabi-gcc
- NRF24 radios
- Have modules
- Voltages have a nice common range
- Any unfinished hacks
- CMSIS building
- CMSIS building
- Newlib Nano mention
- Nice Cortex-M and CMSIS tutorial
- eLUA
- stm32 tiny web
- Interesting ARM intro
- Linux M3 Curious stuff. Maybe worth a look.
- stm32+ c++ library
- stm32plus::net
- Possible blue board article
- Open Source STM32 dev
- cocoOS