comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: ANN: Cortex GNAT RTS 2018-07-15
Date: Mon, 16 Jul 2018 12:56:45 +0100
Date: 2018-07-16T12:56:45+01:00	[thread overview]
Message-ID: <lywotve6ma.fsf@pushface.org> (raw)
In-Reply-To: 87in5gf9nt.fsf@nightsong.com

Paul Rubin <no.email@nospam.invalid> writes:

> Can you say about how hard it is to port GNAT RTS to a new board,
> given a reasonable C environment for the board?  How much code space
> and ram is required?

I don't know about the AdaCore RTS, but I imagine it'll be much the same
as this one (after you've got to grips with the deeply nested,
use-clause-happy code :-)

For this one, I started on 1 July and had a working RTS (bar an issue
with the board clock, discovered later) by 4 July.

The issues (once you have a base RTS for one ARM board) are

* startup, any RAM/Flash/FPU settings, clock
* interrupts, interrupt priority range, names

For the micro:bit, compiling with -O0 and assertions enabled, I get, for
the RTS + other support, in a program with delays, a task, and an
interrupt-handling PO,

text
        libgcc      1380
        gnat       10132
        freertos    7724
        libc         280

rodata
        gnat        1252

data
        gnat         220
        freertos       4

bss
        gnat          68
        freertos     340

The base RAM use (data + bss) for this program was 900 bytes. Out of the
remaining RAM (15484), it used (via heap allocations)

initial/interrupt stack   1024
environment task stack    1536
1 task stack              1024
others?                    828

and the free heap was 11072 (those numbers don't quite add up, I think
there's some overhead in the heap management maybe).

I'm not sure why the environment task stack needs to be so high (it does
elaboration + Ada main). The task stack could probably be lower, one
outstanding job is to work out a way of measuring task stack usage.

  parent reply	other threads:[~2018-07-16 11:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-15 19:41 ANN: Cortex GNAT RTS 2018-07-15 Simon Wright
2018-07-15 21:53 ` Paul Rubin
2018-07-16  8:53   ` fabien.chouteau
2018-07-16 11:56   ` Simon Wright [this message]
2018-07-27  9:07     ` Paul Rubin
2018-07-27 10:13       ` fabien.chouteau
2018-07-27 20:20       ` Simon Wright
2018-07-27 20:51         ` Paul Rubin
2018-07-28 11:18           ` Simon Wright
2018-07-16 14:56   ` Simon Wright
2018-07-17  2:14     ` Paul Rubin
2018-07-17  8:27       ` fabien.chouteau
2018-07-17  9:43         ` Paul Rubin
2018-07-17 10:21           ` fabien.chouteau
2018-07-17 13:14       ` Simon Wright
2018-07-17 19:46         ` Paul Rubin
2018-07-18  0:59           ` Paul Rubin
2018-07-18  7:27           ` Dmitry A. Kazakov
2018-07-18  8:29             ` Paul Rubin
2018-07-18 11:31         ` Tero Koskinen
2018-07-18 21:52           ` Paul Rubin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox