comp.lang.ada
 help / color / mirror / Atom feed
From: Patrick Noffke <patrick.noffke@gmail.com>
Subject: Emacs Ada mode with RTS
Date: Wed, 17 Jun 2015 11:12:53 -0700 (PDT)
Date: 2015-06-17T11:12:53-07:00	[thread overview]
Message-ID: <888a3bd7-6ce8-4458-8725-8330680f48de@googlegroups.com> (raw)

I'm trying to use Emacs Ada mode with a .gpr project file that works with GPS and uses a Ravenscar runtime.  When I compile with GPS or from my own Makefile, I have no problems, but when I compile a file from Emacs using Ada mode's Compile file command, I get an error:

s-osinte.ads:591:07: size for "Address" too small, minimum allowed is 64

This is when it's compiling the "main" file.

It appears that from Ada mode, the system adainclude directory is getting used.  I wrote the .adp project file by hand, using Simon's suggestion from here:
http://sourceforge.net/p/stm32f4-gnat-rts/discussion/general/thread/0ccef570/

But when I edit the project file with the Ada mode GUI (using Ada mode's Project -> Edit command), it shows /usr/lib/gcc/x86_64-redhat-linux/4.9.2/adainclude listed under Source directories.  /usr/lib/gcc/x86_64-redhat-linux/4.9.2/adalib is also listed under Object directories.  These directories do not exist in my .adp file.

gprbuild (and the resulting call to gcc) appear to be called as I expect from within Ada mode, but something must be set up as an environment variable that I'm not seeing in the compilation output window.

Here are some variables from my .adp file:

toolchain_dir=/home/pnoffke/projects/proj1/output/toolchain/gnat/bin
ada_compiler=${toolchain_dir}/arm-eabi-gnat
gpr_file=/home/pnoffke/projects/proj1/proj1.gpr
config_file=/home/pnoffke/projects/proj1/obj/proj1.cgpr
check_cmd=${toolchain_dir}/gprbuild -u -c -gnatc -p -P${gpr_file} --target=arm-eabi --config=${config_file} ${full_current}
make_cmd=PATH=${toolchain_dir}:$PATH ${toolchain_dir}/gprbuild -p --target=arm-eabi -P${gpr_file} --config=${config_file}
comp_cmd=${toolchain_dir}/gprbuild -u -c -gnatc -p -P${gpr_file} --target=arm-eabi --config=${config_file} ${full_current}

The .cgpr file was created using gprconfig (I found this was how GPS works for an RTS project).

Is there a way to have Ada mode not bring in the system directories?

Thanks,
Patrick

             reply	other threads:[~2015-06-17 18:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 18:12 Patrick Noffke [this message]
2015-06-17 21:30 ` Emacs Ada mode with RTS Simon Wright
2015-06-18 13:48   ` Patrick Noffke
2015-06-18 14:06     ` Simon Wright
2015-06-18 15:09       ` Patrick Noffke
2015-06-18 15:21         ` Patrick Noffke
2015-06-19 13:56       ` Stephen Leake
2015-06-18 15:34 ` Stephen Leake
2015-06-18 18:19   ` Patrick Noffke
2015-06-19 14:01     ` Stephen Leake
2015-06-18 18:39   ` Patrick Noffke
2015-06-18 19:19     ` Simon Wright
2015-06-19 14:12       ` Stephen Leake
2015-06-19 19:19         ` Simon Wright
2015-06-19 14:08     ` Stephen Leake
2015-06-19 14:47       ` Patrick Noffke
2015-06-21  9:48         ` Stephen Leake
replies disabled

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