Malte Jahn wrote:
> Hi,
>
> im quite new to the arm world.
> So i installed:
> - GCC4.2.2 (i installed it with the yagarto toolchain, and i can compile
> and run files with this toolset)
> - µVision 3.6 which came with my Demoboard (steitec LPC2368)
>
> Now, i started a new project, selected my LPC. After this step, Keil
> asked me to use a standard Startup File - i said yes. Maybe thats
> already wrong, dunno.
AFAIK the "standard Startup File" uVision copies into the project uses
RealView-assembler instructions which are not compatible with the GNU
assembler.
> After this, i did some configuration for the IDE
> to use GNU, so Components, Extensions and Folders I selected Gnu,
> "arm-elf-" as Tool prefix and selected the folder where cc is installed.
> But i still have problems i cant resolve, the first thing:
> -assembling LPC2300.s...
> -Assembler messages:
> -Error: Error: can't open LPC2300.o for reading: No such file or
> directory
> LPC2300.s(45): error: bad instruction `standard definitions of Mode bits
> and Interrupt(I&F)flags in PSRs'
Since the startupcode is make for RV-assembler not for GNU assembler.
Take a look into the manuals that come with RV-MDK and search the net
for the GNU-as manual.
> .....
> -compiling main.c...
> -arm-elf-gcc: main.o: No such file or directory
> -arm-elf-gcc: srcmain.c: No such file or directory
>
> Alot of erros saying bad instructions.
Maybe the c-code uses RV extenstions. Or options or include-pathes are
are not set correctly. Difficult to help without additional information.
> Maybe the step where i allowed to use a standard Startup file was wrong.
Looks like this.
> So, which startupfile should i use,
Port the one for RV to GNU or use one that is created for GNU-assembler.
> do have have to use still a linker
> file (i also dont know which one i should use).
uVision offers some options in a dialog to control linking but I have
never tested if these options will be enough to get the
default-linker-script working. So far I have just tested with external
linker-scripts. The Keil evaluation version (at least an older version
if have tried) comes with some linker-scripts for gnu arm-elf-ld which
can be used as templates.
> My aim is to use Keil for the configuration of my Arm. Maybe someone has
> a project done with Keil + Gnu and could share it with me.
Keil.com offers an appnote on how to use Codesourcery G++ (wich is also
a package of prebuild GNU tools, free in the lite version) with uVision.
I have not tried it but there is a zip-file with an example-project.