EmbDev.net

Forum: ARM programming with GCC/GNU tools Winarm+Keil linking problem


von Ag W. (ajesicus)


Rate this post
useful
not useful
Hello every one

Right now, I'm using WinARM to compile my project with Keil Uvision IDE.
but i got a problem when it's linking

here it is:
------------------------------------------------------------------------ 
----
Build target 'A3gxProject'
linking...
arm-elf-gcc: .\\buildobj\\a3gx.fx.thread: No such file or directory
creating hex file...
arm-elf-objcopy: '.\buildobj\a3gx.elf': No such file
arm-elf-objcopy: error: the input file '.\buildobj\a3gx.elf' is empty
".\buildobj\a3gx.elf" - 0 Error(s), 0 Warning(s).

------------------------------------------------------------------------ 
----
*it's cleared that a3gx.fx.thread's path is already include into the
project

I've no glue, @ Please Help.

Thank you.

von Jaka V. (krupivnk)


Rate this post
useful
not useful
hello!
I have similiar problem vith  codesourcery toolchain and uVision3.

--------------------------------
Build target 'MCB2130 Flash'
assembling Startup.s...
compiling Syscalls.c...
compiling Serial.c...
compiling Blinky.c...
linking...
d:/programi/codesourcery/sourcery g++
lite/bin/../lib/gcc/arm-none-eabi/4.3.2/../../../../arm-none-eabi/lib\li 
bcs3unhosted.a(unhosted-isatty.o):
warning: IO function '_isatty' used
creating hex file...
arm-none-eabi-objcopy: '.\obj\Blinky.elf': No such file
".\obj\Blinky.elf" - 0 Error(s), 0 Warning(s).

-------------------------------------------

At the end there is no  elf file in the  obj(map) where it should be.

Did you get the answer to this problem?

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
> warning: IO function '_isatty' used
Just a warning. Do you get any more output?

> Did you get the answer to this problem?
Try to insert a dummy _isatty-function (int _isatty(int) {;})and see
what happens.

von Jaka V. (krupivnk)


Rate this post
useful
not useful
Martin Thomas wrote:
>> warning: IO function '_isatty' used
> Just a warning. Do you get any more output?
>
>> Did you get the answer to this problem?
> Try to insert a dummy _isatty-function (int _isatty(int) {;})and see
> what happens.

Now im using winarm becouse it seems to has more support on the
internet. But I have problems with winarm too. I can compile some of
those examples wich were included with winarm but can't with uVision3 +
winarm.

I get this output (in uVision) if i 'rebuild all target files':

------------------------------------------------------------------

Build target 'Target 1'
assembling Startup.S...
Startup.S: Assembler messages:
Startup.S(85): error: junk at end of line, first unrecognized character
is `/'
Startup.S(117): error: bad instruction `area
STACK,DATA,READWRITE,ALIGN=2'
Startup.S(118): error: bad instruction `ds (USR_Stack_Size+3)&~3'
Startup.S(118): error: bad instruction `stack for User/System Mode'
Startup.S(119): error: bad instruction `ds (SVC_Stack_Size+3)&~3'
Startup.S(119): error: bad instruction `stack for Supervisor Mode'
Startup.S(120): error: bad instruction `ds (IRQ_Stack_Size+3)&~3'
Startup.S(120): error: bad instruction `stack for Interrupt Mode'
Startup.S(121): error: bad instruction `ds (FIQ_Stack_Size+3)&~3'
Startup.S(121): error: bad instruction `stack for Fast Interrupt Mode'
Startup.S(122): error: bad instruction `ds (ABT_Stack_Size+3)&~3'
Startup.S(122): error: bad instruction `stack for Abort Mode'
Startup.S(123): error: bad instruction `ds (UND_Stack_Size+3)&~3'
Startup.S(123): error: bad instruction `stack for Undefined Mode'
Startup.S(129): error: bad expression
Startup.S(129): warning: division by zero
Startup.S(129): error: junk at end of line, first unrecognized character
is `S'
Startup.S(130): error: bad expression
Startup.S(130): warning: division by zero
Startup.S(130): error: junk at end of line, first unrecognized character
is `S'
Startup.S(131): error: bad expression
Startup.S(131): warning: division by zero
Startup.S(131): error: junk at end of line, first unrecognized character
is `S'
Startup.S(132): error: bad expression
Startup.S(132): warning: division by zero
Startup.S(132): error: junk at end of line, first unrecognized character
is `S'
Startup.S(133): error: bad expression
Startup.S(133): warning: division by zero
Startup.S(133): error: junk at end of line, first unrecognized character
is `S'
Startup.S(134): error: bad expression
Startup.S(134): warning: division by zero
Startup.S(134): error: junk at end of line, first unrecognized character
is `S'
Startup.S(138): error: junk at end of line, first unrecognized character
is `/'
Startup.S(158): error: junk at end of line, first unrecognized character
is `/'
Startup.S(190): error: junk at end of line, first unrecognized character
is `/'
Startup.S(214): error: junk at end of line, first unrecognized character
is `/'
Startup.S(225): error: bad instruction `area STARTUPCODE,CODE,AT
CODE_BASE//READONLY,ALIGN=4'
Startup.S(226): error: bad instruction `public __startup'
Startup.S(228): error: bad instruction `extern CODE32(?C?INIT)'
Startup.S(230): error: bad instruction `__startup PROC CODE32'
Startup.S(232): error: junk at end of line, first unrecognized character
is `/'
Startup.S(233): error: junk at end of line, first unrecognized character
is `/'
Startup.S(234): error: bad instruction `extern CODE32(Undef_Handler?A)'
Startup.S(235): error: bad instruction `extern CODE32(SWI_Handler?A)'
Startup.S(236): error: bad instruction `extern CODE32(PAbt_Handler?A)'
Startup.S(237): error: bad instruction `extern CODE32(DAbt_Handler?A)'
Startup.S(238): error: bad instruction `extern CODE32(IRQ_Handler?A)'
Startup.S(239): error: bad instruction `extern CODE32(FIQ_Handler?A)'
Startup.S(253): error: junk at end of line, first unrecognized character
is `/'
Startup.S(254): error: junk at end of line, first unrecognized character
is `/'
Startup.S(263): error: junk at end of line, first unrecognized character
is `/'
Startup.S(264): error: junk at end of line, first unrecognized character
is `/'
Startup.S(265): error: junk at end of line, first unrecognized character
is `/'
Startup.S(273): error: junk at end of line, first unrecognized character
is `/'
Startup.S(274): error: junk at end of line, first unrecognized character
is `/'
Startup.S(280): error: junk at end of line, first unrecognized character
is `/'
Startup.S(281): error: junk at end of line, first unrecognized character
is `/'
Startup.S(286): error: junk at end of line, first unrecognized character
is `/'
Startup.S(338): error: junk at end of line, first unrecognized character
is `/'
Startup.S(346): error: junk at end of line, first unrecognized character
is `/'
Startup.S(351): error: junk at end of line, first unrecognized character
RAM_MODE enabled
Startup.S(368): error: junk at end of line, first unrecognized character
is `/'
Startup.S(384): error: junk at end of line, first unrecognized character
is `/'
Startup.S(387): error: junk at end of line, first unrecognized character
is `/'
Startup.S(392): error: junk at end of line, first unrecognized character
is `/'
Startup.S(397): error: junk at end of line, first unrecognized character
is `/'
Startup.S(402): error: junk at end of line, first unrecognized character
is `/'
Startup.S(407): error: junk at end of line, first unrecognized character
is `/'
Startup.S(412): error: junk at end of line, first unrecognized character
is `/'
Startup.S(414): error: junk at end of line, first unrecognized character
is `/'
Startup.S(444): error: junk at end of line, first unrecognized character
is `/'
Startup.S(458): error: junk at end of line, first unrecognized character
is `/'
Startup.S(459): error: junk at end of line, first unrecognized character
is `/'
Startup.S(461): error: garbage following instruction -- `tst
R0,#1//Bit-0 set:main is Thumb'
Startup.S(462): error: garbage following instruction -- `ldreq
LR,=__exit_ARM//ARM Mode'
Startup.S(463): error: garbage following instruction -- `ldrne
LR,=__exit_THUMB//Thumb Mode'
Startup.S(599): error: symbol `__IRQ_Wrapper' is already defined
assembling swi_handler.S...
compiling fiotest.c...
compiling target.c...
compiling interrupt_utils.c...
compiling irq.c...
compiling fio.c...
Target not created

-----------------------------------------------------

startup.s is the one wich comes with winarm :( , but it can't recognize
the comment ( // ). There are other errors too.


Then i click "build target" and get this output:

------------------------------------------------
Build target 'Target 1'
linking...
d:/programi/winarm/winarm/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-e 
lf/bin/ld.exe:
warning: cannot find entry symbol _start; defaulting to 00008000
creating hex file...
arm-glue-objcopy: test_uV.hex
: Invalid argument
"test_uV.elf" - 0 Error(s), 0 Warning(s).
------------------------------------------------
can not build hex file...

but from command line evrything seems to work well.
Thanks for yor time and sorry abaut my english:)

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
> startup.s is the one wich comes with winarm :( , but it can't recognize
> the comment ( // ). There are other errors too.
Yes, at least the versions of uVision I have tested call the assembler
(arm-*-as) directly so the C-Preprocessor is not called before and
//-line-comments (and things like #if/#endif) will not work. I suggested
Keil/ARM to change the call in uVision for assembling but I don't know
if they will or have already changes this. I just know that the
suggestion has been passed to the developers.
If you want to stay with uVision you have to modify the startup-code to
use "pure" GNU arm-assembler directives (i.e. @ for line-comments,
.if/.endif...). It is possible to use a "wrapper-script/batch" that is
called by uVision and uses the compiler-frontend for assembling (similar
to the arm-glue-package) but this is just a workaround.

>...
> but from command line evrything seems to work well.
> Thanks for yor time and sorry abaut my english:)
This is because the assembler is not directly called and
assembler-sources are "filtered" through the C-preprocessor. See the
makefile.

von Jaka V. (krupivnk)


Rate this post
useful
not useful
Martin Thomas wrote:
>> startup.s is the one wich comes with winarm :( , but it can't recognize
>> the comment ( // ). There are other errors too.
> Yes, at least the versions of uVision I have tested call the assembler
> (arm-*-as) directly so the C-Preprocessor is not called before and
> //-line-comments (and things like #if/#endif) will not work. I suggested
> Keil/ARM to change the call in uVision for assembling but I don't know
> if they will or have already changes this. I just know that the
> suggestion has been passed to the developers.
> If you want to stay with uVision you have to modify the startup-code to
> use "pure" GNU arm-assembler directives (i.e. @ for line-comments,
> .if/.endif...). It is possible to use a "wrapper-script/batch" that is
> called by uVision and uses the compiler-frontend for assembling (similar
> to the arm-glue-package) but this is just a workaround.
>
>>...
>> but from command line evrything seems to work well.
>> Thanks for yor time and sorry abaut my english:)
> This is because the assembler is not directly called and
> assembler-sources are "filtered" through the C-preprocessor. See the
> makefile.

Thank you for your reply. Now I'm able to create a elf file in uvision
and it works(in uvision simulator). But i stil have problem with
creating hex file.
uvision output:
-------------------------------------
Build target 'Target 1'
assembling Startup.S...
assembling swi_handler.S...
compiling fiotest.c...
linking...
creating hex file...
arm-glue-objcopy: test_uV.hex
: Invalid argument
"test_uV.elf" - 0 Error(s), 0 Warning(s).

-----------------------------------------------
I have glue package.
Thank you fr your time!regards

von KATHIRESAN (Guest)


Rate this post
useful
not useful
Dear Samo Cverg

how you fix the bug ? how you get  elf file ? can you help me??

von Petr Březík (Guest)


Rate this post
useful
not useful
Hello,
can you write here any tutorial about fix this problem with convert 
project from Winarm to uVision.
Thanks

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.