|
From: Erik P. <epe...@iv...> - 2015-01-27 07:19:16
|
On Mon, 26 Jan 2015, Georg Icking-Konert wrote: > hello all, > > as mentioned elsewhere I am trying to port the STM8-SPL library by STM to SDCC. Currently I got stuck at a seemingly simple problem. > Here’s the technical background: > > 1) my target is to modify only the common headers, not the project specific header > > 2) all other supported compilers (Cosmic, IAR, Resonance) declare interrupt routines with the keyword BEFORE the function, e.g. > “__interrupt void ISR(void);" Are you sure? The Raisonance C compiler for ST7/STM8 appears to expect the interrupt or trap keywords to follow the function parameters, like SDCC. See pages 43-44 here: ftp://raisonance.com/pub/Support/RKit-STM8/RCSTM8.pdf You might also want to double check that you have the current version of the STM8-SPL. From the link you provided, I downloaded STSW-STM8069 version 2.2.0. It appears to provide compiler specific implementations of a macro named INTERRUPT_HANDLER that takes two parameters: a function name and a vector number. The macro forms a function declaration with interrupt keyword either at the beginning or end of the declartion, as appropriate for the detected compiler. Erik |