diff --git a/goil/templates/config/cortex-m/armv7em/mk20dx256/buildOptionsTarget.oil b/goil/templates/config/cortex-m/armv7em/mk20dx256/buildOptionsTarget.oil index 558e5a892..2fe28cd97 100755 --- a/goil/templates/config/cortex-m/armv7em/mk20dx256/buildOptionsTarget.oil +++ b/goil/templates/config/cortex-m/armv7em/mk20dx256/buildOptionsTarget.oil @@ -1,4 +1,4 @@ -rm /* +/* * ARMv7 build options for gcc - CortexM4 * TODO: we use only soft FPU for now! */ diff --git a/goil/templates/config/cortex-m/armv7em/setInterruptDefsOil.py b/goil/templates/config/cortex-m/armv7em/setInterruptDefsOil.py index 6da7611ee..5e559d311 100755 --- a/goil/templates/config/cortex-m/armv7em/setInterruptDefsOil.py +++ b/goil/templates/config/cortex-m/armv7em/setInterruptDefsOil.py @@ -8,9 +8,12 @@ #should be updated, depending on the target. #this main header file should be located in the 'machine/cortex-m/..' part of trampoline filename = '../../../../../machines/cortex-m/armv7em/stm32h743/CMSIS/Device/ST/STM32H7xx/Include/stm32h743xx.h' +# filename = '../../../../../machines/cortex-m/armv7em/stm32l432/CMSIS-ST/Device/ST/STM32L4xx/Include/stm32l432xx.h' target = 'stm32h743' +# target = 'stm32l432' #GPIO ports GPIOA, GPIOB, … Required for EXTI interrupt defs gpios = "ABCDEFGHIJK" +# gpios = "ABCDEFGH" #regexp to find the beginning of the interrupt defs (enum) startExtractRegExp=re.compile('.*STM32 specific Interrupt Numbers.*$') @@ -29,6 +32,7 @@ for line in stFile: if stopExtractRegExp.match(line): lineToProcess = False + break #end parsing if lineToProcess: m = processLineRegExp.match(line) if m: @@ -37,18 +41,6 @@ IRQn = int(m.groups()[1]) IRQdesc = m.groups()[2].strip() interruptList.append((IRQName,IRQn,IRQdesc)) - # print(IRQName + ' => ' + str(IRQn)+ ' : '+ IRQdesc) - # print('INTERRUPT '+IRQName+' {') - # print(' VECT = '+str(IRQn+16)+';') - # print(' SETPRIO = TRUE { NUMBER = '+str(IRQn)+'; };') - # if not IRQName.find('EXTI'): - # print(' ACK = TRUE { ACKTYPE = EXTERNAL; };') - # print(' VECTOR_TYPE = HANDLER {') - # print(' NAME = "'+IRQName+'_Handler";') - # print(' };') - # print('} : "'+IRQdesc+'";') - # print() - else: print('** error **') print(line) diff --git a/goil/templates/config/cortex-m/armv7em/stm32f303/buildOptionsTarget.oil b/goil/templates/config/cortex-m/armv7em/stm32f303/buildOptionsTarget.oil index 558e5a892..2fe28cd97 100755 --- a/goil/templates/config/cortex-m/armv7em/stm32f303/buildOptionsTarget.oil +++ b/goil/templates/config/cortex-m/armv7em/stm32f303/buildOptionsTarget.oil @@ -1,4 +1,4 @@ -rm /* +/* * ARMv7 build options for gcc - CortexM4 * TODO: we use only soft FPU for now! */ diff --git a/goil/templates/config/cortex-m/armv7em/stm32f407/buildOptionsTarget.oil b/goil/templates/config/cortex-m/armv7em/stm32f407/buildOptionsTarget.oil index 558e5a892..2fe28cd97 100755 --- a/goil/templates/config/cortex-m/armv7em/stm32f407/buildOptionsTarget.oil +++ b/goil/templates/config/cortex-m/armv7em/stm32f407/buildOptionsTarget.oil @@ -1,4 +1,4 @@ -rm /* +/* * ARMv7 build options for gcc - CortexM4 * TODO: we use only soft FPU for now! */ diff --git a/goil/templates/config/cortex-m/armv7em/stm32l432/buildOptionsTarget.oil b/goil/templates/config/cortex-m/armv7em/stm32l432/buildOptionsTarget.oil index 558e5a892..2fe28cd97 100644 --- a/goil/templates/config/cortex-m/armv7em/stm32l432/buildOptionsTarget.oil +++ b/goil/templates/config/cortex-m/armv7em/stm32l432/buildOptionsTarget.oil @@ -1,4 +1,4 @@ -rm /* +/* * ARMv7 build options for gcc - CortexM4 * TODO: we use only soft FPU for now! */ diff --git a/goil/templates/config/cortex-m/armv7em/stm32l432/config.oil b/goil/templates/config/cortex-m/armv7em/stm32l432/config.oil old mode 100755 new mode 100644 index 75bb9514f..0bafba9cc --- a/goil/templates/config/cortex-m/armv7em/stm32l432/config.oil +++ b/goil/templates/config/cortex-m/armv7em/stm32l432/config.oil @@ -66,520 +66,7 @@ CPU stm32l432 { IT_TABLE_SIZE = 90; }; - INTERRUPT NMI {SETPRIO = TRUE { NUMBER = -14; };}; - INTERRUPT HardFault {SETPRIO = TRUE { NUMBER = -13; };}; - INTERRUPT MemManage {SETPRIO = TRUE { NUMBER = -12; };}; - INTERRUPT BusFault {SETPRIO = TRUE { NUMBER = -11; };}; - INTERRUPT UsageFault {SETPRIO = TRUE { NUMBER = -10; };}; - INTERRUPT SVCall {SETPRIO = TRUE { NUMBER = -5 ; };}; - INTERRUPT DebugMonitor {SETPRIO = TRUE { NUMBER = -4 ; };}; - INTERRUPT PendSV {SETPRIO = TRUE { NUMBER = -2 ; };}; - INTERRUPT SysTick {SETPRIO = TRUE { NUMBER = -1 ; };}; - - INTERRUPT WWDG_IRQ { - VECT = 16; - SETPRIO = TRUE { NUMBER = 0; }; - VECTOR_TYPE = HANDLER { - NAME = "WWDG_IRQ_Handler"; - }; - } : "Window WatchDog Interrupt"; - - INTERRUPT PVD_IRQ { - VECT = 17; - SETPRIO = TRUE { NUMBER = 1; }; - VECTOR_TYPE = HANDLER { - NAME = "PVD_IRQ_Handler"; - }; - } : "PVD through EXTI Line detection Interrupt"; - - INTERRUPT TAMP_STAMP_IRQ { - VECT = 18; - SETPRIO = TRUE { NUMBER = 2; }; - VECTOR_TYPE = HANDLER { - NAME = "TAMP_STAMP_IRQ_Handler"; - }; - } : "Tamper and TimeStamp interrupts through the EXTI line"; - - INTERRUPT RTC_WKUP_IRQ { - VECT = 19; - SETPRIO = TRUE { NUMBER = 3; }; - VECTOR_TYPE = HANDLER { - NAME = "RTC_WKUP_IRQ_Handler"; - }; - } : "RTC Wakeup interrupt through the EXTI line"; - - INTERRUPT FLASH_IRQ { - VECT = 20; - SETPRIO = TRUE { NUMBER = 4; }; - VECTOR_TYPE = HANDLER { - NAME = "FLASH_IRQ_Handler"; - }; - } : "FLASH global Interrupt "; - - INTERRUPT RCC_IRQ { - VECT = 21; - SETPRIO = TRUE { NUMBER = 5; }; - VECTOR_TYPE = HANDLER { - NAME = "RCC_IRQ_Handler"; - }; - } : "RCC global Interrupt"; - - INTERRUPT EXTI0_IRQ { - VECT = 22; - SETPRIO = TRUE { NUMBER = 6; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI0_IRQ_Handler"; - }; - } : "EXTI Line0 Interrupt"; - - INTERRUPT EXTI1_IRQ { - VECT = 23; - SETPRIO = TRUE { NUMBER = 7; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI1_IRQ_Handler"; - }; - } : "EXTI Line1 Interrupt"; - - INTERRUPT EXTI2_IRQ { - VECT = 24; - SETPRIO = TRUE { NUMBER = 8; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI2_IRQ_Handler"; - }; - } : "EXTI Line2 and touch sensing Interrupt"; - - INTERRUPT EXTI3_IRQ { - VECT = 25; - SETPRIO = TRUE { NUMBER = 9; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI3_IRQ_Handler"; - }; - } : "EXTI Line3 Interrupt"; - - INTERRUPT EXTI4_IRQ { - VECT = 26; - SETPRIO = TRUE { NUMBER = 10; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI4_IRQ_Handler"; - }; - } : "EXTI Line4 Interrupt"; - - INTERRUPT DMA1_Channel1_IRQ { - VECT = 27; - SETPRIO = TRUE { NUMBER = 11; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel1_IRQ_Handler"; - }; - } : "DMA1 Channel 1 global Interrupt"; - - INTERRUPT DMA1_Channel2_IRQ { - VECT = 28; - SETPRIO = TRUE { NUMBER = 12; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel2_IRQ_Handler"; - }; - } : "DMA1 Channel 2 global Interrupt"; - - INTERRUPT DMA1_Channel3_IRQ { - VECT = 29; - SETPRIO = TRUE { NUMBER = 13; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel3_IRQ_Handler"; - }; - } : "DMA1 Channel 3 global Interrupt"; - - INTERRUPT DMA1_Channel4_IRQ { - VECT = 30; - SETPRIO = TRUE { NUMBER = 14; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel4_IRQ_Handler"; - }; - } : "DMA1 Channel 4 global Interrupt"; - - INTERRUPT DMA1_Channel5_IRQ { - VECT = 31; - SETPRIO = TRUE { NUMBER = 15; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel5_IRQ_Handler"; - }; - } : "DMA1 Channel 5 global Interrupt"; - - INTERRUPT DMA1_Channel6_IRQ { - VECT = 32; - SETPRIO = TRUE { NUMBER = 16; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel6_IRQ_Handler"; - }; - } : "DMA1 Channel 6 global Interrupt"; - - INTERRUPT DMA1_Channel7_IRQ { - VECT = 33; - SETPRIO = TRUE { NUMBER = 17; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA1_Channel7_IRQ_Handler"; - }; - } : "DMA1 Channel 7 global Interrupt"; - - INTERRUPT ADC1_IRQ { - VECT = 34; - SETPRIO = TRUE { NUMBER = 18; }; - VECTOR_TYPE = HANDLER { - NAME = "ADC1_IRQ_Handler"; - }; - } : "ADC1 global Interrupts"; - - INTERRUPT CAN_TX_IRQ { - VECT = 35; - SETPRIO = TRUE { NUMBER = 19; }; - VECTOR_TYPE = HANDLER { - NAME = "CAN1_TX_Handler"; - }; - } : "CAN1 TX Interrupt"; - - INTERRUPT CAN_RX0_IRQ { - VECT = 36; - SETPRIO = TRUE { NUMBER = 20; }; - VECTOR_TYPE = HANDLER { - NAME = "CAN1_RX0_Handler"; - }; - } : "CAN1 RX0 Interrupt"; - - INTERRUPT CAN_RX1_IRQ { - VECT = 37; - SETPRIO = TRUE { NUMBER = 21; }; - VECTOR_TYPE = HANDLER { - NAME = "CAN_RX1_Handler"; - }; - } : "CAN1 RX1 Interrupt"; - - INTERRUPT CAN_SCE_IRQ { - VECT = 38; - SETPRIO = TRUE { NUMBER = 22; }; - VECTOR_TYPE = HANDLER { - NAME = "CAN1_SCE_Handler"; - }; - } : "CAN1 SCE Interrupt"; - - INTERRUPT EXTI9_5_IRQ { - VECT = 39; - SETPRIO = TRUE { NUMBER = 23; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI9_5_Handler"; - }; - } : "External Line[9:5] Interrupts"; - - INTERRUPT TIM1_BRK_TIM15_IRQ { - VECT = 40; - SETPRIO = TRUE { NUMBER = 24; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM1_BRK_TIM15_Handler"; - }; - } : "TIM1 Break interrupt and TIM15 global interrupt"; - - INTERRUPT TIM1_UP_TIM16_IRQ { - VECT = 41; - SETPRIO = TRUE { NUMBER = 25; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM1_UP_TIM16_Handler"; - }; - } : "TIM1 Update Interrupt and TIM16 global interrupt"; - - INTERRUPT TIM1_TRG_COM_IRQ { - VECT = 42; - SETPRIO = TRUE { NUMBER = 26; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM1_TRG_COM_Handler"; - }; - } : "TIM1 Trigger and Commutation Interrupt"; - - INTERRUPT TIM1_CC_IRQ { - VECT = 43; - SETPRIO = TRUE { NUMBER = 27; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM1_CC_Handler"; - }; - } : "TIM1 Capture Compare Interrupt"; - - INTERRUPT TIM2_IRQ { - VECT = 44; - SETPRIO = TRUE { NUMBER = 28; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM2_Handler"; - }; - } :"TIM2 global Interrupt"; - - // 29 and 30 reserved. - - INTERRUPT I2C1_EV_IRQ { - VECT = 47; - SETPRIO = TRUE { NUMBER = 31; }; - VECTOR_TYPE = HANDLER { - NAME = "I2C1_EV_Handler"; - }; - } : "I2C1 Event Interrupt"; - - INTERRUPT I2C1_ER_IRQ { - VECT = 48; - SETPRIO = TRUE { NUMBER = 32; }; - VECTOR_TYPE = HANDLER { - NAME = "I2C1_ER_Handler"; - }; - } : "I2C1 Error Interrupt"; - - // 33 and 34 reserved. - - INTERRUPT SPI1_IRQ { - VECT = 51; - SETPRIO = TRUE { NUMBER = 35; }; - VECTOR_TYPE = HANDLER { - NAME = "SPI1_Handler"; - }; - } : "SPI1 global Interrupt"; - - // 36 reserved. - - INTERRUPT USART1_IRQ { - VECT = 53; - SETPRIO = TRUE { NUMBER = 37; }; - VECTOR_TYPE = HANDLER { - NAME = "USART1_Handler"; - }; - } : "USART1 global Interrupt"; - - INTERRUPT USART2_IRQ { - VECT = 54; - SETPRIO = TRUE { NUMBER = 38; }; - VECTOR_TYPE = HANDLER { - NAME = "USART2_Handler"; - }; - } : "USART2 global Interrupt"; - - // 39 reserved. - - INTERRUPT EXTI15_10_IRQ { - VECT = 56; - SETPRIO = TRUE { NUMBER = 40; }; - ACK = TRUE { ACKTYPE = EXTERNAL; }; - VECTOR_TYPE = HANDLER { - NAME = "EXTI15_10__Handler"; - }; - } : "External Line[15:10] Interrupts"; - - INTERRUPT RTC_Alarm_IRQ { - VECT = 57; - SETPRIO = TRUE { NUMBER = 41; }; - VECTOR_TYPE = HANDLER { - NAME = "RTC_Alarm_Handler"; - }; - } : "RTC Alarm (A and B) through EXTI Line Interrupt"; - - // 42 through 50 reserved. - - INTERRUPT SPI3_IRQ { - VECT = 67; - SETPRIO = TRUE { NUMBER = 51; }; - VECTOR_TYPE = HANDLER { - NAME = "SPI3_Handler"; - }; - } : "SPI1 global Interrupt"; - - // 52-53 reserved. - - INTERRUPT TIM6_DAC_IRQ { - VECT = 70; - SETPRIO = TRUE { NUMBER = 54; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM6_DAC_Handler"; - }; - } : "TIM6 global and DAC1&2 underrun error interrupts"; - - INTERRUPT TIM7_IRQ { - VECT = 71; - SETPRIO = TRUE { NUMBER = 55; }; - VECTOR_TYPE = HANDLER { - NAME = "TIM7_Handler"; - }; - } : "TIM7 global interrupt"; - - INTERRUPT DMA2_Channel1_IRQ { - VECT = 72; - SETPRIO = TRUE { NUMBER = 56; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel1_IRQ_Handler"; - }; - } : "DMA2 Channel 1 global Interrupt"; - - INTERRUPT DMA2_Channel2_IRQ { - VECT = 73; - SETPRIO = TRUE { NUMBER = 57; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel2_IRQ_Handler"; - }; - } : "DMA2 Channel 2 global Interrupt"; - - INTERRUPT DMA2_Channel3_IRQ { - VECT = 74; - SETPRIO = TRUE { NUMBER = 58; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel3_IRQ_Handler"; - }; - } : "DMA2 Channel 3 global Interrupt"; - - INTERRUPT DMA2_Channel4_IRQ { - VECT = 75; - SETPRIO = TRUE { NUMBER = 59; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel4_IRQ_Handler"; - }; - } : "DMA2 Channel 4 global Interrupt"; - - INTERRUPT DMA2_Channel5_IRQ { - VECT = 76; - SETPRIO = TRUE { NUMBER = 60; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel5_IRQ_Handler"; - }; - } : "DMA2 Channel 5 global Interrupt"; - - // 61 through 63 reserved. - - INTERRUPT COMP_IRQ { - VECT = 80; - SETPRIO = TRUE { NUMBER = 64; }; - VECTOR_TYPE = HANDLER { - NAME = "COMP_Handler"; - }; - } : "COMP1 and COMP2 interrupt"; - - INTERRUPT LPTIM1_IRQ { - VECT = 81; - SETPRIO = TRUE { NUMBER = 65; }; - VECTOR_TYPE = HANDLER { - NAME = "LPTIM1_Handler"; - }; - } : "LP TIM1 interrupt"; - - INTERRUPT LPTIM2_IRQ { - VECT = 82; - SETPRIO = TRUE { NUMBER = 66; }; - VECTOR_TYPE = HANDLER { - NAME = "LPTIM2_Handler"; - }; - } : "LP TIM2 interrupt"; - - INTERRUPT USB_IRQ { - VECT = 83; - SETPRIO = TRUE { NUMBER = 67; }; - VECTOR_TYPE = HANDLER { - NAME = "USB_Handler"; - }; - } : "USB event interrupt"; - - INTERRUPT DMA2_Channel6_IRQ { - VECT = 84; - SETPRIO = TRUE { NUMBER = 68; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel6_IRQ_Handler"; - }; - } : "DMA2 Channel 6 global Interrupt"; - - INTERRUPT DMA2_Channel7_IRQ { - VECT = 85; - SETPRIO = TRUE { NUMBER = 69; }; - VECTOR_TYPE = HANDLER { - NAME = "DMA2_Channel7_IRQ_Handler"; - }; - } : "DMA2 Channel 7 global Interrupt"; - - INTERRUPT LPUART1_IRQ { - VECT = 86; - SETPRIO = TRUE { NUMBER = 70; }; - VECTOR_TYPE = HANDLER { - NAME = "LPUART1_IRQ_Handler"; - }; - } : "LP UART1 interrupt"; - - INTERRUPT QUADSPI_IRQ { - VECT = 87; - SETPRIO = TRUE { NUMBER = 71; }; - VECTOR_TYPE = HANDLER { - NAME = "QUADSPI_IRQ_Handler"; - }; - } : "Quad SPI global interrupt"; - - INTERRUPT I2C3_EV_IRQ { - VECT = 88; - SETPRIO = TRUE { NUMBER = 72; }; - VECTOR_TYPE = HANDLER { - NAME = "I2C3_EV_IRQ_Handler"; - }; - } : "I2C3 event interrupt"; - - INTERRUPT I2C3_ER_IRQ { - VECT = 89; - SETPRIO = TRUE { NUMBER = 73; }; - VECTOR_TYPE = HANDLER { - NAME = "I2C3_ER_IRQ_Handler"; - }; - } : "I2C3 error interrupt"; - - INTERRUPT SAI1_IRQ { - VECT = 90; - SETPRIO = TRUE { NUMBER = 74; }; - VECTOR_TYPE = HANDLER { - NAME = "SAI1_IRQ_Handler"; - }; - } : "Serial Audio Interface 1 global interrupt"; - - // 75 reserved. - - INTERRUPT SWPMI1_IRQ { - VECT = 92; - SETPRIO = TRUE { NUMBER = 76; }; - VECTOR_TYPE = HANDLER { - NAME = "SWPMI1_IRQ_Handler"; - }; - } : "Serial Wire Interface 1 global interrupt"; - - INTERRUPT TSC_IRQ { - VECT = 93; - SETPRIO = TRUE { NUMBER = 77; }; - VECTOR_TYPE = HANDLER { - NAME = "TSC_IRQ_Handler"; - }; - } : "Touch Sense Controller global interrupt"; - - // 78-79 reserved. - - INTERRUPT RNG_IRQ { - VECT = 96; - SETPRIO = TRUE { NUMBER = 80; }; - VECTOR_TYPE = HANDLER { - NAME = "RNG_IRQ_Handler"; - }; - } : "RNG global interrupt"; - - INTERRUPT FPU_IRQ { - VECT = 97; - SETPRIO = TRUE { NUMBER = 81; }; - VECTOR_TYPE = HANDLER { - NAME = "FPU_Handler"; - }; - } : "FPU global interrupt"; - - INTERRUPT CRS_IRQ { - VECT = 98; - SETPRIO = TRUE { NUMBER = 82; }; - VECTOR_TYPE = HANDLER { - NAME = "CRS_Handler"; - }; - } : "CRS global interrupt"; + #include "interruptDefs.oil" PLATFORM_FILES stm32l432 { PATH = "cortex-m/armv7em/stm32l432"; diff --git a/goil/templates/config/cortex-m/armv7em/stm32l432/interruptDefs.oil b/goil/templates/config/cortex-m/armv7em/stm32l432/interruptDefs.oil new file mode 100644 index 000000000..339acb49f --- /dev/null +++ b/goil/templates/config/cortex-m/armv7em/stm32l432/interruptDefs.oil @@ -0,0 +1,492 @@ +/* + * Interrupt definitions for the STM32L432 micro-controller + */ +#include "interruptDefsARM.oil" + +INTERRUPT WWDG_IRQ { + VECT = 16; + SETPRIO = TRUE { NUMBER = 0; }; + VECTOR_TYPE = HANDLER { + NAME = "WWDG_IRQ_Handler"; + }; +} : "Window WatchDog Interrupt"; + +INTERRUPT PVD_PVM_IRQ { + VECT = 17; + SETPRIO = TRUE { NUMBER = 1; }; + VECTOR_TYPE = HANDLER { + NAME = "PVD_PVM_IRQ_Handler"; + }; +} : "PVD/PVM3/PVM4 through EXTI Line detection Interrupts"; + +INTERRUPT TAMP_STAMP_IRQ { + VECT = 18; + SETPRIO = TRUE { NUMBER = 2; }; + VECTOR_TYPE = HANDLER { + NAME = "TAMP_STAMP_IRQ_Handler"; + }; +} : "Tamper and TimeStamp interrupts through the EXTI line"; + +INTERRUPT RTC_WKUP_IRQ { + VECT = 19; + SETPRIO = TRUE { NUMBER = 3; }; + VECTOR_TYPE = HANDLER { + NAME = "RTC_WKUP_IRQ_Handler"; + }; +} : "RTC Wakeup interrupt through the EXTI line"; + +INTERRUPT FLASH_IRQ { + VECT = 20; + SETPRIO = TRUE { NUMBER = 4; }; + VECTOR_TYPE = HANDLER { + NAME = "FLASH_IRQ_Handler"; + }; +} : "FLASH global Interrupt"; + +INTERRUPT RCC_IRQ { + VECT = 21; + SETPRIO = TRUE { NUMBER = 5; }; + VECTOR_TYPE = HANDLER { + NAME = "RCC_IRQ_Handler"; + }; +} : "RCC global Interrupt"; + +INTERRUPT EXTI0_IRQ { + VECT = 22; + SETPRIO = TRUE { NUMBER = 6; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI0_IRQ_Handler"; + }; +} : "EXTI Line0 Interrupt"; + +INTERRUPT EXTI1_IRQ { + VECT = 23; + SETPRIO = TRUE { NUMBER = 7; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI1_IRQ_Handler"; + }; +} : "EXTI Line1 Interrupt"; + +INTERRUPT EXTI2_IRQ { + VECT = 24; + SETPRIO = TRUE { NUMBER = 8; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI2_IRQ_Handler"; + }; +} : "EXTI Line2 Interrupt"; + +INTERRUPT EXTI3_IRQ { + VECT = 25; + SETPRIO = TRUE { NUMBER = 9; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI3_IRQ_Handler"; + }; +} : "EXTI Line3 Interrupt"; + +INTERRUPT EXTI4_IRQ { + VECT = 26; + SETPRIO = TRUE { NUMBER = 10; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI4_IRQ_Handler"; + }; +} : "EXTI Line4 Interrupt"; + +INTERRUPT DMA1_Channel1_IRQ { + VECT = 27; + SETPRIO = TRUE { NUMBER = 11; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel1_IRQ_Handler"; + }; +} : "DMA1 Channel 1 global Interrupt"; + +INTERRUPT DMA1_Channel2_IRQ { + VECT = 28; + SETPRIO = TRUE { NUMBER = 12; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel2_IRQ_Handler"; + }; +} : "DMA1 Channel 2 global Interrupt"; + +INTERRUPT DMA1_Channel3_IRQ { + VECT = 29; + SETPRIO = TRUE { NUMBER = 13; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel3_IRQ_Handler"; + }; +} : "DMA1 Channel 3 global Interrupt"; + +INTERRUPT DMA1_Channel4_IRQ { + VECT = 30; + SETPRIO = TRUE { NUMBER = 14; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel4_IRQ_Handler"; + }; +} : "DMA1 Channel 4 global Interrupt"; + +INTERRUPT DMA1_Channel5_IRQ { + VECT = 31; + SETPRIO = TRUE { NUMBER = 15; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel5_IRQ_Handler"; + }; +} : "DMA1 Channel 5 global Interrupt"; + +INTERRUPT DMA1_Channel6_IRQ { + VECT = 32; + SETPRIO = TRUE { NUMBER = 16; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel6_IRQ_Handler"; + }; +} : "DMA1 Channel 6 global Interrupt"; + +INTERRUPT DMA1_Channel7_IRQ { + VECT = 33; + SETPRIO = TRUE { NUMBER = 17; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA1_Channel7_IRQ_Handler"; + }; +} : "DMA1 Channel 7 global Interrupt"; + +INTERRUPT ADC1_IRQ { + VECT = 34; + SETPRIO = TRUE { NUMBER = 18; }; + VECTOR_TYPE = HANDLER { + NAME = "ADC1_IRQ_Handler"; + }; +} : "ADC1 global Interrupt"; + +INTERRUPT CAN1_TX_IRQ { + VECT = 35; + SETPRIO = TRUE { NUMBER = 19; }; + VECTOR_TYPE = HANDLER { + NAME = "CAN1_TX_IRQ_Handler"; + }; +} : "CAN1 TX Interrupt"; + +INTERRUPT CAN1_RX0_IRQ { + VECT = 36; + SETPRIO = TRUE { NUMBER = 20; }; + VECTOR_TYPE = HANDLER { + NAME = "CAN1_RX0_IRQ_Handler"; + }; +} : "CAN1 RX0 Interrupt"; + +INTERRUPT CAN1_RX1_IRQ { + VECT = 37; + SETPRIO = TRUE { NUMBER = 21; }; + VECTOR_TYPE = HANDLER { + NAME = "CAN1_RX1_IRQ_Handler"; + }; +} : "CAN1 RX1 Interrupt"; + +INTERRUPT CAN1_SCE_IRQ { + VECT = 38; + SETPRIO = TRUE { NUMBER = 22; }; + VECTOR_TYPE = HANDLER { + NAME = "CAN1_SCE_IRQ_Handler"; + }; +} : "CAN1 SCE Interrupt"; + +INTERRUPT EXTI9_5_IRQ { + VECT = 39; + SETPRIO = TRUE { NUMBER = 23; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI9_5_IRQ_Handler"; + }; +} : "External Line[9:5] Interrupts"; + +INTERRUPT TIM1_BRK_TIM15_IRQ { + VECT = 40; + SETPRIO = TRUE { NUMBER = 24; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM1_BRK_TIM15_IRQ_Handler"; + }; +} : "TIM1 Break interrupt and TIM15 global interrupt"; + +INTERRUPT TIM1_UP_TIM16_IRQ { + VECT = 41; + SETPRIO = TRUE { NUMBER = 25; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM1_UP_TIM16_IRQ_Handler"; + }; +} : "TIM1 Update Interrupt and TIM16 global interrupt"; + +INTERRUPT TIM1_TRG_COM_IRQ { + VECT = 42; + SETPRIO = TRUE { NUMBER = 26; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM1_TRG_COM_IRQ_Handler"; + }; +} : "TIM1 Trigger and Commutation Interrupt"; + +INTERRUPT TIM1_CC_IRQ { + VECT = 43; + SETPRIO = TRUE { NUMBER = 27; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM1_CC_IRQ_Handler"; + }; +} : "TIM1 Capture Compare Interrupt"; + +INTERRUPT TIM2_IRQ { + VECT = 44; + SETPRIO = TRUE { NUMBER = 28; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM2_IRQ_Handler"; + }; +} : "TIM2 global Interrupt"; + +INTERRUPT I2C1_EV_IRQ { + VECT = 47; + SETPRIO = TRUE { NUMBER = 31; }; + VECTOR_TYPE = HANDLER { + NAME = "I2C1_EV_IRQ_Handler"; + }; +} : "I2C1 Event Interrupt"; + +INTERRUPT I2C1_ER_IRQ { + VECT = 48; + SETPRIO = TRUE { NUMBER = 32; }; + VECTOR_TYPE = HANDLER { + NAME = "I2C1_ER_IRQ_Handler"; + }; +} : "I2C1 Error Interrupt"; + +INTERRUPT SPI1_IRQ { + VECT = 51; + SETPRIO = TRUE { NUMBER = 35; }; + VECTOR_TYPE = HANDLER { + NAME = "SPI1_IRQ_Handler"; + }; +} : "SPI1 global Interrupt"; + +INTERRUPT USART1_IRQ { + VECT = 53; + SETPRIO = TRUE { NUMBER = 37; }; + VECTOR_TYPE = HANDLER { + NAME = "USART1_IRQ_Handler"; + }; +} : "USART1 global Interrupt"; + +INTERRUPT USART2_IRQ { + VECT = 54; + SETPRIO = TRUE { NUMBER = 38; }; + VECTOR_TYPE = HANDLER { + NAME = "USART2_IRQ_Handler"; + }; +} : "USART2 global Interrupt"; + +INTERRUPT EXTI15_10_IRQ { + VECT = 56; + SETPRIO = TRUE { NUMBER = 40; }; + ACK = TRUE { ACKTYPE = EXTERNAL; }; + VECTOR_TYPE = HANDLER { + NAME = "EXTI15_10_IRQ_Handler"; + }; +} : "External Line[15:10] Interrupts"; + +INTERRUPT RTC_Alarm_IRQ { + VECT = 57; + SETPRIO = TRUE { NUMBER = 41; }; + VECTOR_TYPE = HANDLER { + NAME = "RTC_Alarm_IRQ_Handler"; + }; +} : "RTC Alarm (A and B) through EXTI Line Interrupt"; + +INTERRUPT SPI3_IRQ { + VECT = 67; + SETPRIO = TRUE { NUMBER = 51; }; + VECTOR_TYPE = HANDLER { + NAME = "SPI3_IRQ_Handler"; + }; +} : "SPI3 global Interrupt"; + +INTERRUPT TIM6_DAC_IRQ { + VECT = 70; + SETPRIO = TRUE { NUMBER = 54; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM6_DAC_IRQ_Handler"; + }; +} : "TIM6 global and DAC1&2 underrun error interrupts"; + +INTERRUPT TIM7_IRQ { + VECT = 71; + SETPRIO = TRUE { NUMBER = 55; }; + VECTOR_TYPE = HANDLER { + NAME = "TIM7_IRQ_Handler"; + }; +} : "TIM7 global interrupt"; + +INTERRUPT DMA2_Channel1_IRQ { + VECT = 72; + SETPRIO = TRUE { NUMBER = 56; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel1_IRQ_Handler"; + }; +} : "DMA2 Channel 1 global Interrupt"; + +INTERRUPT DMA2_Channel2_IRQ { + VECT = 73; + SETPRIO = TRUE { NUMBER = 57; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel2_IRQ_Handler"; + }; +} : "DMA2 Channel 2 global Interrupt"; + +INTERRUPT DMA2_Channel3_IRQ { + VECT = 74; + SETPRIO = TRUE { NUMBER = 58; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel3_IRQ_Handler"; + }; +} : "DMA2 Channel 3 global Interrupt"; + +INTERRUPT DMA2_Channel4_IRQ { + VECT = 75; + SETPRIO = TRUE { NUMBER = 59; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel4_IRQ_Handler"; + }; +} : "DMA2 Channel 4 global Interrupt"; + +INTERRUPT DMA2_Channel5_IRQ { + VECT = 76; + SETPRIO = TRUE { NUMBER = 60; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel5_IRQ_Handler"; + }; +} : "DMA2 Channel 5 global Interrupt"; + +INTERRUPT COMP_IRQ { + VECT = 80; + SETPRIO = TRUE { NUMBER = 64; }; + VECTOR_TYPE = HANDLER { + NAME = "COMP_IRQ_Handler"; + }; +} : "COMP1 and COMP2 Interrupts"; + +INTERRUPT LPTIM1_IRQ { + VECT = 81; + SETPRIO = TRUE { NUMBER = 65; }; + VECTOR_TYPE = HANDLER { + NAME = "LPTIM1_IRQ_Handler"; + }; +} : "LP TIM1 interrupt"; + +INTERRUPT LPTIM2_IRQ { + VECT = 82; + SETPRIO = TRUE { NUMBER = 66; }; + VECTOR_TYPE = HANDLER { + NAME = "LPTIM2_IRQ_Handler"; + }; +} : "LP TIM2 interrupt"; + +INTERRUPT USB_IRQ { + VECT = 83; + SETPRIO = TRUE { NUMBER = 67; }; + VECTOR_TYPE = HANDLER { + NAME = "USB_IRQ_Handler"; + }; +} : "USB event Interrupt"; + +INTERRUPT DMA2_Channel6_IRQ { + VECT = 84; + SETPRIO = TRUE { NUMBER = 68; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel6_IRQ_Handler"; + }; +} : "DMA2 Channel 6 global interrupt"; + +INTERRUPT DMA2_Channel7_IRQ { + VECT = 85; + SETPRIO = TRUE { NUMBER = 69; }; + VECTOR_TYPE = HANDLER { + NAME = "DMA2_Channel7_IRQ_Handler"; + }; +} : "DMA2 Channel 7 global interrupt"; + +INTERRUPT LPUART1_IRQ { + VECT = 86; + SETPRIO = TRUE { NUMBER = 70; }; + VECTOR_TYPE = HANDLER { + NAME = "LPUART1_IRQ_Handler"; + }; +} : "LP UART1 interrupt"; + +INTERRUPT QUADSPI_IRQ { + VECT = 87; + SETPRIO = TRUE { NUMBER = 71; }; + VECTOR_TYPE = HANDLER { + NAME = "QUADSPI_IRQ_Handler"; + }; +} : "Quad SPI global interrupt"; + +INTERRUPT I2C3_EV_IRQ { + VECT = 88; + SETPRIO = TRUE { NUMBER = 72; }; + VECTOR_TYPE = HANDLER { + NAME = "I2C3_EV_IRQ_Handler"; + }; +} : "I2C3 event interrupt"; + +INTERRUPT I2C3_ER_IRQ { + VECT = 89; + SETPRIO = TRUE { NUMBER = 73; }; + VECTOR_TYPE = HANDLER { + NAME = "I2C3_ER_IRQ_Handler"; + }; +} : "I2C3 error interrupt"; + +INTERRUPT SAI1_IRQ { + VECT = 90; + SETPRIO = TRUE { NUMBER = 74; }; + VECTOR_TYPE = HANDLER { + NAME = "SAI1_IRQ_Handler"; + }; +} : "Serial Audio Interface 1 global interrupt"; + +INTERRUPT SWPMI1_IRQ { + VECT = 92; + SETPRIO = TRUE { NUMBER = 76; }; + VECTOR_TYPE = HANDLER { + NAME = "SWPMI1_IRQ_Handler"; + }; +} : "Serial Wire Interface 1 global interrupt"; + +INTERRUPT TSC_IRQ { + VECT = 93; + SETPRIO = TRUE { NUMBER = 77; }; + VECTOR_TYPE = HANDLER { + NAME = "TSC_IRQ_Handler"; + }; +} : "Touch Sense Controller global interrupt"; + +INTERRUPT RNG_IRQ { + VECT = 96; + SETPRIO = TRUE { NUMBER = 80; }; + VECTOR_TYPE = HANDLER { + NAME = "RNG_IRQ_Handler"; + }; +} : "RNG global interrupt"; + +INTERRUPT FPU_IRQ { + VECT = 97; + SETPRIO = TRUE { NUMBER = 81; }; + VECTOR_TYPE = HANDLER { + NAME = "FPU_IRQ_Handler"; + }; +} : "FPU global interrupt"; + +INTERRUPT CRS_IRQ { + VECT = 98; + SETPRIO = TRUE { NUMBER = 82; }; + VECTOR_TYPE = HANDLER { + NAME = "CRS_IRQ_Handler"; + }; +} : "CRS global interrupt"; + diff --git a/goil/templates/config/cortex-m/interruptDefsARM.oil b/goil/templates/config/cortex-m/armv7em/stm32l432/interruptDefsARM.oil similarity index 100% rename from goil/templates/config/cortex-m/interruptDefsARM.oil rename to goil/templates/config/cortex-m/armv7em/stm32l432/interruptDefsARM.oil diff --git a/goil/templates/config/cortex-m/armv7em/stm32l432/interruptSources.oil b/goil/templates/config/cortex-m/armv7em/stm32l432/interruptSources.oil old mode 100755 new mode 100644 index 13b3e76f8..2f829c85b --- a/goil/templates/config/cortex-m/armv7em/stm32l432/interruptSources.oil +++ b/goil/templates/config/cortex-m/armv7em/stm32l432/interruptSources.oil @@ -1,5 +1,5 @@ /* - * Interrupt sources for the STM23L432 micro-controller + * Interrupt sources for the STM32L432 micro-controller */ ENUM [ SysTick, @@ -18,8 +18,7 @@ ENUM [ PE0 { #include }, PF0 { #include }, PG0 { #include }, - PH0 { #include }, - PI0 { #include } + PH0 { #include } ] PIN; }, EXTI1_IRQ { @@ -31,8 +30,7 @@ ENUM [ PE1 { #include }, PF1 { #include }, PG1 { #include }, - PH1 { #include }, - PI1 { #include } + PH1 { #include } ] PIN; }, EXTI2_IRQ { @@ -44,8 +42,7 @@ ENUM [ PE2 { #include }, PF2 { #include }, PG2 { #include }, - PH2 { #include }, - PI2 { #include } + PH2 { #include } ] PIN; }, EXTI3_IRQ { @@ -57,8 +54,7 @@ ENUM [ PE3 { #include }, PF3 { #include }, PG3 { #include }, - PH3 { #include }, - PI3 { #include } + PH3 { #include } ] PIN; }, EXTI4_IRQ { @@ -70,8 +66,7 @@ ENUM [ PE4 { #include }, PF4 { #include }, PG4 { #include }, - PH4 { #include }, - PI4 { #include } + PH4 { #include } ] PIN; }, DMA1_Channel1_IRQ, @@ -96,7 +91,6 @@ ENUM [ PF5 { #include }, PG5 { #include }, PH5 { #include }, - PI5 { #include }, NONE ] PINON5 = NONE; ENUM [ @@ -108,7 +102,6 @@ ENUM [ PF6 { #include }, PG6 { #include }, PH6 { #include }, - PI6 { #include }, NONE ] PINON6 = NONE; ENUM [ @@ -120,7 +113,6 @@ ENUM [ PF7 { #include }, PG7 { #include }, PH7 { #include }, - PI7 { #include }, NONE ] PINON7 = NONE; ENUM [ @@ -132,7 +124,6 @@ ENUM [ PF8 { #include }, PG8 { #include }, PH8 { #include }, - PI8 { #include }, NONE ] PINON8 = NONE; ENUM [ @@ -144,7 +135,6 @@ ENUM [ PF9 { #include }, PG9 { #include }, PH9 { #include }, - PI9 { #include }, NONE ] PINON9 = NONE; }, @@ -156,79 +146,77 @@ ENUM [ I2C1_EV_IRQ, I2C1_ER_IRQ, SPI1_IRQ, - USART1_IRQ { + USART1_IRQ { ENUM [ TXE, CTS, TC, RXNE, ORE, IDLE, PE, LBD, NF, FE ] EVFLAG[]; }, - USART2_IRQ { + USART2_IRQ { ENUM [ TXE, CTS, TC, RXNE, ORE, IDLE, PE, LBD, NF, FE ] EVFLAG[]; }, EXTI15_10_IRQ { ENUM [ - PA10 { #include }, - PB10 { #include }, - PC10 { #include }, - PD10 { #include }, - PE10 { #include }, - PF10 { #include }, - PG10 { #include }, - PH10 { #include }, - PI10 { #include }, + PA10 { #include }, + PB10 { #include }, + PC10 { #include }, + PD10 { #include }, + PE10 { #include }, + PF10 { #include }, + PG10 { #include }, + PH10 { #include }, NONE ] PINON10 = NONE; ENUM [ - PA11 { #include }, - PB11 { #include }, - PC11 { #include }, - PD11 { #include }, - PE11 { #include }, - PF11 { #include }, - PG11 { #include }, - PH11 { #include }, - PI11 { #include }, + PA11 { #include }, + PB11 { #include }, + PC11 { #include }, + PD11 { #include }, + PE11 { #include }, + PF11 { #include }, + PG11 { #include }, + PH11 { #include }, NONE ] PINON11 = NONE; ENUM [ - PA12 { #include }, - PB12 { #include }, - PC12 { #include }, - PD12 { #include }, - PE12 { #include }, - PF12 { #include }, - PG12 { #include }, - PH12 { #include }, + PA12 { #include }, + PB12 { #include }, + PC12 { #include }, + PD12 { #include }, + PE12 { #include }, + PF12 { #include }, + PG12 { #include }, + PH12 { #include }, NONE ] PINON12 = NONE; ENUM [ - PA13 { #include }, - PB13 { #include }, - PC13 { #include }, - PD13 { #include }, - PE13 { #include }, - PF13 { #include }, - PG13 { #include }, - PH13 { #include }, + PA13 { #include }, + PB13 { #include }, + PC13 { #include }, + PD13 { #include }, + PE13 { #include }, + PF13 { #include }, + PG13 { #include }, + PH13 { #include }, NONE ] PINON13 = NONE; ENUM [ - PA14 { #include }, - PB14 { #include }, - PC14 { #include }, - PD14 { #include }, - PE14 { #include }, - PF14 { #include }, - PG14 { #include }, - PH14 { #include }, + PA14 { #include }, + PB14 { #include }, + PC14 { #include }, + PD14 { #include }, + PE14 { #include }, + PF14 { #include }, + PG14 { #include }, + PH14 { #include }, NONE ] PINON14 = NONE; ENUM [ - PA15 { #include }, - PB15 { #include }, - PC15 { #include }, - PD15 { #include }, - PE15 { #include }, - PF15 { #include }, - PG15 { #include }, - PH15 { #include }, + PA15 { #include }, + PB15 { #include }, + PC15 { #include }, + PD15 { #include }, + PE15 { #include }, + PF15 { #include }, + PG15 { #include }, + PH15 { #include }, NONE ] PINON15 = NONE; }, @@ -247,7 +235,7 @@ ENUM [ USB_IRQ, DMA2_Channel6_IRQ, DMA2_Channel7_IRQ, - LPUART1_IRQ { + LPUART1_IRQ { ENUM [ TXE, CTS, TC, RXNE, ORE, IDLE, PE, LBD, NF, FE ] EVFLAG[]; }, QUADSPI_IRQ, diff --git a/machines/cortex-m/armv7em/stm32l432/CMSIS-ST/Device/ST/STM32L4xx/Include/stm32l432xx.h b/machines/cortex-m/armv7em/stm32l432/CMSIS-ST/Device/ST/STM32L4xx/Include/stm32l432xx.h index 3251b7c4f..96dacf64b 100644 --- a/machines/cortex-m/armv7em/stm32l432/CMSIS-ST/Device/ST/STM32L4xx/Include/stm32l432xx.h +++ b/machines/cortex-m/armv7em/stm32l432/CMSIS-ST/Device/ST/STM32L4xx/Include/stm32l432xx.h @@ -7,7 +7,7 @@ * This file contains: * - Data structures and the address mapping for all peripherals * - Peripheral's registers declarations and bits definition - * - Macros to access peripheral’s registers hardware + * - Macros to access peripherals registers hardware * ****************************************************************************** * @attention