Using Keil µVison and Gnu Tools

OP #1174075
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. 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'
.....
-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 step where i allowed to use a standard Startup file was wrong.
So, which startupfile should i use, do have have to use still a linker
file (i also dont know which one i should use).
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.

Regards
Malte
Moderator #1174076
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.

Reply

A question of your own? This thread is over 18 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.