... or what can't I do? Essentially I have a little real-time system which currently runs on an AVR chip (with GCC) which I'm porting to PIC18 and SDCC. So-far so good and SDCC is managing about 8000 lines of C very well.
So before I end up shooting myself in the foot, I thought I'd ask a quickie here - This project has several interrupt sources, and while I could re-code it with just one ticker type interrupt and a big poll loop, it would make life easier if I can use multiple interrupts - however inside an interrupt routine I need to be able to call other functions and do some floating point math. I also need the main interrupt to be reentrant, so the longish bit of code that is doing the FP calculations which takes a handful of millisecs can be interrupted by something else. (e.g. button push, ADC conversion end, etc.) There is only one interrupt routine that'll be doing the floating point, but the 'main' program may also be doing floating point when it gets interrupted by the timer to go off and do FP calcs in the background. I've no issues with atomic access, locking, etc. to shared variables, etc. I'm just concerned that the interrupt code is going to stomp on some intermediate result being calculated elsewhere. There's scant documentation online for this sort of thing (that I've been able to find though!) so I'm wondering what the easiest way to go about this - will it "just work", or will I have to re-compile the math libraries to be re-entrant, or is there some other magic, or is it really just a bad idea! Thanks, Gordon ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user