Skip to content

Commit

Permalink
[STML432] update interrupt def from script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikaël BRIDAY committed Feb 15, 2024
1 parent 9c9fea4 commit aff5b21
Show file tree
Hide file tree
Showing 10 changed files with 559 additions and 600 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rm /*
/*
* ARMv7 build options for gcc - CortexM4
* TODO: we use only soft FPU for now!
*/
Expand Down
16 changes: 4 additions & 12 deletions goil/templates/config/cortex-m/armv7em/setInterruptDefsOil.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.*$')
Expand All @@ -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:
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rm /*
/*
* ARMv7 build options for gcc - CortexM4
* TODO: we use only soft FPU for now!
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rm /*
/*
* ARMv7 build options for gcc - CortexM4
* TODO: we use only soft FPU for now!
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rm /*
/*
* ARMv7 build options for gcc - CortexM4
* TODO: we use only soft FPU for now!
*/
Expand Down
Loading

0 comments on commit aff5b21

Please sign in to comment.