Nп/п : 79 из 100
 От   : Simon Wright                        2:5075/128        28 сен 23 14:25:18
 К    : Kevin Chadwick                                        28 сен 23 16:28:03
 Тема : Re: Should light runtimes get more consideration?
----------------------------------------------------------------------------------
                                                                                 
@MSGID: <lyr0mimnup.fsf@pushface.org> ce290337
@REPLY: 1@dont-email.me> 9dc0972d
@REPLYADDR Simon Wright <simon@pushface.org>
@REPLYTO 2:5075/128 Simon Wright
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: <lyr0mimnup.fsf@pushface.org>
@RFC-References: 1@dont-email.me>
1@dont-email.me>1@dont-email.me>
@TZUTC: 0100
@PID: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)
@TID: FIDOGATE-5.12-ge4e8b94
Kevin Chadwick <kc-usenet@chadwicks.me.uk> writes:

> That buffer support is pretty neat but my main concern which Gnat may
> (it may not) address more than the current language by providing a
> cortex runtime. Is that such demanding runtimes are brilliant but I am
> not sure if even Ravenscar is scalable to so many microchips such as
> Rust is trying to support. That isn`t a huge issue but barriers to
> entry like having to work out your own exception replacement might be
> turning users away. Which is unfortunate when Ada is the best language
> out there by a significant margin for embedded development or frankly
> any protocol or hardware register use.

When I started on Cortex GNAT RTS[1], a large part of the motivation
(aside from the fun element) was that AdaCore`s bare-board RTSs were
GPL`d (they still are). Not that I cared about that, but other people
did.

I took the approach of AdaCore`s SFP (small footprint) profile, now
renamed to light tasking, which implemented Ravenscar tasking but not
exception propagation or finalization.

The tasking part wasn`t too hard, though I think exception handling and
finalization might have made things more difficult. Basing the tasking
on FreeRTOS saved a lot of grief (there are a couple of areas when the
resulting semantic isn`t _quite_ Ada`s).

I did some work on finalization, not merged.

Exception handling, without finalization, seemed a daunting prospect,
specially since the last project I worked on before retirement regarded
an unhandled exception as requiring a reboot (and ditching any missiles
in flight).

The current implementation has about 17 files (1 .h, 1 .s, 9 .ads, 4
.adb) to customise to the chip (setting up interrupt vectors, the clock,
and memory). There are about 200 Ada sources that are common.

AdaCore currently have 68 RTS packages in the Alire gnat_arm_elf
toolchain. 18 of these are `embedded` packages (full Ada, but with
Jorvik tasking). I`d be surprised if they had a higher proportion of
chip dependency than my efforts. Most if not all of the exception
handling will be chip-independent. I`m not sure how many of the 90 or so
Ada sources in the STM32F4 gnarl/ directory are actually chip-dependent,
I get the impression it`s not high.

--------------------

So, unless you`re going to use some target that AdaCore haven`t released
support for, your best bet must be to either use or at worst start from
the available RTS packages.

[1] https://github.com/simonjwright/cortex-gnat-rts
--- Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)
 * Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх