* [Caml-list] OCaml on the Arduino (or similar) @ 2014-01-19 0:12 Jon Harrop 2014-01-19 8:58 ` Adrien Nader 2014-01-19 10:45 ` oliver 0 siblings, 2 replies; 8+ messages in thread From: Jon Harrop @ 2014-01-19 0:12 UTC (permalink / raw) To: Caml List [-- Attachment #1: Type: text/plain, Size: 293 bytes --] I don't suppose anyone has retargeted OCaml to run on an Arduino or similar? I'm just getting into Arduino programming and writing async code in C++ is just horrible. L -- Dr Jon Harrop, Flying Frog Consultancy Ltd. <http://www.ffconsultancy.com/> http://www.ffconsultancy.com [-- Attachment #2: Type: text/html, Size: 2386 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-01-19 0:12 [Caml-list] OCaml on the Arduino (or similar) Jon Harrop @ 2014-01-19 8:58 ` Adrien Nader 2014-06-30 16:50 ` Peter Zotov 2014-01-19 10:45 ` oliver 1 sibling, 1 reply; 8+ messages in thread From: Adrien Nader @ 2014-01-19 8:58 UTC (permalink / raw) To: Jon Harrop; +Cc: Caml List On Sun, Jan 19, 2014, Jon Harrop wrote: > > > I don't suppose anyone has retargeted OCaml to run on an Arduino or similar? > > > > I'm just getting into Arduino programming and writing async code in C++ is > just horrible. L There is OCaPIC fro PIC18 (or above iirc): http://www.algo-prog.info/ocapic/web/index.php?id=OCAPIC -- Adrien Nader ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-01-19 8:58 ` Adrien Nader @ 2014-06-30 16:50 ` Peter Zotov 0 siblings, 0 replies; 8+ messages in thread From: Peter Zotov @ 2014-06-30 16:50 UTC (permalink / raw) To: caml-list On 2014-01-19 12:58, Adrien Nader wrote: > On Sun, Jan 19, 2014, Jon Harrop wrote: >> >> >> I don't suppose anyone has retargeted OCaml to run on an Arduino or >> similar? >> >> >> >> I'm just getting into Arduino programming and writing async code in >> C++ is >> just horrible. L > > There is OCaPIC fro PIC18 (or above iirc): > http://www.algo-prog.info/ocapic/web/index.php?id=OCAPIC I second this suggestion. Porting OCaPIC runtime to run on AVR (or Cortex-M ARM) is the easiest way. -- Peter Zotov sip:whitequark@sipnet.ru ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-01-19 0:12 [Caml-list] OCaml on the Arduino (or similar) Jon Harrop 2014-01-19 8:58 ` Adrien Nader @ 2014-01-19 10:45 ` oliver 2014-01-19 15:58 ` Dario Teixeira 1 sibling, 1 reply; 8+ messages in thread From: oliver @ 2014-01-19 10:45 UTC (permalink / raw) To: Jon Harrop; +Cc: Caml List Hi, On Sun, Jan 19, 2014 at 12:12:03AM -0000, Jon Harrop wrote: > > > I don't suppose anyone has retargeted OCaml to run on an Arduino or similar? [...] Arch-Arm-Linux (e.g. for Raspberry Pi) also has OCaml-packages. Regarding Arduino I don't know it. Possibly the hardware is too weak for running Linux? Ciao, Oliver ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-01-19 10:45 ` oliver @ 2014-01-19 15:58 ` Dario Teixeira 2014-01-19 16:05 ` Adrien Nader 0 siblings, 1 reply; 8+ messages in thread From: Dario Teixeira @ 2014-01-19 15:58 UTC (permalink / raw) To: oliver, Jon Harrop; +Cc: Caml List Hi, > Arch-Arm-Linux (e.g. for Raspberry Pi) also has OCaml-packages. > > Regarding Arduino I don't know it. > Possibly the hardware is too weak for running Linux? Depends on which Arduino you are talking about. The Uno and most other common variants are based on a fairly puny (by today's standards) Atmel 8-bit processor. But there are other more powerful Arduino boards (like the Due) based on ARM Cortex-M processors. There are ports of Linux to some Cortex-M variants, but I don't know if these happen to be the same as those used in the Arduino Due... But anyway, if you need something powerful enough to run Linux, you might also consider other boards like the Raspberry Pi or the BeagleBone Black. The latter in particular is a pretty powerful device and has tons of GPIO pins. Best regards, Dario Teixeira ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-01-19 15:58 ` Dario Teixeira @ 2014-01-19 16:05 ` Adrien Nader 2014-06-30 14:02 ` Goswin von Brederlow 0 siblings, 1 reply; 8+ messages in thread From: Adrien Nader @ 2014-01-19 16:05 UTC (permalink / raw) To: Dario Teixeira; +Cc: oliver, Jon Harrop, Caml List On Sun, Jan 19, 2014, Dario Teixeira wrote: > Hi, > > > Arch-Arm-Linux (e.g. for Raspberry Pi) also has OCaml-packages. > > > > > Regarding Arduino I don't know it. > > Possibly the hardware is too weak for running Linux? > > Depends on which Arduino you are talking about. The Uno > and most other common variants are based on a fairly puny > (by today's standards) Atmel 8-bit processor. But there > are other more powerful Arduino boards (like the Due) > based on ARM Cortex-M processors. There are ports of Linux > to some Cortex-M variants, but I don't know if these happen > to be the same as those used in the Arduino Due... > > But anyway, if you need something powerful enough to run Linux, > you might also consider other boards like the Raspberry Pi or > the BeagleBone Black. The latter in particular is a pretty > powerful device and has tons of GPIO pins. > You could run something like Mirage too. ;-) http://www.openmirage.org/ -- Adrien Nader ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-01-19 16:05 ` Adrien Nader @ 2014-06-30 14:02 ` Goswin von Brederlow 2014-07-01 6:29 ` Anil Madhavapeddy 0 siblings, 1 reply; 8+ messages in thread From: Goswin von Brederlow @ 2014-06-30 14:02 UTC (permalink / raw) To: caml-list On Sun, Jan 19, 2014 at 05:05:30PM +0100, Adrien Nader wrote: > On Sun, Jan 19, 2014, Dario Teixeira wrote: > > Hi, > > > > > Arch-Arm-Linux (e.g. for Raspberry Pi) also has OCaml-packages. > > > > > > > > Regarding Arduino I don't know it. > > > Possibly the hardware is too weak for running Linux? > > > > Depends on which Arduino you are talking about. The Uno > > and most other common variants are based on a fairly puny > > (by today's standards) Atmel 8-bit processor. But there > > are other more powerful Arduino boards (like the Due) > > based on ARM Cortex-M processors. There are ports of Linux > > to some Cortex-M variants, but I don't know if these happen > > to be the same as those used in the Arduino Due... > > > > But anyway, if you need something powerful enough to run Linux, > > you might also consider other boards like the Raspberry Pi or > > the BeagleBone Black. The latter in particular is a pretty > > powerful device and has tons of GPIO pins. > > > > You could run something like Mirage too. ;-) > > http://www.openmirage.org/ > > -- > Adrien Nader Mirage though requires hardware virtualization, which means a quite recent and powerfull arm board. The Raspberry Pi is way to old for that (Note: the cpu is way older than what other boards have). I've written an exokernel that lets me run ocaml barebone on the Raspberry Pi: https://github.com/mrvn/ocaml-rpi It's at a proof-of-concept stage. You can run simple code with output on the serial console. The graphics gets initialized too but there is no ocaml interface for it yet though. I've run into a problem that the GC will crash after a while that I got stuck on. The exokernel might be a good starting point for other boards (where mirage doesn't run) too. You don't need much to get the ocaml runtime running on some board. For Arduino the hard part would be to gte ocaml itself build. I don't think 16-bit values are supported. MfG Goswin ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] OCaml on the Arduino (or similar) 2014-06-30 14:02 ` Goswin von Brederlow @ 2014-07-01 6:29 ` Anil Madhavapeddy 0 siblings, 0 replies; 8+ messages in thread From: Anil Madhavapeddy @ 2014-07-01 6:29 UTC (permalink / raw) To: Goswin von Brederlow; +Cc: caml-list On 30 Jun 2014, at 17:02, Goswin von Brederlow <goswin-v-b@web.de> wrote: > On Sun, Jan 19, 2014 at 05:05:30PM +0100, Adrien Nader wrote: >> On Sun, Jan 19, 2014, Dario Teixeira wrote: >>> Hi, >>> >>>> Arch-Arm-Linux (e.g. for Raspberry Pi) also has OCaml-packages. >>> >>>> >>>> Regarding Arduino I don't know it. >>>> Possibly the hardware is too weak for running Linux? >>> >>> Depends on which Arduino you are talking about. The Uno >>> and most other common variants are based on a fairly puny >>> (by today's standards) Atmel 8-bit processor. But there >>> are other more powerful Arduino boards (like the Due) >>> based on ARM Cortex-M processors. There are ports of Linux >>> to some Cortex-M variants, but I don't know if these happen >>> to be the same as those used in the Arduino Due... >>> >>> But anyway, if you need something powerful enough to run Linux, >>> you might also consider other boards like the Raspberry Pi or >>> the BeagleBone Black. The latter in particular is a pretty >>> powerful device and has tons of GPIO pins. >>> >> >> You could run something like Mirage too. ;-) >> >> http://www.openmirage.org/ >> >> -- >> Adrien Nader > > Mirage though requires hardware virtualization, which means a quite > recent and powerfull arm board. The Raspberry Pi is way to old for > that (Note: the cpu is way older than what other boards have). To be more precise, the Mirage/Xen/ARM backend requires hardware virtualization in order to provide the bootloader and device libraries. The majority of other libraries should just work once these are supplied. There's an effort underway to complete a FreeBSD kernel module backend, which would output a kthread-based module. This would run on the rPi, since you could strip down the FreeBSD kernel to pretty much just have the bootloader, virtual memory manager, and the required devices drivers. > > I've written an exokernel that lets me run ocaml barebone on the > Raspberry Pi: > > https://github.com/mrvn/ocaml-rpi > > It's at a proof-of-concept stage. You can run simple code with output > on the serial console. The graphics gets initialized too but there is > no ocaml interface for it yet though. I've run into a problem that the > GC will crash after a while that I got stuck on. > > The exokernel might be a good starting point for other boards (where > mirage doesn't run) too. You don't need much to get the ocaml runtime > running on some board. Or indeed, just use this as a base as well! The reason we selected kFreeBSD is to make bootstrap of the device drivers easier, and gradually rewrite them. -anil ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-07-01 6:30 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-01-19 0:12 [Caml-list] OCaml on the Arduino (or similar) Jon Harrop 2014-01-19 8:58 ` Adrien Nader 2014-06-30 16:50 ` Peter Zotov 2014-01-19 10:45 ` oliver 2014-01-19 15:58 ` Dario Teixeira 2014-01-19 16:05 ` Adrien Nader 2014-06-30 14:02 ` Goswin von Brederlow 2014-07-01 6:29 ` Anil Madhavapeddy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox