[En-Nut-Discussion] IH Macro for CM3
bon at elektron.ikp.physik.tu-darmstadt.de
bon at elektron.ikp.physik.tu-darmstadt.de
Tue Nov 26 13:31:17 CET 2013
>>>>> "Harald" == Harald Kipp <harald.kipp at egnite.de> writes:
Harald> Hi Uwe, On 25.11.2013 17:56,
Harald> bon at elektron.ikp.physik.tu-darmstadt.de wrote:
>> Hello,
>>
>> some of my last patches provides a macro in
>> ../../../../include/arch/cm3/irqreg.h to invoke our IRQ handlers in a
>> single line like Create_Handler(WWDG, WWDG, NUT_IRQPRI_DEF); /*
>> Window Watchdog */
Harald> Minor issue: To be able to distinguish separate words, Nut/OS
Harald> function names are typically CamelCase, while variable names use
Harald> underlines. Do you think we should change this to Camel_Case?
Harald> Nut/OS macros are all upper-case with underlines between
Harald> words. Any reason to change this?
Is CreateHandler() a function or CREATE_HANDLER() a macro? Please advise
what I should use.
>> Maybe it is usefull for the other CM3 architectures too. Feedback
>> welcome.
Harald> I'm using at least 2 compilers, which do not support string
Harald> concatenation in macros. I never found any reasonable way to
Harald> emulate ##, if the compiler doesn't offer this feature.
Are these non-GNU based compilers also targeting ARM/Cortex?
Then we should care. Maybe the configurator could expand the functions
then. Or an additional program.
Harald> Any other way to solve this in the same elegant way? If not,
Harald> then let's use this macro. But we should limit its use to solve
Harald> problems.
The problem are the 80+ different Interrupts on Cortex. It's tedious and
errorprone to instantiate the handlers by hand. With the former way, the
interrupt controll function was also different for all handlers and so
resultet in more flash usage. Flash usage is now traded off against more
irq controll function arguments.
Bye
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
More information about the En-Nut-Discussion
mailing list