
OCaPIC: PIC microcontrollers programmed in OCaml - lelf
http://www.algo-prog.info/ocapic/web/
======
dmitrygr
Just a note, this is for PIC18, which is C-friendly. The other 8-bit families
(PIC10, PIC12, PIC24, PIC16), the popular ones, are not supported.

This isn't surprising since even a normal C compiler for those is VERY VERY
hard. They are very C-hostile (hardware call stack, weirdly banked memory,
etc). Some fixes exist in more recent chips (linear memory) but still these
are hard for C.

~~~
userbinator
To put it into perspective, the PIC10 has _up to_ 512 instructions and 64
bytes of RAM. IMHO it's not something you'd really want to program in anything
other than Asm, because even if a C compiler is available, the "dialect" of C
you get is so far from "typical" that you're really just using it as a not-so-
portable assembler.

I'm not sure why you included the PIC24, because that's a 16-bit family and
more into the region of "not too bad to use C with".

~~~
dmitrygr
I meant 14. 24 is basically a PDP11 isa and is great for c

------
tempodox
Great news to see progress on this front. I'd love to see that for dsPIC33.

------
gaze
Neat! How portable is the VM?

~~~
sanxiyn
VM is written in PIC18 assembly. It is not portable at all.

