• AVR Freaks

Hot!error: (2018) after creating interrupts with MCC

Author
picmaster75
New Member
  • Total Posts : 23
  • Reward points : 0
  • Joined: 2018/09/21 03:45:11
  • Location: 0
  • Status: offline
2019/06/13 07:22:42 (permalink)
0

error: (2018) after creating interrupts with MCC

Hi All,
 
Just started with the new PIC18F47K42.
I use 3 interrupts created by MCC. These are the functions which MCC generates :
 
void __interrupt(irq(CCP1),base(8),low_priority) CCP1_CaptureISR()
void __interrupt(irq(CCP2),base(8),low_priority) CCP2_CaptureISR()
void __interrupt(irq(U1RX),base(8)) UART1_rx_vect_isr()
 
When compiling (XC8 v2.05) i get these warnings and error :
mcc_generated_files/uart1.c:201:: warning: (2017) config programming has disabled multi-vectors, "irq" in __interrupt attribute/specifier is ignored
mcc_generated_files/ccp1.c:132:: warning: (2017) config programming has disabled multi-vectors, "irq" in __interrupt attribute/specifier is ignored
mcc_generated_files/ccp2.c:95:: warning: (2017) config programming has disabled multi-vectors, "irq" in __interrupt attribute/specifier is ignored
mcc_generated_files/ccp2.c:95:: error: (2018) interrupt vector table @ 0x8 has multiple functions (CCP2_CaptureISR and CCP1_CaptureISR) defined at interrupt level 1
 
I have no idea how to solve this as i can't find much information about the void __interrupt function, and MCC settings seems ok.
Thanks in advance !
Steve

Attached Image(s)

#1

3 Replies Related Threads

    mbrowning
    USNA79
    • Total Posts : 1552
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: online
    Re: error: (2018) after creating interrupts with MCC 2019/06/13 07:43:59 (permalink)
    5 (3)
    Just like the warning says - your configuration bits do not enable vectored interrupts, but your MCC setup uses them. Fix one or the other.

    Go Navy! Beat Army!
    #2
    picmaster75
    New Member
    • Total Posts : 23
    • Reward points : 0
    • Joined: 2018/09/21 03:45:11
    • Location: 0
    • Status: offline
    Re: error: (2018) after creating interrupts with MCC 2019/06/13 23:42:17 (permalink)
    0
    Thanks,
     
    All settings where correct in MCC GUI, but for some reason "MCC generate", did not change device_config.c, so i changed it manually, and now it works !
     
    Steve
    #3
    PA91
    Junior Member
    • Total Posts : 70
    • Reward points : 0
    • Joined: 2012/09/03 21:45:40
    • Location: 0
    • Status: offline
    Re: error: (2018) after creating interrupts with MCC 2019/11/05 23:52:36 (permalink)
    0
    Hi,
    enabling Vectored interrupt also sets the config bits,
    #pragma config MVECEN = ON    // Multi-vector enable bit->Multi-vector enabled, Vector table used for interrupts
    Tested on "pic10-pic12-pic16-pic18-1.78.0 version library"
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5