comp.lang.ada
 help / color / mirror / Atom feed
* Would this be logical for embedded hardware?
@ 2012-06-28 23:54 Patrick
  2012-06-29  0:31 ` Jeffrey Carter
  2012-07-02  9:19 ` Austin Obyrne
  0 siblings, 2 replies; 9+ messages in thread
From: Patrick @ 2012-06-28 23:54 UTC (permalink / raw)


I have come up with a design layout that I did not read about elsewhere and that worries me! Please read this and possibly save me from my own stupidity.

A little background...

I want to use Ada for several things but a key one is to design a scientific instrument. I was drawn to Ada in late 2011 because it has a rich set of features to make embedded design easier and by it's strict compiler. 

I don't think Ada is hard to develop in but I actually don't care, above all else, I want to ship as few bugs as I possibly can. I have next to no experience with embedded design and I do not have decades of experience with desktop programming either. Ada's compiler could really help someone like me.

A couple months ago I was disheartened to learn that my assumptions about Ada running on bare metal were false. GNAT does not have the ability to target all the devices GCC supports while still offering a full Ada implementation.

I have been trying to find a RTOS to partner with Ada but there is a dizzying array of them. It seems like the ones held in highest regard are closed source and expensive. I also don't have hard deadlines, near realtime is just fine. Linux would be fine but I can't imagine fitting it on a device and still having enough GPIO lines left over to do what I want with.

One of the things that appeals most to me with Ada is tasking. It seems like a good way to compartmentalize complexity. I can't visualize how to do this in C.

With those items in mind, here is what I was thinking.... 32 bit microcontrollers are dirt cheap and many come with ethernet built in and TCP/IP libraries.

If I broke the instrument down in to various modules, keypad, computer-controlled power supply, optical system, detector etc. I could assign a microcontroller to each module and program that MCU in C. The C program could pretty much do one thing only. 

I could use a Linux single board computer(maybe something like Raspberry PI) and some sort of router to communicate with the various MCU C modules. Ada Tasking on the Linux SBC would give me a logical way to control them and the bulk of the full system's logic could be in Ada,  Ada would also give me exceptions if something goes wrong.

If I used ethernet instead of SPI or CAN bus, I could control all the C MCUs using a plain Linux desktop and then add in the Linux SBC at the end.

Does this seem logical?-Patrick



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-07-02 13:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 23:54 Would this be logical for embedded hardware? Patrick
2012-06-29  0:31 ` Jeffrey Carter
2012-06-29 15:37   ` Patrick
2012-06-29 16:17     ` Niklas Holsti
2012-07-02  8:14       ` Jacob Sparre Andersen
2012-06-29 18:59     ` Jeffrey Carter
2012-07-02  9:19 ` Austin Obyrne
2012-07-02 11:19   ` Simon Wright
2012-07-02 13:16     ` Austin Obyrne

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