Skip to main content
raunaque
Associate III
Oct 7, 2004 12:32 AM UTC
Question

Unknown directive: __asm

Posted on October 07, 2004 at 02:32

Unknown directive: __asm

This topic has been closed for replies.

7 replies

raunaque
raunaqueAuthor
Associate III
Oct 6, 2004 2:53 AM UTC
Posted on October 06, 2004 at 04:53

Hi

i am compiling the firmware on the Hiware compiler . While building the code i get error mentioned below

main.c(57): FATAL C4440: Unknown directive: __asm

any helps
parveen
Associate II
Oct 6, 2004 4:08 AM UTC
Posted on October 06, 2004 at 06:08

For Metrowerks to use mixed assembly and C

use ''asm'' directive

e.g.

asm RIM

asm SIM

Hope this helps

Thanks and Regards,

PraveenG

wolfgang2399
Associate III
Oct 6, 2004 5:15 AM UTC
Posted on October 06, 2004 at 07:15

For further information have a look at the ST Application Note

http://www.stmcu.com/files/mcu/5967.pdf

at page 10.

Regards

WoRo
raunaque
raunaqueAuthor
Associate III
Oct 6, 2004 6:42 AM UTC
Posted on October 06, 2004 at 08:42

hi

i have used the asm function in the code . while i am compiling the code i get that error .

FATAL C4440: Unknown directive: __asm

it is like this way

#asm

---- assembly code

#endasm

i get error on the statement #asm

can u help me to resolve the error

bleumers_j
Associate III
Oct 6, 2004 7:53 AM UTC
Posted on October 06, 2004 at 09:53

I'm not used to the Hiware compiler, but i think you should use this syntax:

asm

{

...

assembler code

...

}

The #asm and #endasm commands are used in the Cosmic compiler. Hiware will give an error.

Greets!
parveen
Associate II
Oct 6, 2004 7:58 AM UTC
Posted on October 06, 2004 at 09:58

I just the following instruction with Metrowerks compiler and it works fine

#asm

SIM

#endasm

There shouldn't be any space between '#' and 'asm'.

Hope this helps

Thanks and regards,

Parveen

raunaque
raunaqueAuthor
Associate III
Oct 7, 2004 12:32 AM UTC
Posted on October 07, 2004 at 02:32

thanks Joble i got it done