hello all,

I am currently trying to port the STM8S Standard Peripheral Library to SDCC 
(http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC1807/SS1754/PF258009 
<http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC1807/SS1754/PF258009>). 
If I succeed it would open up the whole range of examples and libs available on 
the STM homepage. In addition, since the STM32 SPL is very similar, it would 
provide an easy transition path from STM8/sdcc to STM32/gcc and back. If/when 
it works I will make the code available as a patch since the SPL license 
prohibits distributing the source code, modified or not :-(

Anyway, right now I got stuck at 2 points for which you can hopefully help me:

1) how do I declare and implement the trap handler? According to 
http://sourceforge.net/p/sdcc/patches/224/ 
<http://sourceforge.net/p/sdcc/patches/224/> the keyword "__trap“ is available 
via patch (2014-02-22). Is this already part of 3.4.0 (#8981; 2014-04-5) and, 
if yes, how do I use it? If not, is it planned for the next release which is 
due when?

2) in the function declaration Cosmic, IAR and Resonance all have the 
respective interrupt token before the function name. Therefore the SPL does it 
as follows:
   stm8s.h:        #define INTERRUPT __interrupt
   stm8s_it.h:    INTERRUPT void AWU_IRQHandler(void);
Unfortunately SDCC expects the keyword „__interrupt“ after the function name, 
e.g. "void TIM4_ISR(void) __interrupt(23);“. Is there any way to modify macro 
INTERRUPT in stm8s.h so that the keyword is attached to a line, even though it 
uses no brackets? If not, it won’t be 100% compatible (i.e. without change) 
with the examples and other STM libs - which is my target…

I’m sure there will be more issues, but that’s it for today. For your kind 
support thanks a lot in advance!

Greetings,
Georg Icking-Konert

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to