Last weekend I was at a retro-computing fair in Cambridge, and BlackIce performed exceptionally in hosting four retro computers - namely Acorn Atom, BBC micro Model B, Jupiter Ace and a Z80 CP/M machine. These designs - the clever handiwork of a group of retro enthusiasts - including David Banks - who ported the designs to verilog and then to the BlackIce hardware show the versatility of low cost FPGA hardware. David's code has exercised the RAM, the microSD, the UART and proven that VGA is relatively easy to accomplish on the BlackIce.

This weekend I'm concentrating on the "front-end" of the BlackIce board, namely the STM32L433 ARM microcontroller. About a month ago I tentatively got this to work with the Arduino IDE - and after an evening's hack, I was able to flash an LED, using the Arduino Blink sketch.

Following yesterday's announcement by forum member Richard Miller, we now have a proper board description file for the BlackIce board - so that it can sensibly be programmed using the Arduino IDE - and all the pins are correctly labelled. I was keen to try out Richard's handiwork so set about getting it to work.

Arduino is the Marmite of embedded programming - you either love it or hate it. Regardless of how you feel about Arduino - Arduino has in the last 12 years probably has introduced more people to embedded programming of microcontrollers than any other organisation. What started with the humble AVR ATmega8 in 2005 has grown to include a multitude of different microcontrollers.

So when the STM32L433 was incorporated a few months ago - with a design called the Butterfly board - this opened up an easy route for BlackIce to enter the fold.

Richard has created a new board file for BlackIce - built upon the framework provided by the Butterfly work. This framework includes the DFU-UTIL program - which allows you to bootload the STM32 from within the Arduino IDE. It also takes into consideration the specifics of the BlackIce hardware - in particular the various GPIO lines that connect to the STM32L433 and appear on the "Arduino" headers.

it's fairly straightforward to load the standard Blink LED example and have the green LED flashing. A few helping hints -

First remove the programming jumper

Plug the USB cable into the centre connector

Always press the reset switch before you recompile and program.

Replace the jumper if you want the code to be permanent5 If you want to access the UART - use "Serial1.xxx" in any functions that use the Serial code.

So after I had Blink running, I decided to load my old favourite - SIMPL. This is a small interactive toolkit that allows you to exercise the hardware via a series of serial commands. You can read about it and find the code here:

# SIMPL
A serial interpreted minimal programming language toolkit - adapted for various microcontrollers.
SIMPL is about 300 lines of C code that allow you to control the peripherals of a microcontroller from a serial terminal connection.
It's usually the first thing I try to get working when bringing up any new microcontroller board.
It uses single ascii characters as commands to control the hardware - and commands can be strung together to make new commands - a litte bit like FORTH.
Most recently - runs under Arduino on STM32L433 on the myStorm BlackIce open source FPGA board - September 2017
Previously coded in under 1024 bytes of MSP430 assembly language - Runs on MSP430G2553 Launchpad
Here are some quick instructions
; Serial Interpreted Microcontroller Programming Language
;-------------------------------------------------------------------------------
; SIMPL - a very small Forth Inspired Extensible Language
; Ever evolving - some or all of this might not work on the version you try

All appears to work and soon I had the STM32L433 executing my interactive code.

Finally, the STM32 is cocked at 80MHz - which is 5 times faster than the standard Arduino, plus it is a 32 bit processor rather than an 8-bit device. I decided to run the standard dhrystone benchmark test to see how it compares to the regular 16MHz Arduino.

And the results are in

Arduino Uno

Microseconds for one run through Dhrystone: 78.67Dhrystones per Second: 12711.22VAX MIPS rating = 7.23

BlackIce:

Microseconds for one run through Dhrystone: 8.94Dhrystones per Second: 111854.70VAX MIPS rating = 63.66

So on the Dhrystone benchmark - BlackIce is about 8.8 times faster than the regular Arduino R3.

I'm trying to figure out how to use the official Arduino IDE (Ver 1.8.4) for programming the stm32L433. I've installed the Arduino STM32F4 boards package 1.0.1 via the boards manager. However there is only the Arduino star OTTO board listed. I have al...