Hot!MCC bootloader failed to build

Author
rehakmatej
Starting Member
  • Total Posts : 39
  • Reward points : 0
  • Joined: 2012/12/26 04:25:06
  • Location: 0
  • Status: offline
2018/09/14 02:40:15 (permalink)
0

MCC bootloader failed to build

Hello,
I am trying to create bootloader program using MCC 3.65.1, Bootloader library 2.2.31 and XC8 2.0 compiler. First i get build error on this 

#asm
    psect intcode,global,reloc=2,class=CODE,delta=1
    GOTO NEW_INTERRUPT_VECTOR_HIGH

    psect intcodelo,global,reloc=2,class=CODE,delta=1
    GOTO NEW_INTERRUPT_VECTOR_LOW
#endasm

It writes that compiler cannot recognize #asm and #endasm directives.
So I rewrited this code to 
//#asm
    asm(psect intcode,global,reloc=2,class=CODE,delta=1)
    asm(GOTO NEW_INTERRUPT_VECTOR_HIGH)

    asm(psect intcodelo,global,reloc=2,class=CODE,delta=1)
    asm(GOTO NEW_INTERRUPT_VECTOR_LOW)
//#endasm

and it gets error "too many arguments provided to function-like macro invocation".
Do you have any advice how to solve this problem?
Thank you.
#1

2 Replies Related Threads

    JorgeF
    Super Member
    • Total Posts : 3299
    • Reward points : 0
    • Joined: 2011/07/09 11:56:58
    • Location: PT/EU @ Third rock from the Sun
    • Status: offline
    Re: MCC bootloader failed to build 2018/09/14 11:09:45 (permalink)
    5 (1)
    Hi
     
    It might be the standard used by the XC8 compiler that is getting in the way.
    As of V2 the more recent C99 standard is supported by XC8 and MPLAB-X defaults to it.
    Go to the project properties and select the C90 standard, then give it a try with the original MCC ocde.
     

    Best regards
    Jorge
     
    I'm here http://picforum.ric323.com too!
    And it works better....
    #2
    Danno
    Super Member
    • Total Posts : 221
    • Reward points : 0
    • Joined: 2005/09/07 10:12:10
    • Status: offline
    Re: MCC bootloader failed to build 2018/09/18 15:12:04 (permalink)
    4 (2)
    Yes..  #asm/#endasm are no longer supported.
     
    You're on the right track..  do it like this:
        asm("psect intcode,global,reloc=2,class=CODE,delta=1");
        asm("GOTO " str(NEW_INTERRUPT_VECTOR_HIGH));

        asm("psect intcodelo,global,reloc=2,class=CODE,delta=1");
        asm("GOTO " str(NEW_INTERRUPT_VECTOR_LOW));
    #3
    Jump to:
    © 2018 APG vNext Commercial Version 4.5