GitHub Digital Lab

Fox Red Labs / Builds / Tools and languages

A Lisp prompt on a LaunchPad

Type a Lisp line on the MSPM0 G5187's USB serial port and see the answer. uLisp 4.9a runs unmodified through a 160-line Arduino shim.

MediumNo wiringabout 10 minutes (estimate, not timed)

The MSPM0 G5187 this build runs on, drawn from its user guide. Drag to turn it.

What you need

Works on this board
On Linux or WindowsThe steps were recorded on a Mac; paths and port names in them are the Mac ones.

macOS (recorded)

TI's tools
/Applications/ti, or ~/ti
Serial port
/dev/cu.usbmodem<serial>1
Probe access
nothing to do

Linux

TI's tools
~/ti (also searched: /opt/ti)
Serial port
/dev/ttyACM0 (by name: /dev/serial/by-id/*<serial>*-if00*)
Probe access
one udev rule, how

Windows

TI's tools
C:\ti (also searched: %USERPROFILE%\ti)
Serial port
COM<n>, named "XDS110 Class Application/User UART" in Device Manager
Probe access
the XDS110 USB driver from UniFlash or CCStudio

Your probe's serial on any system: python3 tools/frl/frl.py detect. Not run on a board under Linux or Windows. Everything else that differs: the full table.

Steps

  1. Build.TERMINAL

    Put an Arm GCC on your path and build. It takes about 20 seconds.

    ports/ulisp/build.sh

    You should see: ports/ulisp/build-g5187/ulisp.elf exists.

  2. Flash and check the prompt.TERMINAL

    Flash the image and read three seconds of the console. The check passes when uLisp appears.

    python3 tools/bench/run.py --board mspm0g5187 --image ports/ulisp/build-g5187/ulisp.elf --secs 3 --expect "uLisp"

    You should see: The tool prints a pass.

  3. Type Lisp.TERMINAL

    Open the board's serial port at 115200 baud in any serial terminal. The command shows screen, the Mac form. The port name carries your probe serial. Press ~ to stop a running program.

    Replace <your probe serial> before you run this.

    screen /dev/cu.usbmodem<your probe serial>1 115200

    You should see: uLisp 4.9a, then a prompt showing the free workspace, such as 2800>. (+ 1 2) answers 3.

Read the serial output

Open the board's USB serial port in any terminal program at 115200 baud. The lines the program prints appear there.

What to build next

Blink an LEDThe board's LED blinks, then blinks the pattern you set
Build and flash from the terminal in one commandTI's examples build and flash from one terminal command, no window
Print a message from the board on your computerText from the chip appears in a terminal on your computer, and what you type goes back

Every build

If something goes wrong

The compiler is not foundPut its bin folder first on your PATH; any arm-none-eabi-g++ 12 or newer works.
The tool cannot find the boardReplug the USB cable and run it again.
Nothing appearsPress Enter once.

Every fix for this board: the FAQ.

Get the code

Ran here, with steps. A Lisp prompt on the USB serial port passes 19 of 19 REPL checks; (tak 18 12 6) takes 7.5 s at 80 MHz; the image is 98.8 kB of flash.

Start it

Paste this in a terminal. It hands off to an AI assistant with this board's notes.

./start.sh mspm0g5187 ulisp --assistant claudegit clone --depth 1 --filter=blob:none https://github.com/Fox-Red-Labs/fox-red-labs.git && cd fox-red-labs ./start.sh mspm0g5187 ulisp --assistant claude
Not Claude Code? Copy this prompt instead.
Clone https://github.com/Fox-Red-Labs/fox-red-labs and read mspm0g5187/AGENTS.md first. Then run A Lisp prompt on a LaunchPad on my LP-MSPM0G5187. Tell me when to plug in the board and what you saw at each step.
Only the code for this board
git sparse-checkout set ports/ulisp third-party mspm0g5187 tools mac-setupgit clone --depth 1 --filter=blob:none --sparse https://github.com/Fox-Red-Labs/fox-red-labs.git cd fox-red-labs git sparse-checkout set ports/ulisp third-party mspm0g5187 tools mac-setup
Or take the whole repository
git clone https://github.com/Fox-Red-Labs/fox-red-labs.git
Reports from others, and the report forms

Clone the repository and open the board's folder below. AGENTS.md is a plain text file of notes for AI coding assistants, and llms.txt at the root indexes the site for one.

git clone https://github.com/Fox-Red-Labs/fox-red-labs.git

Code is BSD-3-Clause, writing is CC BY 4.0; third-party folders keep their own licenses.

Built it? Tell us

Built this, or got stuck? Report it on GitHub with a few short answers. Your report shows here in your words, marked as yours. A failure that repeats on the bench gets its fix here.

Evidence and limitsuLisp runs on the MSPM0 G5187 and passes 19 of 19 prompt checks; the G3507 and G3519 images build. Results, sources, timing and limits.

Expected result: A Lisp prompt on the serial port that evaluates what you type.

What this shows

  • An unmodified Lisp interpreter runs on a Cortex-M0+ with 32 kB of RAM, with 2,800 objects of workspace.
  • (tak 18 12 6) takes 7.5 s at 80 MHz; the Arduino Zero (48 MHz) takes 11.4 s and the Raspberry Pi Pico (200 MHz) 2.6 s, from uLisp's published tables.
What this does not establish, and limits

What this does not establish

  • Analog read, sound, SPI and I2C are stubs. The LED path was driven by hand, and the repository's LED check read the pin toggling but printed FAIL for the run because it reads at the instant of reset.

Limits to keep in mind

  • These steps ran on one board. The MSPM0 G3507 and MSPM0 G3519 images build and were not flashed.
  • The workspace is 2,800 objects on the 32 kB parts, 9,000 on the G3519.

Sources

Versions, sizes and timing

tak 18 12 67.5 s at 80 MHzthe data (CSV)
fib 235.2 sthe data (CSV)
Full garbage collection1.07 msREADME notes

Evidence

  • 19 REPL checks and 5 benchmark runs pass on the board, over serial.
  • A runaway recursion prints Error: stack overflow and the next line works.
  • The image is 98.8 kB of flash (77 percent of 128 kB) and 23.1 kB of RAM, with 8.9 kB left for the stack. README notes

Other boards

What the status words mean

Works ran here and did what it shouldCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why

Result grid

Project
LP-MSPM0G3507MSPM0G3507 chip
LP-MSPM0L1306MSPM0L1306 chip
LP-EM-CC2340R5CC2340R52 chip
LAUNCHXL-F2800137TMS320F2800137 chip
A Lisp prompt on a LaunchPad
LP-MSPM0G3507Should workThe same source builds: 98.8 kB of 128 kB flash and 23.1 kB of 32 kB RAM. It was not flashed ulisp notes
LP-MSPM0L1306Not for this chipThe smallest uLisp image is 100.2 kB of flash against the chip's 64 kB (34.7 kB over, even with link-time optimization);
DetailsRAM would fit with a 24-object workspace
ulisp notes
LP-EM-CC2340R5WorksThe interpreter runs from the board's serial port:
Details19 of 19 REPL checks pass, the stack-overflow guard fires, (tak 18 12 6) takes 10.8 s and (fib 23) 7.5 s at 48 MHz with the same 2,800-object workspace as the MSPM0 builds; 98.6 kB of flash, 24.6 kB of static RAM. A plain register-variable read of the stack pointer never fired the guard under TI Arm Clang; an explicit move fixed it
ulisp notes
LAUNCHXL-F2800137Works19 of 19 REPL checks in three runs from the board's serial port after the sketch's ints were widened to 32 bits for the 16-bit C28x;
Details(tak 18 12 6) takes 8.1 s and (fib 23) 5.3 s at 120 MHz with a 2,000-object workspace; 141.9 kB of flash, 28.7 kB of RAM, written as a raw binary. Faster than the CC2340R5 on the clock, about 2.5 times the clocks per step
ulisp notes

Works ran here and did what it shouldShould work it builds; only naming, packaging or build glue is in the way; hover for whichCould work some of it ran; real porting effort is left; hover for whatNot for this chip the chip or its vendor software cannot; hover for why

Source files

  • ulisp notes (MSPM0 G3507, CC2340R5 and LAUNCHXL-F2800137)

Code brought from elsewhere

This project uses code that was written for other chips or tools. Each links to how to get it running.

Start with your code, and the prompt to port your own