Using eLua with the STM32 CPUs from ST

The STM32 family of MCUs from ST is a line of Cortex-M3 based chips with a lot of neat features, including (but not limited to) high amounts of on-chip Flash/RAM (up to 512k Flash and 64k RAM), external memory controller that covers (P)SRAM, NAND Flash and NOR flash, integrated ADC and DACs, advanced timers and many others. They also feature an integrated serial boot loader, so it's extremely easy to program them from anything that has a serial port. ST provides a tool that can be used to download a program to the STM32 using this serial bootloader, but it only works in Windows. Their bootloader protocol is documented in a separate application note though, so one can easily write a programming application for any other OS.

eLua currently works on two STM32F103 variants of the STM32 family, specifically on these boards: the STM3210E-EVAL from ST and the ETM-STM32 stamp from Futurlec. Instruction for installing eLua on each of them are provided below.

Prerequisites

Before you'll be able to use eLua on the STM32F103 CPU, make sure that:

Programming eLUa on the STM3210E-EVAL board

Follow the steps below to install eLua on your STM3210-EVAL board:

Programming eLua on the ET-STM32 stamp

Follow the steps below to install eLua on your ET-STM32 stamp:

Now you have eLua installed on your board, and you can choose the same port you used for programming as a general purpose serial port for eLua (but remember to use 115200 8N1 as the communication parameters this time).