Developing Teensy 3.x projects with CodeSourcery

Teensy 3.x boards are powerful small modules that have breadboard footprint, but carry ARM Cortex- M4 microcontroller. The only problem most advanced developers may find is that it is made ready for Arduino IDE. Arduino doesn’t seem very convenient for serious projects. IDE is far from being useable. Also Arduino programming style hides many important things that aren’t optimal in many cases. So how to benefit from having Teensy3.x and avoiding Arduino nature? Simple – go with bare-metal programming. This might scare a little at the beginning as it needs setting things up by yourself like compiler, make files, linker.


Karl have done most of this work by setting initial template for CodeBench Lite from Mentor Graphics. He’s using MS Visual Studio 2008 Express as IDE which provides all professional editing capabilities. He has made a blinky demo program to start with. Prorgams can be flashed with existing Teensy Loader application. By bare-metal programming you can be sure that you can squeeze most of microcontroller.

There is always a choice between cost and performance

Some time ago it was quite obvious which microcontroller you had to pick for your next project. For low cost and slower applications you simply selected 8-bit micro. When design needed to do intense processing you most likely had to go with ARM or other solution. Today situation is a bit different. Sometimes you are in situation when lowest end ARM microcontroller is way cheaper than 8-bit micro and it still offers several times better performance. And final decisions sometimes are driven by loyalty, experience or ecosystem. Lets not get in to that kind of discussion. Every microcontroller family has to offer something unique that looks attractive in particular situations.

ARM Cortex microcontrollers have great position right now because they have something to offer all embedded hardware niches. Lets take a quick look at two development boards from STM where one carry ARM Cortex-M0 and another ARM Cortex-M4F microcontroller. You can get both discovery boards from Newark really cheap.


The first one is called STM32F0Discovery, The name already says that it is based on ARM Cortex-M0 microcontroller STM32F051R8T6. It has internal 64KB flash memory, 8KB of RAM. It can be clocked at 48MHz speed. The board itself has standard ST-LINK/V2 programmer debugger. It powers from USB or it can be externally powered from 5V or 3V power supply. There are couple push buttons – one of them is reset. Couple user programmable LEDs. And of course there are all 64 I/Os of chip available on header. Continue reading

Software USB implementation on ARM Cortex M0+

Smaller ARM microcontrollers don’t have native USB interface. So you are left with couple choices – use dedicated level converter like FT232 or try to bit-bang software based protocol. Obviously, first choice was the easiest one, until now. Guys from have successfully implemented software based low speed USB peripheral which is lightweight (~4KB flash footprint) and includes HID stack.


In order to run code out of box, they assembled Zero Gecko 110 breakout board with EFM32ZG110 mcu which is small size and has most periphery for building devices, debugging and programming. This achievement will allow building cheaper and smaller footprint devices using ARM cortex M0+ and probably other micros that don’t require fast speed USB.

Miniature ARM baord

ARM development boards always been bigger, and more complex than other 8-bit systems. But things are different now – ARM also can be smaller but yet more powerful embedded devices than PICs or AVRs. We already know that ARM processor can be as small as 8 pin chip. LPC810 ARM Cortex M0+ is one of great examples. And you know you don’t need much to get it running. Jan built probably smallest ARM device with this chip which can be used in many cool projects where bigger processing power is needed. For instance in wearable electronics projects.


The board (which is called Catweazle) consists of LPC810 processor in DIP package, 3.3V LDO linear regulator and LED which indicates when it is set to ISP programming mode. Controller can be programmed via UART by using any USB TTL cable and standard software like Flash Magic. Board has 6 I/O for normal use. Chip carries 4K of flash, 1 K of SRAM, 2 timers, hardware SPI, I2C and UART. And most importantly this is a true 32-bit controller for $1