Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Paris <jim@jtan.com>2015-11-18 04:31:17 +0300
committerKarl Palsson <karlp@remake.is>2015-11-24 12:55:27 +0300
commit01f08c4638e30fe3f1b2d242938a63914de5e1b5 (patch)
treeb6a7fa7d8c7295e1b6f16d3f669eddb726520d39 /scripts
parent1ebfc4b26e2cb35715e3ba09b15d1bbbc84a2197 (diff)
Remove WEAK from handler prototypes
These prototypes affect functions defined by application code. Only the implementations in libopencm3 are supposed to be weak; the functions in application code should definitely not be. Otherwise, you'll end up with two weak symbols being linked together, and it's luck as to which one the linker picks.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/irq2nvic_h2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/irq2nvic_h b/scripts/irq2nvic_h
index 95728cd2..e3aeea00 100755
--- a/scripts/irq2nvic_h
+++ b/scripts/irq2nvic_h
@@ -121,7 +121,7 @@ def convert(infile, outfile_nvic, outfile_vectornvic, outfile_cmsis):
data['irqcount'] = max([int(x) for x in data['irqs'].keys()]) + 1
data['irqdefinitions'] = "\n".join('#define NVIC_%s_IRQ %d'%(v.upper(),int(k)) for (k,v) in irq2name)
- data['isrprototypes'] = "\n".join('void WEAK %s_isr(void);'%name.lower() for name in irqnames)
+ data['isrprototypes'] = "\n".join('void %s_isr(void);'%name.lower() for name in irqnames)
data['isrpragmas'] = "\n".join('#pragma weak %s_isr = blocking_handler'%name.lower() for name in irqnames)
data['vectortableinitialization'] = ', \\\n '.join('[NVIC_%s_IRQ] = %s_isr'%(name.upper(), name.lower()) for name in irqnames)
data['cmsisbends'] = "\n".join("#define %s_IRQHandler %s_isr"%(name.upper(), name.lower()) for name in irqnames)