comp.lang.ada
 help / color / mirror / Atom feed
* GNAT GPL2016 on Ubuntu 15.04 and Debian 8
@ 2016-10-04  7:15 M. Enzmann
  2016-10-04 11:24 ` Simon Wright
  0 siblings, 1 reply; 4+ messages in thread
From: M. Enzmann @ 2016-10-04  7:15 UTC (permalink / raw)


Hi all!

I am using GNAT GPL2016 to compile the Ada Drivers Library and the Embedded Runtimes from GitHub.

I am a little puzzled about the results I get. I managed to compile and run some of the examples on a STM32F4 Discovery board. So far, so good.

I do get however, a couple of error (?) messages at the end of the compilation process, telling me, that arm-eabi-ar failed due a wrong ELF-class (error message is in German, something like...
'<path>/bin/arm-eabi-ar: /<path>/lib/bfd-plugins/liblto_plugin.so: wrong ELF-Class ELFCLASS64' 

(why would a dynamic library be needed, when libgnarl is supposed to be build as a static library?)

A second run of gprbuild on ravenscar_build.gpr then tells me, that libgnarl.a is up-to date.

In the end the executables I get, when compiling the examples, show two symbols annotated with '?' in nm, the symbols being '__ccmdata_end' and '_ccmdata_start'

I've been following Simon Wrights hint during installation of the compiler: First I installed the cross-compiler, then the native compiler. (The other way round gprbuild didn't find gcc for some reason'.

Any ideas what I am missing? Help would be appreciated.

Thanks in advance,

Marc


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

* Re: GNAT GPL2016 on Ubuntu 15.04 and Debian 8
  2016-10-04  7:15 GNAT GPL2016 on Ubuntu 15.04 and Debian 8 M. Enzmann
@ 2016-10-04 11:24 ` Simon Wright
  2016-10-04 15:27   ` M. Enzmann
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Wright @ 2016-10-04 11:24 UTC (permalink / raw)


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

> I am using GNAT GPL2016 to compile the Ada Drivers Library and the
> Embedded Runtimes from GitHub.
>
> I am a little puzzled about the results I get. I managed to compile
> and run some of the examples on a STM32F4 Discovery board. So far, so
> good.
>
> I do get however, a couple of error (?) messages at the end of the
> compilation process, telling me, that arm-eabi-ar failed due a wrong
> ELF-class (error message is in German, something like...
> '<path>/bin/arm-eabi-ar: /<path>/lib/bfd-plugins/liblto_plugin.so:
> wrong ELF-Class ELFCLASS64'

It looks to me as though I got this problem (Debian jessie): I've
renamed lib/bfd-plugins to lib/bfd-plugins-xxx (so the compiler doesn't
find it).

> In the end the executables I get, when compiling the examples, show
> two symbols annotated with '?' in nm, the symbols being
> '__ccmdata_end' and '_ccmdata_start'

This is the 64 K Core Coupled Memory[1]. I haven't checked the examples;
maybe they put something there? My own code doesn't - arm-eabi-nm says

$ arm-eabi-nm pcf8574a-stm32f4 | grep ccm
10000000 ? __ccmdata_end
0800b314 R __ccmdata_load
10000000 ? __ccmdata_start
00000000 A __ccmdata_words

Since the syntax for the .data section is exactly the same, I'd guess
the ? is because there's nothing in there.

[1] http://sigalrm.blogspot.co.uk/2013/12/using-ccm-memory-on-stm32.html

> I've been following Simon Wrights hint during installation of the
> compiler: First I installed the cross-compiler, then the native
> compiler. (The other way round gprbuild didn't find gcc for some
> reason'.

Not sure what's happening there, and I don't remember ever making that
hint - rather the reverse!


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

* Re: GNAT GPL2016 on Ubuntu 15.04 and Debian 8
  2016-10-04 11:24 ` Simon Wright
@ 2016-10-04 15:27   ` M. Enzmann
  2016-10-04 17:10     ` Simon Wright
  0 siblings, 1 reply; 4+ messages in thread
From: M. Enzmann @ 2016-10-04 15:27 UTC (permalink / raw)


Am Dienstag, 4. Oktober 2016 13:24:21 UTC+2 schrieb Simon Wright:
> 
> It looks to me as though I got this problem (Debian jessie): I've
> renamed lib/bfd-plugins to lib/bfd-plugins-xxx (so the compiler doesn't
> find it).
> 
I did a re-install of the cross-compiler, this time without the native compiler and .... the errors are gone, I can compile the run-time without any problems

> > In the end the executables I get, when compiling the examples, show
> > two symbols annotated with '?' in nm, the symbols being
> > '__ccmdata_end' and '_ccmdata_start'
> 
> This is the 64 K Core Coupled Memory[1]. I haven't checked the examples;
> maybe they put something there? My own code doesn't - arm-eabi-nm says
> 
> $ arm-eabi-nm pcf8574a-stm32f4 | grep ccm
> 10000000 ? __ccmdata_end
> 0800b314 R __ccmdata_load
> 10000000 ? __ccmdata_start
> 00000000 A __ccmdata_words

> Since the syntax for the .data section is exactly the same, I'd guess
> the ? is because there's nothing in there.
> 
> [1] http://sigalrm.blogspot.co.uk/2013/12/using-ccm-memory-on-stm32.html

Ah! Okay! There is a section .ccmdata in common-RAM.ld and common-ROM.ld and start-rom.S does some work there. I'll have to figure out what happens..
This is not really my cup of tea, but hey I usually tell my students, that learning is fun...
 
> > I've been following Simon Wrights hint during installation of the
> > compiler: First I installed the cross-compiler, then the native
> > compiler. (The other way round gprbuild didn't find gcc for some
> > reason'.
> 
> Not sure what's happening there, and I don't remember ever making that
> hint - rather the reverse!

I rather thought you did, and it did work much better than the other way round ;-)  . So, thanks a lot!

Thanks for the input!


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

* Re: GNAT GPL2016 on Ubuntu 15.04 and Debian 8
  2016-10-04 15:27   ` M. Enzmann
@ 2016-10-04 17:10     ` Simon Wright
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Wright @ 2016-10-04 17:10 UTC (permalink / raw)


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

> Ah! Okay! There is a section .ccmdata in common-RAM.ld and
> common-ROM.ld and start-rom.S does some work there. I'll have to
> figure out what happens..

.data is for read/write data that isn't initially blank; the initial
values are placed at __data_load in Flash, and the startup copies data
starting from there to the area __data_start .. __data_end.

.ccmdata is going to be the same, but your code would have to tell the
compiler what linker section to use:

   X : Integer;
   pragma Linker_Section (X, ".ccmdata");

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

end of thread, other threads:[~2016-10-04 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04  7:15 GNAT GPL2016 on Ubuntu 15.04 and Debian 8 M. Enzmann
2016-10-04 11:24 ` Simon Wright
2016-10-04 15:27   ` M. Enzmann
2016-10-04 17:10     ` Simon Wright

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