Skip to main content
Visitor II
October 7, 2004
Question

Unknown directive: __asm

  • October 7, 2004
  • 7 replies
  • 1347 views
Posted on October 07, 2004 at 02:32

Unknown directive: __asm

    This topic has been closed for replies.

    7 replies

    raunaqueAuthor
    Visitor II
    October 6, 2004
    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
    Visitor II
    October 6, 2004
    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

    Visitor II
    October 6, 2004
    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
    raunaqueAuthor
    Visitor II
    October 6, 2004
    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

    Visitor II
    October 6, 2004
    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!
    Visitor II
    October 6, 2004
    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

    raunaqueAuthor
    Visitor II
    October 7, 2004
    Posted on October 07, 2004 at 02:32

    thanks Joble i got it done