comp.lang.ada
 help / color / mirror / Atom feed
* Building gnat-gpl-2011-avr-windows from scratch in GPS
@ 2012-04-09  3:18 Rego, P.
  2012-04-09  7:23 ` Simon Wright
  0 siblings, 1 reply; 9+ messages in thread
From: Rego, P. @ 2012-04-09  3:18 UTC (permalink / raw)


Hello,

I am trying to build the gnat-gpl-2011-avr-windows toolchain in GPS with a simple project (which I do not expect to run on an AVR chip for now). So I have installed on Windows 7 machine the gnat-gpl-2011-i686-pc-mingw32-bin.exe and the AVR gnat-gpl-2011-avr-windows-bin on c:\GNAT\2011. 

I configured a GPS project file as

project Test is
   package Compiler is
      for Default_Switches ("ada") use ("-gnat05");
   end Compiler;

   package Ide is
      for Gnat use "avr-gnat";
      for Gnatlist use "avr-gnatls";
      for Debugger_Command use "avr-gdb";
   end Ide;

   for Source_Dirs use (".", "src");
   for Main use ("main.adb");
end Test;

When I try to build, it returns me

avr-gnatmake -f -d -PC:\test\test.gpr main.adb
avr-gcc -c -gnat05 -I- -gnatA C:\test\src\main.adb
avr-gnatbind -I- -x C:\test\main.ali
avr-gnatlink C:\test\main.ali -o C:\test\main
c:/gnat/2011/bin/../lib/gcc/avr/4.5.3/../../../../avr/bin/ld.exe: cannot find -lc
collect2: ld returned 1 exit status
avr-gnatlink: error when calling C:\GNAT\2011\bin\avr-gcc.exe
avr-gnatmake: *** link failed.

[2012-04-09 00:13:05] process exited with status 4 (elapsed time: 00.25s)

So I included in GPS project file some options:

   package Linker is
      for Default_Switches ("ada") use ("-O", "-mmcu=avr6", "-nostdlib", "-lgcc", "-Wl,-mavr6,-Tdata=0x00800200");
   end Linker;

and now when I try to build it returns me

avr-gnatmake -f -d -PC:\test\test.gpr main.adb
avr-gcc -c -gnat05 -I- -gnatA C:\test\src\main.adb
avr-gnatbind -I- -x C:\test\main.ali
avr-gnatlink C:\test\main.ali -O -mmcu=avr6 -nostdlib -lgcc -Wl,-mavr6,-Tdata=0x00800200 -o C:\test\main
c:/gnat/2011/bin/../lib/gcc/avr/4.5.3/../../../../avr/bin/ld.exe: avr architecture of input file `b~main.o' is incompatible with avr:6 output
c:/gnat/2011/bin/../lib/gcc/avr/4.5.3/../../../../avr/bin/ld.exe: avr architecture of input file `C:\test\main.o' is incompatible with avr:6 output
collect2: ld returned 1 exit status
avr-gnatlink: error when calling C:\GNAT\2011\bin\avr-gcc.exe
avr-gnatmake: *** link failed.

[2012-04-09 00:15:00] process exited with status 4 (elapsed time: 00.25s)

Thus, what did I miss in setup? I just want to generate a .hex file for a dummy main.adb.

Thanks.



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

end of thread, other threads:[~2012-04-17 21:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-09  3:18 Building gnat-gpl-2011-avr-windows from scratch in GPS Rego, P.
2012-04-09  7:23 ` Simon Wright
2012-04-11 22:06   ` Rego, P.
2012-04-15 16:02     ` Rolf
2012-04-17  1:01       ` Rego, P.
2012-04-17 15:37         ` Simon Wright
2012-04-17 16:58       ` Brian Drummond
2012-04-17 19:29         ` Simon Wright
2012-04-17 21:19           ` Brian Drummond

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