"Rego, P." <
pvr...@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