comp.lang.ada
 help / color / mirror / Atom feed
* Building / Modifying the RTS for Cortex
@ 2016-12-10 15:40 M. Enzmann
  2016-12-10 16:17 ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: M. Enzmann @ 2016-12-10 15:40 UTC (permalink / raw)


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


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

* Re: Building / Modifying the RTS for Cortex
  2016-12-10 15:40 Building / Modifying the RTS for Cortex M. Enzmann
@ 2016-12-10 16:17 ` Simon Wright
  2016-12-11 16:58   ` M. Enzmann
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2016-12-10 16:17 UTC (permalink / raw)


"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

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

* Re: Building / Modifying the RTS for Cortex
  2016-12-10 16:17 ` Simon Wright
@ 2016-12-11 16:58   ` M. Enzmann
  2016-12-11 17:24     ` Simon Wright
  0 siblings, 1 reply; 5+ messages in thread
From: M. Enzmann @ 2016-12-11 16:58 UTC (permalink / raw)


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.

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

* Re: Building / Modifying the RTS for Cortex
  2016-12-11 16:58   ` M. Enzmann
@ 2016-12-11 17:24     ` Simon Wright
  2016-12-12  0:01       ` Shark8
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Wright @ 2016-12-11 17:24 UTC (permalink / raw)


"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

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

* Re: Building / Modifying the RTS for Cortex
  2016-12-11 17:24     ` Simon Wright
@ 2016-12-12  0:01       ` Shark8
  0 siblings, 0 replies; 5+ messages in thread
From: Shark8 @ 2016-12-12  0:01 UTC (permalink / raw)


On Sunday, December 11, 2016 at 10:24:29 AM UTC-7, Simon Wright wrote:
> "M. Enzmann" writes:
> 
> > 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 had to work around in his base-64 encoder/decoder: https://github.com/OneWingedShark/Base_64

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

It's certainly my least favorite thing about GNAT; it would be nice if there were a standard set of tools (or at least interfaces) and project definition. (GPR is almost decent for project definitions, though it falls very short by being quite string oriented and rather easy to break WRT its associated graphical [GPS] tools.)


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

end of thread, other threads:[~2016-12-12  0:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-10 15:40 Building / Modifying the RTS for Cortex M. Enzmann
2016-12-10 16:17 ` Simon Wright
2016-12-11 16:58   ` M. Enzmann
2016-12-11 17:24     ` Simon Wright
2016-12-12  0:01       ` Shark8

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