Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Kenneth Adam Miller <kennethadammiller@gmail.com>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml embedded
Date: Fri, 26 Jun 2015 01:40:44 -0400	[thread overview]
Message-ID: <CAK7rcp-JNA72R7PO=tqd1nXLhqdwvTXRUviotTwXYqL-1uLMcA@mail.gmail.com> (raw)
In-Reply-To: <CAK7rcp_FU9-6PxtRKMz19CSCBARAJS4gLFOgfyGqokk_7r47ow@mail.gmail.com>

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

Oh yeah, you need a OCaml tool chain targeted to arm... whoops. Sorry about
that, I missed that part.

On Fri, Jun 26, 2015 at 1:40 AM, Kenneth Adam Miller <
kennethadammiller@gmail.com> wrote:

> It's easy to compile images that can be run in qemu with buildroot. I
> don't know much about yocto, but you can use the crosstool-ng toolkit to
> compile a tool chain for cross compiling. You can have multiple tool
> chains, and have unique images for each of your respective targets,
> possibly just running your ocaml code locally and recompiling it for arm
> when you want to put it on the device :)
>
> On Thu, Jun 25, 2015 at 11:04 PM, Berke Durak <berke.durak@gmail.com>
> wrote:
>
>> On Tue, Jun 23, 2015 at 6:32 AM, Markus Weißmann
>> <markus.weissmann@in.tum.de> wrote:
>> >
>> > I can offer experience in the following cases:
>> > 1) If your system is powerful enough (e.g. rasperry pi), you can just
>> install the ocaml toolchain on your system and develop there on your target
>> system.
>>
>> Seconded.  We did almost that for one of our projects and it works
>> pretty well.  The difference is that we didn't use QEmu, but two of
>> our custom Q7 board (based on a Zynq ARM Cortex A9 with 512 MB RAM,
>> see http://xiphos.com/products/q7-processor/ ).
>>
>> We use Yocto to generate two versions of a Linux system: the target
>> system, and a much larger version that contains developer tools (C
>> compiler, m4, etc.)  The development system runs from microSD cards,
>> and takes the better part of a gigabyte, while the target system has
>> to run from < 64 megs of flash.  The required run-time dependencies of
>> the target system have to be manually configured in the Yocto recipes.
>>
>> We then manually install opam on the developer board, and use it to
>> compile our OCaml code. The generated native ARM executables are then
>> packaged into .ipks and transferred to the target Q7 board (connected
>> to actual hardware:
>> http://www.ghgsat.com/wp-content/uploads/2015/03/Payload-Selfie.jpg )
>> The packaging is done using a simple shell script that invokes ar and
>> tar.
>>
>> We did try using QEmu but it's significantly slower, however it may
>> come into play as automating the build process (using a virtual
>> machine or dedicated hardware) is on our to do list, and build time
>> isn't as important when it's a nightly automated build.
>>
>> Initially we looked into using a cross-compiler but we decided that
>> being able to use Opam largely outweighs any possible benefit we could
>> get from cross-compiling.  And cross-compiling is often a source of
>> headaches, even when compiling plain old C.  We would have to write a
>> lot of Yocto recipes to get it running.  Note that Yocto is written in
>> a progarmming language called Python and requires recipes to be
>> expressed mostly the same language.
>>
>> To conclude, as powerful ARM systems are very cheap and plentiful
>> these days, and since the convenience of Opam is immense, I'm not sure
>> there is much incentive in using a cross-compiler.  BTW, is there a
>> maintained ARM cross-compiler?
>> --
>> Berke Durak
>>
>> --
>> Caml-list mailing list.  Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>
>
>

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

  reply	other threads:[~2015-06-26  5:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 10:07 xavier deschuyteneer
2015-06-23 10:32 ` Markus Weißmann
2015-06-26  3:04   ` Berke Durak
2015-06-26  5:40     ` Kenneth Adam Miller
2015-06-26  5:40       ` Kenneth Adam Miller [this message]
2015-06-26  8:18     ` Francois Berenger
2015-06-26  9:57     ` xavier deschuyteneer
2015-06-26 13:39       ` Pierre-Alexandre Voye
2015-07-16 10:06       ` Goswin von Brederlow
2015-07-16 18:45         ` xavier deschuyteneer
2015-06-26 21:25     ` Gerd Stolpmann

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='CAK7rcp-JNA72R7PO=tqd1nXLhqdwvTXRUviotTwXYqL-1uLMcA@mail.gmail.com' \
    --to=kennethadammiller@gmail.com \
    --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