caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Philippe Wang <philippe.wang@lip6.fr>
To: caml-list@inria.fr
Cc: Philippe Wang <philippe.wang@lip6.fr>
Subject: (Announce) "OCAPIC" : OCaml for PIC18 microcontrollers
Date: Thu, 4 Nov 2010 22:44:36 +0100	[thread overview]
Message-ID: <CB749C8B-30DA-49B7-A954-19C5FC896B26@lip6.fr> (raw)
In-Reply-To: <951AD91B-DA92-4F92-AE90-86A13DDB2357@lip6.fr>

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

Dear all,

this is an announcement for "OCAPIC", a project which brings OCaml to programming PIC micro-controllers.

Some PIC18 series characteristics:
- 8 bit architecture
- low cost (a few US dollars), fairly spread in electronics world
- very low volatile memory (a few bytes only, up to ~5000 bytes, depending on the model)
- very low non-volatile memory (less than a KB up to 128 KB)
- EEPROM : 0 to 1024 bytes

How to program those little chips with OCaml:
- write an OCaml program, compile it, transfer it to the PIC.

Well, actually it demands a little more than just that:
- write an OCaml program, like usually, while keeping in mind that the stack is more limited than usual, same for the heap
- compile it (with ocamlc)
- reduce the binary (with ocamlclean : a bytecode reducer which removes dead-code)
- transform the (reduced or not) binary (with bc2asm : take back not useful zeros, thence reducing the binary size)
- transfer it to the PIC along with its OCaml VM.

Indeed, an OCaml VM has been implemented in PIC18 ASM in order to run OCaml programs on a PIC ! :-)

An example of real program is in the distribution (open source, downloadable from the website):
ocapic-1.3/src/tests/goblet/ (722 lines of ML code).

We also provide a simulator in order to run on a PC (needs X11 (Linux/MacOSX) and GCC) your programs written for PIC18.

The whole implementation has been fairly well tested, however the documentation is still quite young.

Here is the website : 
http://www.algo-prog.info/ocaml_for_pic/ 

Cheers.

Benoît Vaugon (developer and initiator of OCAPIC project)
Philippe Wang (supervisor)
Emmanuel Chailloux (supervisor)

P.S. si vous êtes francophone et nous contactez directement, merci de le faire en français


[-- Attachment #2: Type: text/html, Size: 2204 bytes --]

       reply	other threads:[~2010-11-04 21:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <951AD91B-DA92-4F92-AE90-86A13DDB2357@lip6.fr>
2010-11-04 21:44 ` Philippe Wang [this message]
2010-11-05 12:35   ` [Caml-list] " Daniel Bünzli
2010-11-05 14:26     ` Philippe Wang
2010-11-06 17:47   ` Goswin von Brederlow
2010-11-06 19:19     ` Philippe Wang
2010-11-11  1:09       ` ocamlclean : an OCaml bytecode cleaner (Was: (Announce) "OCAPIC" : OCaml for PIC18 microcontrollers) Philippe Wang
2010-11-11  5:52         ` [Caml-list] " Julien Signoles
2010-11-11 11:57           ` Philippe Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CB749C8B-30DA-49B7-A954-19C5FC896B26@lip6.fr \
    --to=philippe.wang@lip6.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).