uLisp for the STM32 Blue Pill board


#1

A beta version of uLisp 2.3 (with floating-point) is now available for the Blue Pill STM32F103C8T6 with 128Kbytes of flash. This is a low-priced board widely available from eBay, Banggood, and AliExpress for under £3/$4. Running uLisp it’s similar in performance to the Arduino Due.

Download uLisp from GitHub here:

ulisp-stm32

Installing uLisp from the Arduino IDE

Add the following link to the Additional Boards Manager URLs in Preferences:

https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

Then from Boards Manager install the package STM32 Cores by ST-Microelectronics.

You will need an FTDI USB-to-serial interface to connect between your PC and the Blue Pill board. Then make the following connections:

  • Connect Tx from the FTDI board to RX1 (PA10) on the Blue Pill.
  • Connect Rx from the FTDI board to TX1 (PA9) on the Blue Pill.
  • Connect GND between the FTDI board and Blue Pill.
  • If your FTDI supplies 5V connect it to the 5v pin of the Blue Pill board. If it’s 3.3V connect to the pin marked 3.3.
  • Connect the FTDI board USB input to your PC via a suitable USB cable.

Then in the Arduino IDE, from the Board submenu select:

Board: “Generic STM32F103 series”
Flash Memory Size: “128k”
Board part number: “BluePill F103C8”
Serial interface: “Generic serial”
Upload method: “Serial”
Port: The port corresponding to your FTDI board.

Each time you want to upload:

  • Connect the Boot0 jumper (the one nearest the edge of the Blue Pill board) to 1.
  • Leave the Boot1 jumper connected to 0.
  • Press the Blue Pill Reset button.

You should now be able to upload uLisp.

Connect the Boot0 jumper back to 0 once you’ve installed uLisp.

Using uLisp

Once you’ve uploaded uLisp you should be able to open the Arduino Serial Monitor and type in a command, such as:

(* 3 4)

Uploading a bootloader

Note that it should be possible to use the FTDI board to upload a bootloader to the Blue Pill so you can connect your PC directly to the USB port on the Blue Pill, and the FTDI board will no longer be required. More information on how to do this can be found in:

STM32 Blue Pill Arduino Guide


Suggested boards for running uLisp?
#2

Another popular board based on the STM32F103C8T6 for about the same price is the Maple Mini, but I haven’t managed to successfully upload uLisp to this yet. If anyone achieves this please post information here.