From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-91-241.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=none autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!news.gegeweb.eu!gegeweb.org!pasdenom.info!.POSTED.2a01:e0a:472:70f0:111f:d3d6:68da:c453!not-for-mail From: DrPi <314@drpi.fr> Newsgroups: comp.lang.ada Subject: Re: Should light runtimes get more consideration? Date: Thu, 28 Sep 2023 19:51:57 +0200 Organization: Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 28 Sep 2023 17:51:58 -0000 (UTC) Injection-Info: rasp.pasdenom.info; posting-account="314@usenet"; posting-host="2a01:e0a:472:70f0:111f:d3d6:68da:c453"; logging-data="31332"; mail-complaints-to="abuse@pasdenom.info" User-Agent: Mozilla Thunderbird Cancel-Lock: sha256:Uy7eq+jAUHbQB/YSLq2cV8c5fIWCkcgFvZLSvVZoykY= Content-Language: en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:65744 List-Id: > 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. > Right, not high. I've created 2 of them based on one of the Adacore RTS. I can't say it has been easy since you first have to understand how it works (and things change at each new release). One important point is that some critical parameters are hard coded in the source code. Like the core frequency. You MUST use a fix clock frequency to get correct time management (delays, ...). This is why in their last version, you run a script to generate part of the RTS source code (frequency and other parameters are injected in the source code). When you change the core frequency you have to regenerate the RTS binary. I created the RTS to evaluate the potential use of Ada on embedded targets. I have never used them except for testing. The main reason is that Adacore RTS are made for specific use (avionics, spatial...). The code using these RTS must be provable (or as provable as possible). This induce big limitations. Tasking is very limited. For example you can't use timeouts. Never. They propose a workaround but it is complex and not equivalent to a real timeout management. I'd like to have a full Ada RTS for embedded targets, like on desktop. I don't need to certify/prove my hardware/software. Some people say micro-controllers are too limited for this. That's true for some of them. I use micro-controllers with megabytes FLASH memory and hundreds kilobytes of RAM. Is this not enough ?