comp.lang.ada
 help / color / mirror / Atom feed
* Creating a GPR file to use a custom built runtime library
@ 2016-06-13 17:47 Jeremiah
  2016-06-13 19:29 ` Dmitry A. Kazakov
  2016-06-13 19:56 ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: Jeremiah @ 2016-06-13 17:47 UTC (permalink / raw)


I recently took a shot at modding a zero footprint runtime library I found online for a chip that I have.  The runtime appeared to build correctly, so my next step was to setup a null main procedure and see if I could get it to compile.  Using GPRbuild I keep getting error about:

Error: no compiler found for language 'ada', target = arm-eabi, runtime = ../zfp-atsaml21j18

My project GPR file is as follows:
*************************************************************
project Test_ZFP is
   for Languages use ("ada");
   for Source_Dirs use ("src/**");
   for Object_Dir use "obj";
   for Main use ("program.adb");
   for Target use "arm-eabi";

   package Compiler is
      for Default_Switches ("ada") use ("-gnatwa", "-gnatQ", "-gnat12", "-gnatn");
   end Compiler;

   package Builder is
      for Default_Switches ("ada") use ("--RTS=../zfp-atsaml21j18");
   end Builder;

   package Ide is
      for Gnat use "arm-eabi-gnat";
      for Gnatlist use "arm-eabi-gnatls";
   end Ide;

   package Pretty_Printer is
      for Default_Switches ("ada") use ("-cl3");
   end Pretty_Printer;

end Test_ZFP;
*************************************************************

The appropriate tools seem to be available on the path (arm-eabi-gcc, arm-eabi-ld, etc.).

This is the -v output for GPRbuild:
************************************************************
$ gprbuild -v -p test_zfp.gpr
GPRBUILD GPL 2015 (20150428) (i686-pc-mingw32)
Copyright (C) 2004-2015, Free Software Foundation, Inc.
 26 lines: No errors
gprconfig --batch -o D:\Program_Files\MinGW\msys\1.0\home\Jere\test_zfp\obj\auto.cgpr --target=arm-eabi --config=ada,,../zfp-atsaml21j18
Error: no compiler found for language 'ada', target = arm-eabi, runtime = ../zfp-atsaml21j18
Creating configuration file: D:\Program_Files\MinGW\msys\1.0\home\Jere\test_zfp\obj\auto.cgpr
Checking configuration D:\Program_Files\MinGW\msys\1.0\home\Jere\test_zfp\obj\auto.cgpr

==============Error messages for project file: D:\Program_Files\MinGW\msys\1.0\home\Jere\test_zfp\test_zfp.gpr
     1. project Test_ZFP is
                |
        >>> warning: no compiler specified for language "ada", ignoring all its sources

 26 lines: No errors, 1 warning

     5.    for Main use ("program.adb");
                         |
        >>> "program.adb" is not a source of project "test_zfp"

 26 lines: 1 error
gprbuild: problems with main sources
************************************************************

program.adb is in src/

Any thoughts?  I am sure I am making a simple mistake somewhere.


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

* Re: Creating a GPR file to use a custom built runtime library
  2016-06-13 17:47 Creating a GPR file to use a custom built runtime library Jeremiah
@ 2016-06-13 19:29 ` Dmitry A. Kazakov
  2016-06-13 20:30   ` Jeremiah
  2016-06-13 19:56 ` Simon Wright
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2016-06-13 19:29 UTC (permalink / raw)


On 2016-06-13 19:47, Jeremiah wrote:
> I recently took a shot at modding a zero footprint runtime library I
> found online for a chip that I have. The runtime appeared to build
> correctly, so my next step was to setup a null main procedure and see if
> I could get it to compile. Using GPRbuild I keep getting error about:
>
> Error: no compiler found for language 'ada', target = arm-eabi, runtime = ../zfp-atsaml21j18

> Any thoughts?  I am sure I am making a simple mistake somewhere.

I had same problem, resolved by creating a configuration file and 
passing it to gprbuild. I am sure I could put it somewhere so that 
gprbuild could find it, but I didn't want to tamper with the system. You 
also need some environment variables set in order to make cross compiler 
and linker work.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: Creating a GPR file to use a custom built runtime library
  2016-06-13 17:47 Creating a GPR file to use a custom built runtime library Jeremiah
  2016-06-13 19:29 ` Dmitry A. Kazakov
@ 2016-06-13 19:56 ` Simon Wright
  2016-06-13 20:25   ` Jeremiah
  1 sibling, 1 reply; 7+ messages in thread
From: Simon Wright @ 2016-06-13 19:56 UTC (permalink / raw)


Jeremiah <jeremiah.breeden@gmail.com> writes:

>    package Builder is
>       for Default_Switches ("ada") use ("--RTS=../zfp-atsaml21j18");
>    End Builder;

I'm fairly sure that your version of gprbuild needs to see an absolute
directory here. You can get this by saying

   package Builder is
      for Default_Switches ("ada") use
        ("--RTS=" & project'Project_Dir & "../zfp-atsaml21j18");
   end Builder;

or you could say

   for Runtime ("ada") use project'Project_Dir & "../zfp-atsaml21j18";
   

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

* Re: Creating a GPR file to use a custom built runtime library
  2016-06-13 19:56 ` Simon Wright
@ 2016-06-13 20:25   ` Jeremiah
  2016-06-13 22:11     ` Egil H H
  2016-06-14  7:48     ` Simon Wright
  0 siblings, 2 replies; 7+ messages in thread
From: Jeremiah @ 2016-06-13 20:25 UTC (permalink / raw)


On Monday, June 13, 2016 at 3:56:37 PM UTC-4, Simon Wright wrote:
> Jeremiah writes:
> 
> >    package Builder is
> >       for Default_Switches ("ada") use ("--RTS=../zfp-atsaml21j18");
> >    End Builder;
> 
> I'm fairly sure that your version of gprbuild needs to see an absolute
> directory here. You can get this by saying
> 
>    package Builder is
>       for Default_Switches ("ada") use
>         ("--RTS=" & project'Project_Dir & "../zfp-atsaml21j18");
>    end Builder;
> 
> or you could say
> 
>    for Runtime ("ada") use project'Project_Dir & "../zfp-atsaml21j18";

This fixed it for me.  Thank you!.  

Side note: I just realized that it was one of your runtimes that I started with.  In the future, if I have any questions about the runtime in particular, would it be more appropriate to post them to comp.lang.ada or via direct email (or if it is inappropriate either way, let me know...I found it via google)?


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

* Re: Creating a GPR file to use a custom built runtime library
  2016-06-13 19:29 ` Dmitry A. Kazakov
@ 2016-06-13 20:30   ` Jeremiah
  0 siblings, 0 replies; 7+ messages in thread
From: Jeremiah @ 2016-06-13 20:30 UTC (permalink / raw)


On Monday, June 13, 2016 at 3:29:05 PM UTC-4, Dmitry A. Kazakov wrote:
> On 2016-06-13 19:47, Jeremiah wrote:
> > Error: no compiler found for language 'ada', target = arm-eabi, runtime = ../zfp-atsaml21j18
> 
> > Any thoughts?  I am sure I am making a simple mistake somewhere.
> 
> I had same problem, resolved by creating a configuration file and 
> passing it to gprbuild. I am sure I could put it somewhere so that 
> gprbuild could find it, but I didn't want to tamper with the system. You 
> also need some environment variables set in order to make cross compiler 
> and linker work.

Thanks!  I was looking into this when I noticed Simon's post that fixed it up for me.  However, the configuration file is still something I need to look into and learn more about.  Thank you for the suggestion. 


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

* Re: Creating a GPR file to use a custom built runtime library
  2016-06-13 20:25   ` Jeremiah
@ 2016-06-13 22:11     ` Egil H H
  2016-06-14  7:48     ` Simon Wright
  1 sibling, 0 replies; 7+ messages in thread
From: Egil H H @ 2016-06-13 22:11 UTC (permalink / raw)


On Monday, June 13, 2016 at 10:25:55 PM UTC+2, Jeremiah wrote:
> On Monday, June 13, 2016 at 3:56:37 PM UTC-4, Simon Wright wrote:
> > Jeremiah writes:
>> Side note: I just realized that it was one of your runtimes that I started with.  In the future, if I have any questions about the runtime in particular, would it be more appropriate to post them to comp.lang.ada or via direct email 

comp.lang.ada, so the rest of us can benefit from the answer as well...



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

* Re: Creating a GPR file to use a custom built runtime library
  2016-06-13 20:25   ` Jeremiah
  2016-06-13 22:11     ` Egil H H
@ 2016-06-14  7:48     ` Simon Wright
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Wright @ 2016-06-14  7:48 UTC (permalink / raw)


Jeremiah <jeremiah.breeden@gmail.com> writes:

> Side note: I just realized that it was one of your runtimes that I
> started with.  In the future, if I have any questions about the
> runtime in particular, would it be more appropriate to post them to
> comp.lang.ada or via direct email (or if it is inappropriate either
> way, let me know...I found it via google)?

If it's a bug in my RTS, raise a ticket at
https://sourceforge.net/p/cortex-gnat-rts/tickets/

But otherwise, here on c.l.a would be fine.


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

end of thread, other threads:[~2016-06-14  7:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13 17:47 Creating a GPR file to use a custom built runtime library Jeremiah
2016-06-13 19:29 ` Dmitry A. Kazakov
2016-06-13 20:30   ` Jeremiah
2016-06-13 19:56 ` Simon Wright
2016-06-13 20:25   ` Jeremiah
2016-06-13 22:11     ` Egil H H
2016-06-14  7:48     ` Simon Wright

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