Version française
Home     About     Download     Resources     Contact us    
Browse thread
(Announce) "OCAPIC" : OCaml for PIC18 microcontrollers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Philippe Wang <philippe.wang@l...>
Subject: Re: [Caml-list] (Announce) "OCAPIC" : OCaml for PIC18 microcontrollers
PIC ASM is the first "programming language" Benoît learnt, a few years ago. He has practiced it ever since.
But meanwhile he learnt OCaml (among other languages). A few months ago, he suggested me to implement an OCaml virtual machine running on PICs, with maximum performance efficiency in mind. This is why OCAPIC's VM is implemented in ASM. 

The purpose is of course to program PICs with a high level language while remaining (relatively) *very* efficient.

Vincent St-Amour and Marc Feeley have a similar project (Scheme on PICs) which a much higher priority on portability: their VM is implemented in C code.
http://www.ccs.neu.edu/home/stamourv/picobit-ifl.pdf

The "side effect" of our project — which can interest many OCaml users — is that OCAPIC provides "ocamlclean", which is a tool that takes an OCaml bytecode binary (produced by ocamlc) and reduces it by (statically) eliminating most of its deadcode (and of course dynlink is thence broken; note that dynlink is not relevant on PICs). This tool is independent from the rest of OCAPIC.
Actually, this tool was mandatory for programs using OO-layer : without it, bytecode binaries embedding OO-layer were to big to fit on our PICs. 

Cheers,

Philippe


On Nov 5, 2010, at 1:35 PM, Daniel Bünzli wrote:

> Interesting project. Was the choice of PIC based on technical reasons
> or just familiarity of the authors with these chips ?
> 
> I would have liked to give it a try but unfortunately I work AVRs and avr-gcc.
> 
> Best,
> 
> Daniel