comp.lang.ada
 help / color / mirror / Atom feed
* what does your Ada + hardware look like ?
@ 2015-10-06 22:18 halfmaddad
  2015-10-06 23:40 ` Luke A. Guest
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: halfmaddad @ 2015-10-06 22:18 UTC (permalink / raw)


Hi Everyone

Ada basically needs a Posix system underneth. Other members have shown us how to run Ada on bare metal and on single board computers like the BeagleBoard but my guess is that this is not the common case.

What sorts of hardware are you using with Ada? What sort of CPU, is it on a custom PCBs or off the shelf?

Has anyone used IC2 or SPI from a desktop to control circuits that don't have a C firmware?

Please share!

Thanks-Patrick

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

* Re: what does your Ada + hardware look like ?
  2015-10-06 22:18 what does your Ada + hardware look like ? halfmaddad
@ 2015-10-06 23:40 ` Luke A. Guest
  2015-10-07  7:23 ` Dmitry A. Kazakov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 17+ messages in thread
From: Luke A. Guest @ 2015-10-06 23:40 UTC (permalink / raw)


<halfmaddad@gmail.com> wrote:
> Hi Everyone
> 
> Ada basically needs a Posix system underneth. Other members have shown us
> how to run Ada on bare metal and on single board computers like the
> BeagleBoard but my guess is that this is not the common case.


You don't need POSIX.

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

* Re: what does your Ada + hardware look like ?
  2015-10-06 22:18 what does your Ada + hardware look like ? halfmaddad
  2015-10-06 23:40 ` Luke A. Guest
@ 2015-10-07  7:23 ` Dmitry A. Kazakov
  2015-10-07 11:40   ` halfmaddad
  2015-10-07 19:42 ` Tero Koskinen
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Dmitry A. Kazakov @ 2015-10-07  7:23 UTC (permalink / raw)


On Tue, 6 Oct 2015 15:18:38 -0700 (PDT), halfmaddad@gmail.com wrote:

> Ada basically needs a Posix system underneth.

Luckily, it does not.

> What sorts of hardware are you using with Ada? What sort of CPU, is it on
> a custom PCBs or off the shelf?

x86 Atom and ARM v7 boards.

> Has anyone used IC2 or SPI from a desktop to control circuits that don't have a C firmware?

Meaning?

We are using those through OS drivers. In our case bare-board does not make
much sense.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: what does your Ada + hardware look like ?
  2015-10-07  7:23 ` Dmitry A. Kazakov
@ 2015-10-07 11:40   ` halfmaddad
  2015-10-07 11:50     ` halfmaddad
  2015-10-07 17:17     ` Luke A. Guest
  0 siblings, 2 replies; 17+ messages in thread
From: halfmaddad @ 2015-10-07 11:40 UTC (permalink / raw)


Hi Luke

You are exactly the person I was thinking of when I mentioned bare metal.

Here is a link to a tutorial by Luke:

http://wiki.osdev.org/Ada_Bare_bones


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

* Re: what does your Ada + hardware look like ?
  2015-10-07 11:40   ` halfmaddad
@ 2015-10-07 11:50     ` halfmaddad
  2015-10-07 12:40       ` Jacob Sparre Andersen
                         ` (3 more replies)
  2015-10-07 17:17     ` Luke A. Guest
  1 sibling, 4 replies; 17+ messages in thread
From: halfmaddad @ 2015-10-07 11:50 UTC (permalink / raw)


Hi Dmitry

You work with landing gear correct?

Do you run with an OS ? I know we can run without one but then we lose tasking, nested subprograms and exception handling, no?

So I work with scientific instruments. Sometimes I modify them for people but I basically just repair them. I have thought about designing one for a long time. It would take a lot less time and I would end up with a better product if I could do it in Ada rather then C/C++.

If each instrument will have a desktop computer beside it anyways, does it make so much sense to struggle with a small embedded design. Side note, I get beat up everytime I dare to use the word embdded. I mean a memory constrained device without an OS. If I have a desktop computer the main issue would be interfacing it to an external circuit that has no firmware or at least none that I wrote.

I was wondering about using SPI with a GPIO card but I have not done this before. I know there are also USB-GPIO adapters.

Am I making things clearer or worse ? :)

I have to run out for a few hours.

-Patrick


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

* Re: what does your Ada + hardware look like ?
  2015-10-07 11:50     ` halfmaddad
@ 2015-10-07 12:40       ` Jacob Sparre Andersen
  2015-10-07 13:22       ` Dmitry A. Kazakov
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Jacob Sparre Andersen @ 2015-10-07 12:40 UTC (permalink / raw)


halfmaddad@gmail.com writes:

> I know we can run without one but then we lose tasking, nested
> subprograms and exception handling, no?

No.

Greetings,

Jacob
-- 
"I'm going as a barrel of toxic waste!"

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

* Re: what does your Ada + hardware look like ?
  2015-10-07 11:50     ` halfmaddad
  2015-10-07 12:40       ` Jacob Sparre Andersen
@ 2015-10-07 13:22       ` Dmitry A. Kazakov
  2015-10-07 14:21       ` Simon Wright
  2015-10-07 17:17       ` Luke A. Guest
  3 siblings, 0 replies; 17+ messages in thread
From: Dmitry A. Kazakov @ 2015-10-07 13:22 UTC (permalink / raw)


On Wed, 7 Oct 2015 04:50:29 -0700 (PDT), halfmaddad@gmail.com wrote:

> You work with landing gear correct?

No, we are doing automation and control.

> Do you run with an OS?

Yes. Windows, VxWorks, Linux/Debian

> I know we can run without one but then we lose
> tasking, nested subprograms and exception handling, no?

Possibly not, but it does not worth the efforts, especially regarding the
BSP.

> So I work with scientific instruments. Sometimes I modify them for people
> but I basically just repair them. I have thought about designing one for a
> long time. It would take a lot less time and I would end up with a better
> product if I could do it in Ada rather then C/C++.

More so. Small firms have no resources to keep a huge stash of boards. The
key advantage of having an OS is that you can switch the board any time
without much trouble and pretty quick. Cheap boards go out of stock in each
2-5 years. You simply would not be able to keep that pace.

> I was wondering about using SPI with a GPIO card but I have not done this
> before. I know there are also USB-GPIO adapters.

If digital I/O is all you need a BB or a RPI has plenty of. Linux drivers
are garbage from the SW POV, but serve the purpose when the frequency is
moderate.

Quality analogue I/O would be problematic. We are using EtherCAT or
MODBUS/TCP terminals. They are relatively inexpensive and for industrial
use have one essential advantage that you can always exchange a terminal if
it burns down.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

* Re: what does your Ada + hardware look like ?
  2015-10-07 11:50     ` halfmaddad
  2015-10-07 12:40       ` Jacob Sparre Andersen
  2015-10-07 13:22       ` Dmitry A. Kazakov
@ 2015-10-07 14:21       ` Simon Wright
  2015-10-07 16:07         ` brbarkstrom
  2015-10-07 17:22         ` Jeffrey R. Carter
  2015-10-07 17:17       ` Luke A. Guest
  3 siblings, 2 replies; 17+ messages in thread
From: Simon Wright @ 2015-10-07 14:21 UTC (permalink / raw)


halfmaddad@gmail.com writes:

> Do you run with an OS ? I know we can run without one but then we lose
> tasking, nested subprograms and exception handling, no?

Not at all.

The pure-GPL AdaCore offering for Cortex-M{3,4,7} comes with a 'full'
version that includes exception handling (but not Ada.Containers); the
'small footprint' version doesn't have exception handling (and obviously
other features, can't recall what).

I have an RTS[1] which currently targets Cortex-M{4,3} (STM32F429I,
Arduino Due), without exception handling but wth some Containers, based
on FreeRTOS. The Arduino port has 13 board-specific files (startup and
interrupts, mainly).

All the above use Ravenscar tasking[2].

> I was wondering about using SPI with a GPIO card but I have not done
> this before. I know there are also USB-GPIO adapters.

You could do a lot worse than the RPi as a controller. I made an I2C
interface[3], particularly for the MCP23017 I/O multiplexer. I never got
round to simulating interrupts (which you'd do via /proc, I think). I
found the Pi didn't offer enough of a challenge, because it runs Debian
(Raspbian) and Ada "just works".

[1] http://sourceforge.net/projects/cortex-gnat-rts/
[2] http://www.ada-auth.org/standards/12rm/html/RM-D-13.html
[3] https://sourceforge.net/projects/raspi-i2c-ada/

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

* Re: what does your Ada + hardware look like ?
  2015-10-07 14:21       ` Simon Wright
@ 2015-10-07 16:07         ` brbarkstrom
  2015-10-07 17:22         ` Jeffrey R. Carter
  1 sibling, 0 replies; 17+ messages in thread
From: brbarkstrom @ 2015-10-07 16:07 UTC (permalink / raw)


About a year ago, I assembled an Intel Atom Dual Core with 28 GB of
SSD.  My son helped me drop in Ubuntu Linux Desktop LTS 14.04.  Then, we
downloaded the GNAT GPL Ada (2014).  Very slow text response, but it looks
like it would work even then.  My son suggested using the Ubuntu Server
edition, which is completely command line driven.  In this case, I don't
think there's likely to be much difference between a desktop computer
and a bare board.  The reviews of the newer Atoms suggest that they will
be a good deal faster.  It would probably be straightforward to attach one
little box to each instrument.  I suspect if you needed to do repairs or
upgrade the software, you would have a pretty straightforward job.

One advantage of this approach (as with ARM or other, similar devices) is that
they can run in a fanless enclosure.  I also suspect that it wouldn't be
difficult to put together a Beowulf cluster using these units, which might
substantially increase the compute power available.  Given a full GNAT
GPL installation, it should even be possible to implement a PolyORB
AWS.  

If you want to do that, I'd recommend making sure you understand
concurrent programming in a distributed system.  Burns and Wellings (2007)
and McCormick, et al (2011) are probably sources to master.  A quite
valuable on-line course is available from
<http://se.inf.ethz.ch/courses/2015a_spring/ccc/>
It uses pseudocode and some java, but it's probably worth translating
that material to Ada and adding some ways of tracking performance.

Bruce B.


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

* Re: what does your Ada + hardware look like ?
  2015-10-07 11:40   ` halfmaddad
  2015-10-07 11:50     ` halfmaddad
@ 2015-10-07 17:17     ` Luke A. Guest
  1 sibling, 0 replies; 17+ messages in thread
From: Luke A. Guest @ 2015-10-07 17:17 UTC (permalink / raw)


<halfmaddad@gmail.com> wrote:
> Hi Luke
> 
> You are exactly the person I was thinking of when I mentioned bare metal.
> 
> Here is a link to a tutorial by Luke:
> 
> http://wiki.osdev.org/Ada_Bare_bones
> 

Fame at last!!!

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

* Re: what does your Ada + hardware look like ?
  2015-10-07 11:50     ` halfmaddad
                         ` (2 preceding siblings ...)
  2015-10-07 14:21       ` Simon Wright
@ 2015-10-07 17:17       ` Luke A. Guest
  3 siblings, 0 replies; 17+ messages in thread
From: Luke A. Guest @ 2015-10-07 17:17 UTC (permalink / raw)


<halfmaddad@gmail.com> wrote:
> Hi Dmitry
> 
> You work with landing gear correct?
> 
> Do you run with an OS ? I know we can run without one but then we lose
> tasking, nested subprograms and exception handling, no?

Not really, could could port that onto bare metal. I'd probably just port
the tasking to bare metal rather than the exception stuff.

Everything you've mentioned could easily be done with a custom runtime,
possibly ravenscar would be enough.

Luke


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

* Re: what does your Ada + hardware look like ?
  2015-10-07 14:21       ` Simon Wright
  2015-10-07 16:07         ` brbarkstrom
@ 2015-10-07 17:22         ` Jeffrey R. Carter
  1 sibling, 0 replies; 17+ messages in thread
From: Jeffrey R. Carter @ 2015-10-07 17:22 UTC (permalink / raw)


On 10/07/2015 07:21 AM, Simon Wright wrote:
> 
> I
> found the Pi didn't offer enough of a challenge, because it runs Debian
> (Raspbian) and Ada "just works".

I don't like the sound of that. People use C because of the challenge compared
to languages such as Ada.

-- 
Jeff Carter
"It's all right, Taggart. Just a man and a horse being hung out there."
Blazing Saddles
34

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

* Re: what does your Ada + hardware look like ?
  2015-10-06 22:18 what does your Ada + hardware look like ? halfmaddad
  2015-10-06 23:40 ` Luke A. Guest
  2015-10-07  7:23 ` Dmitry A. Kazakov
@ 2015-10-07 19:42 ` Tero Koskinen
  2015-10-07 21:19 ` Björn Lundin
  2015-10-10  1:35 ` justin%jsquirek.info
  4 siblings, 0 replies; 17+ messages in thread
From: Tero Koskinen @ 2015-10-07 19:42 UTC (permalink / raw)


Hi,

7.10.2015, 1:18, halfmaddad@gmail.com wrote:
> Hi Everyone
>
> What sorts of hardware are you using with Ada? What sort of CPU, is it on a custom PCBs or off the shelf?

Gallery of my 8-bit AVR hardware can be found at
https://www.flickr.com/photos/terokoskinen/albums/72157625466664467

All of these run AVR-Ada.

In addition, I have a lot of Cortex-M and Cortex-A based boards, but on 
those I have run mostly C so far. See
https://www.flickr.com/photos/terokoskinen/ for more complete list

> Has anyone used IC2 or SPI from a desktop to control circuits that don't have a C firmware?

Desktop PCs rarely have I2C or SPI pins exposed. You better use some 
microcontroller between the I2C/SPI IC and the desktop.

http://arduino.ada-language.com/tag/i2c.html should give you some idea.

For example, I once used Arduino and Ada to read my (father's) laptop's 
I2C EEPROM contents:
http://arduino.ada-language.com/recovering-ibm-thinkpad-t42-bios-password-with-avr-ada-and-arduino.html

Yours,
  Tero

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

* Re: what does your Ada + hardware look like ?
  2015-10-06 22:18 what does your Ada + hardware look like ? halfmaddad
                   ` (2 preceding siblings ...)
  2015-10-07 19:42 ` Tero Koskinen
@ 2015-10-07 21:19 ` Björn Lundin
  2015-10-07 23:38   ` halfmaddad
  2015-10-10  1:35 ` justin%jsquirek.info
  4 siblings, 1 reply; 17+ messages in thread
From: Björn Lundin @ 2015-10-07 21:19 UTC (permalink / raw)


On 2015-10-07 00:18, halfmaddad@gmail.com wrote:
> Hi Everyone
> 
> What sorts of hardware are you using with Ada? What sort of CPU, is it on a custom PCBs or off the shelf?

We are moving towards more and more virtual machines.
Mid size servers running Win/Aix

We are more realtimes than mmost ERP-systems
but most of you would not call our systems realtime.
Database intense administrative systems with up to 500 concurrent users.


-- 
--
Björn


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

* Re: what does your Ada + hardware look like ?
  2015-10-07 21:19 ` Björn Lundin
@ 2015-10-07 23:38   ` halfmaddad
  0 siblings, 0 replies; 17+ messages in thread
From: halfmaddad @ 2015-10-07 23:38 UTC (permalink / raw)


Wow, thanks for all the great replies today !

-Patrick

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

* Re: what does your Ada + hardware look like ?
  2015-10-06 22:18 what does your Ada + hardware look like ? halfmaddad
                   ` (3 preceding siblings ...)
  2015-10-07 21:19 ` Björn Lundin
@ 2015-10-10  1:35 ` justin%jsquirek.info
  2015-10-10  8:41   ` Dmitry A. Kazakov
  4 siblings, 1 reply; 17+ messages in thread
From: justin%jsquirek.info @ 2015-10-10  1:35 UTC (permalink / raw)


It works on x86 Windows, just not very well with x64 Windows


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

* Re: what does your Ada + hardware look like ?
  2015-10-10  1:35 ` justin%jsquirek.info
@ 2015-10-10  8:41   ` Dmitry A. Kazakov
  0 siblings, 0 replies; 17+ messages in thread
From: Dmitry A. Kazakov @ 2015-10-10  8:41 UTC (permalink / raw)


On Fri, 9 Oct 2015 18:35:57 -0700 (PDT),
justin%jsquirek.info@gtempaccount.com wrote:

> It works on x86 Windows, just not very well with x64 Windows

Why? I never had problems with Ada on 64-bit Windows.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


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

end of thread, other threads:[~2015-10-10  8:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-06 22:18 what does your Ada + hardware look like ? halfmaddad
2015-10-06 23:40 ` Luke A. Guest
2015-10-07  7:23 ` Dmitry A. Kazakov
2015-10-07 11:40   ` halfmaddad
2015-10-07 11:50     ` halfmaddad
2015-10-07 12:40       ` Jacob Sparre Andersen
2015-10-07 13:22       ` Dmitry A. Kazakov
2015-10-07 14:21       ` Simon Wright
2015-10-07 16:07         ` brbarkstrom
2015-10-07 17:22         ` Jeffrey R. Carter
2015-10-07 17:17       ` Luke A. Guest
2015-10-07 17:17     ` Luke A. Guest
2015-10-07 19:42 ` Tero Koskinen
2015-10-07 21:19 ` Björn Lundin
2015-10-07 23:38   ` halfmaddad
2015-10-10  1:35 ` justin%jsquirek.info
2015-10-10  8:41   ` Dmitry A. Kazakov

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