From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Converting a simple makefile in a GPS project.
Date: Tue, 24 Apr 2012 08:17:07 -0400
Date: 2012-04-24T08:17:07-04:00 [thread overview]
Message-ID: <82ty09gw8s.fsf@stephe-leake.org> (raw)
In-Reply-To: 20445554.1190.1335148453769.JavaMail.geo-discussion-forums@ynbi5
"Rego, P." <pvrego@gmail.com> writes:
> Now I got to run all the line (and variants)
> avr-gnatmake main -o $@ -Os -mmcu=avr4 --RTS=zfp -largs crtm8._o -nostdlib -lgcc -mavr4 -Tdata=0x00800200
>
> from makefile. Now the next step is to include the lines in .gpr project file
> (1) avr-objdump -h -S main.elf >"main.lss"
> (2) avr-objcopy -O ihex $< $@
I'd have given up on gpr and kept the makefile, since it's simpler (and
better documented); why are you bothering with the gpr file?
> in a way that when I run Build, the Builder generates inside the bin
> folder the main.elf (already ok), the main.lss, and the main.hex
> files. The avr-size, avrdude and clean parts are not necessary; (the
> avrdude I can execute from an outside batch, no problem).
>
> I looked into gprbuilder_ug documentation and there are lots of info,
> I did not find something like it. Maybe would exist a more direct way
> inside .gpr project?
Here's what I use to run 'auto_text_io', which is similar. First,
auto_text_io.xml, in <gnat>/share/gprconfig:
<?xml version="1.0" ?>
<!-- Run auto_text_io
To tell gprbuild how to run auto_text_io:
copy this file to <gnat>/share/gprconfig
use gprbuild - -autoconf
-->
<gprconfig>
<compiler_description>
<name>Auto_Text_IO</name>
<executable>auto_text_io</executable>
<languages>Auto_Text_IO</languages>
<version>
<external>auto_text_io -?</external>
<grep regexp="auto_text_io version .*"/>
</version>
<!-- target must match gprconfig target -->
<target>
<external>${PREFIX}gcc -dumpmachine</external>
<grep regexp="[^\r\n]+"></grep>
</target>
</compiler_description>
<configuration>
<compilers>
<compiler language="Auto_Text_IO"/>
</compilers>
<config>
package Compiler is
for Driver ("Auto_Text_IO") use "${PATH}auto_text_io";
for Include_Path ("Auto_Text_IO") use "ADA_INCLUDE_PATH";
for Required_Switches ("Auto_Text_IO") use ("-f");
for Dependency_Switches ("Auto_Text_IO") use ("-M");
end Compiler;
package Naming is
for Body_Suffix ("Auto_Text_IO") use ".ads";
end Naming;
for Inherit_Source_Path ("Auto_Text_IO") use ("Ada");
for Object_Generated ("Auto_Text_IO") use "false";
</config>
</configuration>
</gprconfig>
Then a gpr file sal_text_io.gpr:
project SAL_Text_IO is
for Languages use ("Auto_Text_IO");
for Source_Dirs use
("../Source_Common");
for Object_Dir use "auto";
for Source_Files use
("sal-gen_math-gen_den_hart.ads",
"sal-gen_math-gen_dof_2.ads",
"sal-gen_math-gen_dof_3.ads",
"sal-gen_math-gen_dof_6.ads",
"sal-gen_math-gen_manipulator.ads",
"sal-gen_math-gen_polynomials.ads",
"sal-gen_math-gen_scalar.ads",
"sal-interfaces_more.ads",
"sal-time_conversions.ads");
end SAL_Text_IO;
and a makefile rule to run it:
text_io :
gprbuild -p -k --autoconf=../auto/auto.cgpr --target=x86-windows -Psal_text_io.gpr
Your application should be similar.
--
-- Stephe
next prev parent reply other threads:[~2012-04-24 12:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-17 1:52 Converting a simple makefile in a GPS project Rego, P.
2012-04-18 12:45 ` Rolf
2012-04-21 19:56 ` Rego, P.
2012-04-18 12:49 ` Stephen Leake
2012-04-21 19:54 ` Rego, P.
2012-04-22 4:09 ` Configuring --RTS=? on GPS Rego, P.
2012-04-22 14:18 ` Converting a simple makefile in a GPS project Stephen Leake
2012-04-22 15:30 ` Simon Wright
2012-04-23 2:09 ` Rego, P.
2012-04-23 2:04 ` Rego, P.
2012-04-21 19:57 ` Rego, P.
2012-04-23 2:34 ` Rego, P.
2012-04-24 12:17 ` Stephen Leake [this message]
2012-04-27 4:07 ` Rego, P.
[not found] ` <30582310.1752.1335499373911.JavaMail.geo-discussion-forums@ynjj16>
2012-04-28 7:05 ` Stephen Leake
2012-04-30 2:41 ` Rego, P.
2012-04-30 2:43 ` Rego, P.
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox