|Object & Target Specific Build Options? [message #484935]
||Wed, 09 September 2009 18:58
Originally posted by: a-seely.ti.com|
I am trying to compile BIOS V6 as from CCSV4 with a bare-metal arm-gcc
toolchain (4.4.1) and binutils (2.19).
BIOS has a few assembly language files that include "C" header files with a
line in the assembly source containing a directive ".CDECLS ... header.h"
This is a feature of the TI assembler that will allow the use of macro
definitions from C header files.
I don't see any equivalent *directive* in GAS. You can use a
include directive but that's not for "C" it's for assembly.
However, you can invoke gcc with the following options:
-P -imacros=headerfile -x assembler-with-cpp
And it has the same effect as the TI .CDECLS directive.
The C header is preprocessed but only macro definitions are set,
there is no other output (not even comments -P) then the assembler is run.
That much is ok. I've tried this from the command line and it works fine.
My problem now is to get the same effect through the XDC build script.
For about six assembly files, there is a *specific* include that is needed.
For example the file Cache_asm.s needs to include
Whereas the file HwiCommon_asm.s needs to incldue
In other words, for each of these five assembly files, I need to run gcc
with a specific '-imacros <filename>'.
I'm imagining there may be a way to set a target specific 'copts' attribute
- and in fact there are examples of how to do this in the RTSC help in the
BUT there are a couple catches.
First catch - is I need to do this only for targets where I've changed the
extension from .s470 (TI 470 assembler) to .sBMArmR4 (gcc bare-metal ARM
Right now I've followed other examples in the BIOS tree and only used the
file basename in the 'objects' list. The local gcc bare-metal ARM R4
matches files with extension .sBMArmR4 and only *those* files are the ones
I need to add the -imacro header.h file name to.
Second catch, the build environment for BIOS includes a common build script
that adds all the objects in object list to the library.
So it will already have been added to the library with Library.addObject()
and *after the fact* I'd need to add a specific header file to the gcc
command line for each of the individual assembly files.
I'm looking for some suggestions on how this might be accomplished; or
an idea on a different way to tackle the issue.
Powered by FUDForum
. Page generated in 0.01814 seconds