usb - How to instruct linker to consider strong IRQ definition present in static library insteadof weak definition -
we have problem in linking strong usb_irq handler.
we have real usb irq definition present in static library.
filling .vector table in application startup file (*.s) handler name , have __weak definition, defined in same startup file.
while linking see linker picks-up weak irq definition present in startup file instead of strong irq definition present in library (*.a).
if remove weak definition startup file, strong definition considered , works well.
the problem see is, library file contains strong definition not referred in means our application, means, not using functions or structures present in file. only, irq handler used , trigger when there hardware event.
we use arm gnu tool chain, tried multiple options nothing helps.
went through internet help, , found few options like, --no_remove , --keep linker options, but, these flags not seems supported.
please suggest if have input in regard.
i think need make sure @ least 1 symbol in same source file strong definition gets referenced program. otherwise, linker have no reason load object file contains irq. example define init function in source file, , call program.
make sure irq function declared __attribute__((used)) well.
Comments
Post a Comment