From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to emulate multiple exports Date: Tue, 21 Apr 2020 08:58:21 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <177496b2-378f-483e-aa67-4b221a531fc6@googlegroups.com> NNTP-Posting-Host: DFxaDADwSkn+6wW9Ah21PA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:4hS/szlF2nfdUNWq3UbSqa/qXiE= Xref: reader01.eternal-september.org comp.lang.ada:58451 Date: 2020-04-21T08:58:21+01:00 List-Id: Jere writes: > On Monday, April 20, 2020 at 5:57:06 AM UTC-4, Simon Wright wrote: >> Jere writes: >> >> > I am working in a space constrained environment (256k flash) >> > and I want to try and reuse the same exported function for >> > all of my unused interrupt handlers. >> >> I don't know if it'll help, but I handle a similar problem in Cortex >> GNAT RTS starting here: >> >> https://github.com/simonjwright/cortex-gnat-rts/blob/master/stm32f4/adainclude/startup.adb#L147 > > That looks closer to what I was trying. Out of curiosity, how > does it handle someone wanting to later on assign a specific > peripheral ISR (like a timer for example)? It looks like > all the remaining ISR slots use the same external > symbol (IRQ_Handler) It doesn't. Of course it could (write to the interrupt vector & set the hardware interrupt priority in NVIC), but you wouldn't then be able to use a protected handler. I don't think you'd want to? the reason for having a specific handler would be for performance, e.g. drone motor electronic speed control.