f



Building / Modifying the RTS for Cortex

Hi All,

I am having some trouble to understand how the RTS for my STM32F429 Discovery board is being built. 

While tinkering with some of the examples in the Ada Drivers Library from Ada Core, I thought it might be a nice idea to add some funtionality to the Ada.Real_Time package.

First idea: add a child package, so I don't have to play with the files in the "original" RTS. Didn't work. The file newer got compiled. 
Second idea: add a single function to Ada.Real_Time. Didn't work either. The file is being compiled, however I can't find the corresponding symbol in the a-reatim.o 

I assume, this is related to my playing with the RTS and I found some sources on the web discussing the usage of different compiler-switches (e.g. '-a' for gnatmake, ...) but neither did they help, nor do I have an idea why not.

Waiting eagerly for your insightful responses,

TIA,

Marc
0
M
12/10/2016 3:40:58 PM
comp.lang.ada 8774 articles. 2 followers. Post Follow

4 Replies
511 Views

Similar Articles

[PageSpeed] 26

"M. Enzmann" <enzmann.m@googlemail.com> writes:

> I am having some trouble to understand how the RTS for my STM32F429
> Discovery board is being built.
>
> While tinkering with some of the examples in the Ada Drivers Library
> from Ada Core, I thought it might be a nice idea to add some
> funtionality to the Ada.Real_Time package.

The way to rebuild the runtime is to go to the embedded-runtimes/
directory at the top level of the repo and say "make".

This will rebuild all the runtimes as required (provided that all your
changes are in the appropriate place under embedded-runtimes/).

I wouldn't bother too much about accidentally changing stuff, that's why
we use git!

The -a flag is only available in gnatmake, which isn't the right tool to
build runtimes (or Cortex code):

   $ gprbuild -a
   warning: switch -a is ignored and no additional source is compiled
0
Simon
12/10/2016 4:17:32 PM
Am Samstag, 10. Dezember 2016 17:17:34 UTC+1 schrieb Simon Wright:
> "M. Enzmann" <enzmann.m@googlemail.com> writes:
> 
> > I am having some trouble to understand how the RTS for my STM32F429
> > Discovery board is being built.
> >
> > While tinkering with some of the examples in the Ada Drivers Library
> > from Ada Core, I thought it might be a nice idea to add some
> > funtionality to the Ada.Real_Time package.
> 
> The way to rebuild the runtime is to go to the embedded-runtimes/
> directory at the top level of the repo and say "make".
> 
> This will rebuild all the runtimes as required (provided that all your
> changes are in the appropriate place under embedded-runtimes/).
> 
> I wouldn't bother too much about accidentally changing stuff, that's why
> we use git!
> 
> The -a flag is only available in gnatmake, which isn't the right tool to
> build runtimes (or Cortex code):
> 
>    $ gprbuild -a
>    warning: switch -a is ignored and no additional source is compiled

Simon, thanks for your help! 

At times programming in Ada is frustrating. The compiler is always right. So it would seem.
0
M
12/11/2016 4:58:49 PM
"M. Enzmann" <enzmann.m@googlemail.com> writes:

> At times programming in Ada is frustrating. The compiler is always
> right. So it would seem.

To be fair, the toolchain can be quite confusing. But in this case, the
README[1] does say what to do!

[1] https://github.com/AdaCore/embedded-runtimes/blob/master/README.md
0
Simon
12/11/2016 5:24:27 PM
On Sunday, December 11, 2016 at 10:24:29 AM UTC-7, Simon Wright wrote:
> "M. Enzmann" writes:
>=20
> > At times programming in Ada is frustrating. The compiler is always
> > right. So it would seem.

There are times when it's wrong; for example the current GNAT doesn't allow=
 the mandated forward referencing in aspects all the time. -- Something I h=
ad to work around in his base-64 encoder/decoder: https://github.com/OneWin=
gedShark/Base_64

>=20
> To be fair, the toolchain can be quite confusing.

It's certainly my least favorite thing about GNAT; it would be nice if ther=
e were a standard set of tools (or at least interfaces) and project definit=
ion. (GPR is almost decent for project definitions, though it falls very sh=
ort by being quite string oriented and rather easy to break WRT its associa=
ted graphical [GPS] tools.)
0
Shark8
12/12/2016 12:01:10 AM
Reply: