There should be an *.h file with the interrupt names and associated number. You have to use the name exactly in your code as it is in the *.h file. Thats how the tools know what routine to look for when an interrupt occurs.
I use stm32 and i have a *.h and a *.s (assembly file) I have to include in the project.
Heres part of the file
/****** STM32F051 specific Interrupt Numbers ************************************/
WWDG_IRQn = 0, /!< Window WatchDog Interrupt /
PVD_IRQn = 1, /!< PVD through EXTI Line detect Interrupt /
RTC_IRQn = 2, /!< RTC through EXTI Line Interrupt /
FLASH_IRQn = 3, /!< FLASH Interrupt /
RCC_IRQn = 4, /!< RCC Interrupt /
EXTI0_1_IRQn = 5, /!< EXTI Line 0 and 1 Interrupts /
EXTI2_3_IRQn = 6, /!< EXTI Line 2 and 3 Interrupts /
EXTI4_15_IRQn = 7, /!< EXTI Line 4 to 15 Interrupts /
TS_IRQn = 8, /!< Touch sense controller Interrupt /
DMA1_Channel1_IRQn = 9, /!< DMA1 Channel 1 Interrupt /
DMA1_Channel2_3_IRQn = 10, /!< DMA1 Channel 2 and Channel 3 Interrupts /
DMA1_Channel4_5_IRQn = 11, /!< DMA1 Channel 4 and Channel 5 Interrupts /
ADC1_COMP_IRQn = 12, /!< ADC1, COMP1 and COMP2 Interrupts /
TIM1_BRK_UP_TRG_COM_IRQn = 13, /!< TIM1 Break, Update, Trigger and Commutation Interrupts /
TIM1_CC_IRQn = 14, /!< TIM1 Capture Compare Interrupt
and the *.s
.CPU M0
.area vectors(rom,rel)
__vectors::
; you must use the .paddr directive so the correct form of the
; function address (i.e. with the low bit ON) is used
.paddr _Default_Handler ; NMI_Handler
.paddr _Default_Handler ; HardFault_Handler
.paddr _Default_Handler ; MemManage_Handler
.paddr _Default_Handler ; BusFault_Handler
.paddr _Default_Handler ; UsageFault_Handler
.long 0 ; ARM RESERVED
.long 0
.long 0
.long 0
.paddr _Default_Handler ; SVC_Handler
.paddr _Default_Handler ; DebugMon_Handler
.long 0 ;
.paddr _Default_Handler ; PendSV_Handler
.paddr _SysTick_Handler ; SysTick_Handler
; IRQ0 to IRQ31
.paddr _Default_Handler ; 0
.paddr _Default_Handler ; 1
.paddr _Default_Handler ; 2
.paddr _Default_Handler ; 3
.paddr _Default_Handler ; 4
.paddr _Default_Handler ; 5
.paddr _Default_Handler ; 6
.paddr _EXTI4_15_IRQHandler ; 7
.paddr _Default_Handler ; 8
.paddr _Default_Handler ; 9
.paddr _Default_Handler ; 10
.paddr _Default_Handler ; 11
.paddr _Default_Handler ; 12
.paddr _Default_Handler ; 13
.paddr _Default_Handler ; 14
in the above file i just put in the names my program will actually use. Any other interrupt will go to
a default handler.
so there are probably just a file or two you may have to bring into your project and modify to include your
interrupt routine.
search around your directories and look through the files. It wil help you know what files are use for what.
it may take a bit but i always snoop around to learn stuff.
I don't use the sam I use STM32 which is a different company so I don't know how they deal with the interrupt stuff.