I created the issue below a little while ago. Today I wonder whether Ada
2022s 'Image attribute on records use of Unbounded strings is for good reason. Is it an oversight that Bounded String would work with the new
light runtime or String with all runtimes including the older zero
footprint runtimes?
Perhaps it was decided that a light runtime would not use this feature?
and
I can cerrainly avoid it. However I use a light runtime with 100s of kilobytes or ram and many gigabytes of flash.
Ada is a much nicer language than Rust which uses unsafe all over for embedded but one thing that is interesting is that I believe all Rust code can be run easily on any target. Should Ada aspire to that?
On the other hand micros are becoming multiprocessor bringing more demand
for tasking (protected types are not compatible with a light runtime) but personally I believe multi chip single core designs are far better than multicore and not only due to the impossibility of side channel attacks
like spectre.
https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/67
--
Regards, Kc
Bounded Text_Buffer instead. So the language addresses this particular >concern.
I don't know if GNAT implements all of those ways (in particular, the >restriction Max_Image_Length), but that is hardly the fault of the language!
For anyone else interested in this particular discussion, I recommend
reading and following up on the ARG Githib issue rather than here >(https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/67).
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.
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.
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.
DrPi <314@drpi.fr> writes:A RaspberryPi is a computer (based on a microprocessor with an OS), not
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.
Not sure what a "real timeout management" would look like?
I'd like to have a full Ada RTS for embedded targets, like on
desktop.
Have you considered using something like a Raspberry Pi?
Le 28/09/2023 à 22:53, Simon Wright a écrit :
DrPi <314@drpi.fr> writes:A RaspberryPi is a computer (based on a microprocessor with an OS), not
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.
Not sure what a "real timeout management" would look like?
I'd like to have a full Ada RTS for embedded targets, like on
desktop.
Have you considered using something like a Raspberry Pi?
an micro-controller. It consumes a lot of electrical power. The OS
(linux) is not real time. It uses a lot of board space. The processor is
a proprietary black box...
A RaspberryPi is a computer (based on a microprocessor with an OS), notTasking 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.
Not sure what a "real timeout management" would look like?
I'd like to have a full Ada RTS for embedded targets, like on
desktop.
Have you considered using something like a Raspberry Pi?
an micro-controller. It consumes a lot of electrical power. The OS
(linux) is not real time. It uses a lot of board space. The processor is
a proprietary black box...
Plenty use the Raspberry Pi as a microcontroller
A RaspberryPi is a computer (based on a microprocessor with an OS),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.
Not sure what a "real timeout management" would look like?
I'd like to have a full Ada RTS for embedded targets, like on
desktop.
Have you considered using something like a Raspberry Pi?
not an micro-controller. It consumes a lot of electrical power. The
OS (linux) is not real time. It uses a lot of board space. The
processor is a proprietary black box...
Plenty use the Raspberry Pi as a microcontroller
I think Simons point was that Arm/Linux has a working full runtime. I guess bare raspberry pie would not and I guess it would be a rather large module
or board or single board computer depending on the model.
WRT energy use. I use a low power run feature on the STM32L4 which means
the
system clock speed can change at any time. That seems to be incompatible
with any runtime that I have seen except the minimal light-cortex-m4 one. I assume working with clocks is more scalable than working with runtimes but
I do not know for sure.
On 29/09/2023 10:59, Kevin Chadwick wrote:
A RaspberryPi is a computer (based on a microprocessor with an OS),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.
Not sure what a "real timeout management" would look like?
I'd like to have a full Ada RTS for embedded targets, like on
desktop.
Have you considered using something like a Raspberry Pi?
not an micro-controller. It consumes a lot of electrical power. The
OS (linux) is not real time. It uses a lot of board space. The
processor is a proprietary black box...
Plenty use the Raspberry Pi as a microcontroller
I think Simons point was that Arm/Linux has a working full runtime. I
guess
bare raspberry pie would not and I guess it would be a rather large
module
or board or single board computer depending on the model.
WRT energy use. I use a low power run feature on the STM32L4 which
means the
system clock speed can change at any time. That seems to be incompatible
with any runtime that I have seen except the minimal light-cortex-m4
one. I
assume working with clocks is more scalable than working with runtimes
but
I do not know for sure.
Agreed, but in addition to the mainline Pis there is the zero, and the
pico, which has a 'RP2040' made by Raspberry Pi and is a dual-core ARM
Cortex M0+ processor, with a flexible clock running up to 133MHz
WRT energy use. I use a low power run feature on the STM32L4 which means
the
system clock speed can change at any time. That seems to be incompatible
with any runtime that I have seen except the minimal light-cortex-m4 one. I assume working with clocks is more scalable than working with runtimes but
I do not know for sure.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:47:06 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,055 |