This project allows to run OCaml programs on PIC microcontrollers.
-
High-level multi-paradigm programming language.
Type-safetiness, robustness (strong static type check).
Functional paradigm (first-class functions and closures).
Imperative paradigm (mutable data, loops).
Object-oriented paradigm.
Exceptions.
Modules and functors.
Parametric polymorphism.
Automatic memory management.
The
PIC microcontrollers:
Write your program in OCaml.
Compile the source code with the ocapic
command.
Test your program with the OCaPIC simulator (optionnal).
Assemble the assembler file produced by
ocapic
(for example, with
gpasm).
Transfer the resulting hexadecimal code to the PIC.
Plug the PIC into a circuit, and run it!
OCaml Virtual Machine implemented in PIC18 assembler (compactness of binaries + efficiency).
PICs supported: all of the PIC18 family.
Porting of a large part of the OCaml runtime and standard library.
PICs specific libraries: LCD display, EEPROM, high level serial connection facilities, interruption catching, etc.
Two PIC simulators for OCaml programs to test them before programming the PIC.
OCaml library to write a component simulator as an OCaPIC simulator plug-in.
Deadcode elimination (with OCamlClean).
OCaml bytecode compression.
Fully tested, actually works with real programs.
Library documentation: manpages included in the
distribution.
-
Project author and developper: BenoƮt Vaugon
Project supervisor: Philippe Wang
Project meta-supervisor: Emmanuel Chailloux
-