Dear all,
I am trying to build the example startup_cortexA15MPcore (provided with DS-5) using GNU toolchain. The example is originally designed for build using ARM standard tools, and the following variables are hence defined :
CC=armcc
AS=armasm
LD=armlink
AR=armar
FE=fromelf
With what GNU tools should I substitute CC, AS, LD, AR, FE so that the example can be built using GNU toolchain. Does the below work:
CC = arm-none-eabi-gcc
AS= arm-none-eabi-as
LD= arm-none-eabi-ld
how about AR and FE?
Please help thank you very much.
If you're lucky, you could use the C Pre-Processor in GNU as a wrapper around your ARM assembly files.
Say... You have foo.as and you want to assemble it using GAS; then wrap the C Pre-Processor aournd GAS for files ending in ".S"
To wrap GAS in the C Pre-Processor, use GCC with the '-x assembler-with-cpp' switch:
arm-none-eabi-gcc <some parameters> -x assembler-with-cpp <other parameters>
Make yourself an .S file like the following:
#define KEYWORD replacement
...
#define KEYWORDn replacement_n
... After all your #define macros, you can include your ARM-assembly file:
.include "foo.as"
... or even ...
#include "foo.as"
Of course, it will not handle all cases, so you may experience the need for modifying the .as files, so they will become "portable"
Also have a look at GAS's macros. They're quite powerful, and may be able to override keywords in your .as file too.
.macro macroname,param1,param2
.ifnb \param1
.else
.endif
.endm