Winarm+Keil linking problem

OP #1174522
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.
#1174523
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?
Moderator #1174524
> 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.
#1174525
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:)
Moderator #1174526
> 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.
#1174527
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
Guest #2593778
Hello,
can you write here any tutorial about fix this problem with convert 
project from Winarm to uVision.
Thanks

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.