You're right. That's exactly what we need. Eric
> -----Original Message----- > From: Dale [mailto:d...@4drealtime.co.za] > Sent: Thursday, November 01, 2012 9:05 AM > To: Weddington, Eric > Cc: brend...@computer.org; avr-libc-dev@nongnu.org > Subject: Re: [avr-libc-dev] Possible hole in the assembler interrupt > documentation > > Hi, > > Its not just an assembler issue, I've been bitten by this with 'C' code > as well. If the ISR is the only code compiled into an object module, ie. > with no references to code or variables in other object modules, it > won't be linked into the app. > > It would be useful if there was an attribute on all ISR declarations > which indicate to the linker that they are to be kept regardless of > whether they are referenced by other code. > > > Hi Brendan, > > > > Thanks for pointing this out. Admittedly, there are not a lot of people > who write their ISR in assembly. Most are able to write their ISRs in C. > > > > Would you be willing to fill out a bug report on the avr-libc project? > Emails have a tendency to be forgotten about over time and we want to make > sure that we capture this issue in our system so we can get the > documentation fixed. > > > > Thanks, > > Eric Weddington > > > > > -----Original Message----- > > > From: avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org > > > [mailto:avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org] On > > > Behalf Of Brendan Hanna > > > Sent: Thursday, November 01, 2012 6:09 AM > > > To: avr-libc-dev@nongnu.org > > > Subject: [avr-libc-dev] Possible hole in the assembler interrupt > > > documentation > > > > > > Hello, > > > > > > I have just spent some time trying to get my freshly minted interrupt > > > vector to linked into my executable and appear in the vector table at > the > > > start of flash. I feel that there is a small, but non-obvious hole in > the > > > interrupt documentation that could be patched up. > > > > > > I had written my ISR in assembler but for the life of me could not > figure > > > why it had not been linked into the main application. I thought the > 1.6.4 > > > libc documentation was implying that all I needed to do was name the > vector > > > with one of the standard vector names (PCINT0_vect in my case), and > like > > > magic all the pieces would come together. > > > > > > It took me some time to realise that the vector would not be considered > for > > > linking unless its object file contained a dependency required by the > main > > > object file. In real life this would probably be achieved with some ISR > > > initialisation code defined in the assembly source file and called at > start > > > up. My organically growing code did not have this yet - so I had to > falsify > > > it with a global variable accessed by the main application but defined > in > > > assembly. > > > > > > I thought raising this issue here could help improve the documentation > a > > > little. > > > > > > Thanks, > > > > > > bOfWagg > > > > > > _______________________________________________ > > > AVR-libc-dev mailing list > > > AVR-libc-dev@nongnu.org > > > https://lists.nongnu.org/mailman/listinfo/avr-libc-dev > > > > _______________________________________________ > > AVR-libc-dev mailing list > > AVR-libc-dev@nongnu.org > > https://lists.nongnu.org/mailman/listinfo/avr-libc-dev > > _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev