6. Agenda
• What's new in VxWorks 653 3.x (Doug)
• Binutils internals (Tristan)
• GCC: configuration tips and tricks (OlivierH)
• Qemu: how to implement a new board (Fabien)
• GprBuild: how to add a new toolchain (Joel)
• Complete history of the relationship between AdaCore and
WindRiver (EdF)
7. This is really about
Our Daily activities
What makes us wake up in the morning
8. GNAT Pro for Cross & BB
Debugging
Emulators
Simulators
Boards
Test Suites
Production
GprBuild, tools
Binutils
IDEs
GCC/GNAT
Runtimes
9. GNAT Pro for Cross & BB
Binutils
Compiler
Run-time
Qemu
gprbuild
production
Debugger
GPS
GnatBench
CPUs coprocessors
Boards
ABI
certification
Real-time
OS
(cross only)
10. Making it work together
Sales
Strategy
Marketing
Roadmap
Certification
16. JeromeL* Why is it working on PPC and not on e500v2?
Joel* Good luck ! Crossing fingers
EdF* This reminds me of some good old bug. Those were the
days.
Doug* Similar issue here with ZCX on vx6 for x86, will keep you
posted
JeromeG* Guys, I need to take my Thursday off next week.
*All characters appearing in this presentation are fictional. Any resemblance to real people is purely
coincidental.
18. Need help
• After a complete explanation from OlivierH of the expected mechanism,
I can resume the debug.
• When allocating the exception occurrence, It looks like something weird
happens around a function called "AbortDefer"
Let's check the
(CRM)
20. Transmit to court (e.g. send an email)
Arno should never happen, allocating exception blah
blah blah certification blah blah
OlivierH not an issue blah blah ZCX-specific blah blah
Arno what about BE SJLJ? blah blah
OlivierH indeed blah blah
Arno in case of tasking blah blah
JeromeL Ah! No tasking involved in this case
Arno then not the issue here, case dismissed,
and transferred to the certification court
25. Transmit to court (Fabien, Qemu expert)
• Discussing with Fabien, it turns out that SPE support is OK in Qemu… so
case dismissed (again)
• However, during the discussion, he advises me to check the « MSR »
26. : Machine State Register. Ah!
: SPE instructions are available only when a
specific bit is set on the MSR. Else a sigill signal is raised. Ah! Ah!
Google is my friend
: answers many things, about tents, video
games, guns, etc.
MSR
MSR PowerPC
MSR e500v2 SPE
28. Transmit to court: send a TSR to
WindRiver
• Write a small C reproducer that checks the specified bit in the register.
=> bit not set when in the handler, set otherwise (youhou! Found it, found it! You
can now safely brag about it with your colleagues)
• Transmit case to WindRiver
• Solution discussed with WindRiver
I is OK
now!
Thankz!
30. Bare metal* ?
• About running software without any Operating System
• This gives you full control over what is running
* Same as BareBoard, but it’s cool
34. OK, YOU CONVINCED ME:
I BOUGHT THE BOARD XYZ FROM
VENDOR ABC.
I WANT TO RUN ADA.
HOW DO I DO THAT?
35. Well, you can ask us
Have you checked
with Sales first?
Pat R. Fabien Tristan Pat B. Jerome L.
36. You can also try it by yourself…
First, you need a board:
Silicium PCB:
fiber glass + copper Ceramics
Soldering Plastic Gold, silver, copper…
USB port on your
host
38. You’ll also need:
• You will need docs (such as the ARM ARM).
• And more docs (such as the MCU ref
manual)
• People to help you finding the docs you’re
missing (such as the board schematics)
• Some updated docs
• Internet & a search engine (if you don’t
know one, let me google that for you…)
39. Major steps to move forward
1. Power-up the board
2. Connect to it
3. Create an Ada runtime for the board
4. Create an example
5. Load the example into the board
40. I. Power up the board
Plug the board
• See that it’s powered (at least a LED shouldlight up)
• If not, read the doc on how to plug and power up the board
41. II. Connect to the board
e.g. find a way to communicate with the targeted board
42. II. Connect to the board
Look for a way to connect to it
• Look at the doc that comes with the board
• You can also search the internet
• You may ask Tristan*
• Or Fabien**
• Or Anthony***to create a GPS plugin for you
* May be busy, or playing fussball
** May also be busy, but does not play fussball
*** plays fussball a lot
43. III. Create an Ada runtime
Well, here’s a tough one
• If we already have a similar board supported, the runtime may only need
minor adjustments:
• Memory mapping (e.g. read the doc), interrupts (c.f. doc), clock speed (RTFM)
• If you’re interested, go see: blog.adacore.com/porting-the-ada-runtime-to-a-
new-arm-board
• Else, you can contact sales@adacore.com ;)
44. At this point
• What you have is:
1. A board that is powered on (e.g. red led on)
2. Some tool claiming it may control the board
3. A runtime that you haven’t tried yet (e.g. a schrodinger runtime: it both works
and doesn’t)
I iz and iz
not a
runtime
But pliz don’t
open the box
45. IV. So now is the time…
1. Turn a LED ON
2. Wait a bit
3. Turn the LED OFF
4. Wait a bit
5. Go to 1
… For the famous bare metal hello world:
“The blinking LED”
Scenario is very complex:
46. IV. The LED example
This « simple » example implies many readings
• MCU referencemanual (or datasheet): initialization of the « GPIO », the
General Purpose I/O system.
• Board schematics, to find out on which pin of the GPIO the led is
connected to.
This one?
47. V. Run all this on the board
Once you seem to have everything setup:
• Cross your fingers
• Load the example on board
I iz bored.
Pliz try again
– Either you end up with what looks like a brick
– Or you can celebrate with a blinking LED (HEY! Come on and look at
my LED! How fun!)
48. From there, fancy stuff coming!
You’re now ready to create an infinity of very fancy stuff …
56. Bare Metal: Improvements
• Extended Ravenscar tasking
• Better than state-of-the-art
• More CPUs supported
• In particular Cortex-A
• Multicore (SMP support):
• Leon, Cortex-A, PPC
57. Widening the Ada audience
Leverage on the buzz around ARM bare metal development
58. Widening the Ada audience
A two stages strategy
1. Making GNAT ready-to-usefor those bare metal enthusiasts
2. Making sure everyoneknows about this effort
59. Widening the Ada audience
Make GNAT ready-to-use on many boards
• Runtimes: more boards supported (GPL + github)
• SVD2Ada
• Ada Drivers Library
This is also meant to help you, not just newcomers!
60. Widening the Ada audience
Advertising GNAT for ARM
• Make with Ada blog posts
• How to adapt the runtime blog post
• community.arm.com blog post on Ada for BB
• Make with Ada contest