Programming in Ada on a Raspberry Pi is simple enough, Raspbian has a fairly recent version of GNAT, but if you don't use Raspbian, you can always download GNAT directly from AdaCore.
A simple hello test shows that everything works as expected.
Tasking in Ada will require a couple more tests, but it should work since GNAT seems to support the Ravenscar profile...
Accessing the GPIO pins requires a library, and thanks to Philip Munts we have one :)
Read the readme, find the user manual and install the Linux Simple I/O Library.
The library also contains a couple of programs, I just modified one and got a simple blinky. I used the makefile from the library, unmodified, to compile this example. Assume a LED (and a small resistor) on GPIO17 (that's Wiring Pi pin 0, or pin 11 on the board).
Next step is to use tasks to blink a couple of LEDs in 'real time', and to check Philip Munt's MuntsOS Embedded Linux Framework.
sudo apt-get install gnat
A simple hello test shows that everything works as expected.
Tasking in Ada will require a couple more tests, but it should work since GNAT seems to support the Ravenscar profile...
Accessing the GPIO pins requires a library, and thanks to Philip Munts we have one :)
Read the readme, find the user manual and install the Linux Simple I/O Library.
The library also contains a couple of programs, I just modified one and got a simple blinky. I used the makefile from the library, unmodified, to compile this example. Assume a LED (and a small resistor) on GPIO17 (that's Wiring Pi pin 0, or pin 11 on the board).
Comments
Post a Comment