In the past, ARM microcontrollers have been available only in packages which are rather unfriendly for hobbyist use. However, NXP is now producing two Cortex-M0 microcontrollers in DIP packages, which are very handy for breadboard use and trough-hole soldering. The chips are LPC1114 in DIP28 package and LPC810 in DIP8 package. LPC1114FN28/102 has 32 kB flash and 8 kB ram, which is actually quite nice and allows running even a small RTOS. LPC810M021FN8 has only 4 kB flash and 1 kB ram, which is not much but still suitable for small bare metal applications.
LPC810 costs only about 1€ and LPC1114 about 2€ at mouser.
Of course I had to adapt my blink-test pico]OS project for these chips. I started with LPC1114 as it has more memory, so I wouldn’t have to spend a lot of time fine-tuning memory amounts. I just put the chip into breadboard with three leds. A FTDI rs232-converter allows access to usart and provides also 3.3V for the cpu. These Cortex-M0 chips support only SWD debugging (no JTAG), so I ended up in uploading the compiled program to chip with FlashMagic (it is a free tool that loads hex-formatted images to LPC chips vial serial “ISP” boot loader). After some trial and error I got a working system (SWD debugging dongle would have been nice): 3 leds being blinked by 3 RTOS threads.
LPC810 was more difficult. I had to trim everything unnecessary away from the pico]OS configuration. That means no serial console, minimal stack sizes and only 2 leds & threads. It was also necessary to compile program with gcc optimisation enabled (so no debugging with this chip), otherwise the code size is too big. I ended also leaving some cmsis initialisation out (one might consider LPCOpen a little bloated for this little buddy), running the cpu with default speed.
But it works! Only 4 kB of flash and 1 kB of ram is enough for real time operating system and 2 application threads ! However, I must admit that there is not much space left for real application, but anyway this was an interesting experiment.
Source code is available at GitHub.