Port of BBC BASIC (BBCSDL) to esp32-mos, targeting the ESP32-S3 (Xtensa LX7) and ESP32-P4 (RISC-V RV32IMAFC).
The interpreter runs as a bare-metal MOS user program. All I/O (console, file system, VDU) is delegated to the MOS API, keeping the BASIC core portable.
- ESP-IDF toolchain installed (provides
xtensa-esp-elf-gccand/orriscv32-esp-elf-gcc). - The esp32-mos project cloned as a sibling directory (
../esp32-mos).
git clone --recurse-submodules <this-repo-url>If you already cloned without --recurse-submodules:
git submodule update --initActivate the ESP-IDF toolchain first:
source ~/esp/esp-idf/export.shmakemake CHIP=esp32p4The output is bbcbasic.bin, a flat binary ready to be loaded by MOS.
Copy the binary into the esp32-mos data partition:
make install # ESP32-S3
make install CHIP=esp32p4 # ESP32-P4This places bbcbasic.bin in ../esp32-mos/data/<chip>/.
| Target | Description |
|---|---|
make clean |
Remove all build artifacts |
make disasm |
Generate bbcbasic.asm disassembly |
src/ Platform-specific source files
include/ ESP32 MOS-specific headers
BBCSDL/ BBCSDL submodule (interpreter headers)
Makefile Build system
mos_user.ld Linker script
The BBC BASIC interpreter source is Copyright (c) R. T. Russell. See the BBCSDL repository for license details.