COBOL and Arduino in one glorious combination
C++ C COBOL Meson
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
COPYING
LiquidCrystal.cpp
LiquidCrystal.h
arduino.cob
arduino_uno_cross.txt
ardulib.cpp
ardulib.h
cobmain.c
libcob.c
libcob.h
meson.build
readme.md

readme.md

Running COBOL code on Arduino with Meson

Who says COBOL is only suitable for boring bank, insurance and payroll applications? This project demonstrates how you can use it to do embedded code on an Arduino microcontroller.

Requirements

Compile + upload

mkdir build
meson --cross-file arduino_uno_cross.txt build
cd build
ninja ardup

Other things of note

The scripts assume Linux and that your Arduino is in /dev/ttyACM0.

The code was tested with the GNU Cobol that was in Ubuntu repos at the time when the project was created. If GNU Cobol has changed its internals this project might fail to compile. The reason is that this application has its own, extremely minimal implementation of the GNU Cobol runtime. It can't use the standard version because of space constraints.

Going deeper

How the system works is explained in detail in this blog post.