On Fri, 30 Jan 2015, Georg Icking-Konert wrote:
hello all,
thanks a lot for your feedback! As for your mails see my comments below
You forgot the option to modify SDCC so it accepts the __interrupt keyword
either before or after the function :)
weeeellll I figured that is not really an option - is it???
I did try this earlier in the week, but it leads to a number of
ambiguities in the grammar. The main problem seems to be that a function
can return a function pointer, so if the interrupt keyword can be either
before or after the function name/parameters it's unclear whether the
interrupt should be applied to the returned function pointer or the
function itself. Of course semantically it makes no sense for an interrupt
function to have any return type but void, but it is not easy to resolve
this as the parsing stage.
sorry I probably haven’t made myself clear. The macro INTERRUPT_HANDLER
you mention is used for the implementation and works just fine with
SDCC. I was referring to the macro INTERRUPT (a few lines below) which
is only used for declaration in the ISR header file (see stm8s_it.h).
Maybe in the end I have to do the same as for Raisonance, which simply
skips the declaration: not nice but works
Okay, I see what you are talking about now. I don't think the declaration
of the functions as interrupt handlers without specifying a vector number
in the ISR header file would do anything useful for SDCC. Following the
same path as for Raisonance seems the most compatible with SDCC's existing
grammar and interrupt function expectations.
Erik
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user