diff options
author | Jim Paris <jim@jtan.com> | 2015-11-18 04:31:17 +0300 |
---|---|---|
committer | Karl Palsson <karlp@remake.is> | 2015-11-24 12:55:27 +0300 |
commit | 01f08c4638e30fe3f1b2d242938a63914de5e1b5 (patch) | |
tree | b6a7fa7d8c7295e1b6f16d3f669eddb726520d39 /scripts | |
parent | 1ebfc4b26e2cb35715e3ba09b15d1bbbc84a2197 (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-x | scripts/irq2nvic_h | 2 |
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) |