cancel
Showing results for 
Search instead for 
Did you mean: 

Unknown directive: __asm

raunaque
Associate II
Posted on October 07, 2004 at 02:32

Unknown directive: __asm

7 REPLIES 7
raunaque
Associate II
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
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 II
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
Associate II
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 II
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
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
Associate II
Posted on October 07, 2004 at 02:32

thanks Joble i got it done