Page 1 of 1
Linking individual functions from elib

Posted:
Mon Nov 11, 2013 3:08 pm
by MartinL
Hi.
I encountered an unwanted effect when using e_irq_enable() from the e_ic.h.
The binary included EVERY one of the interrupt service functions in my code.
Is there some way to include only the used functions, from a pre-built library?
I am using toolchain version 4.7.0.
Thank you for guidance, and I am happy to provide you with additional info, if needed.
Re: Linking individual functions from elib

Posted:
Tue Nov 12, 2013 1:54 am
by ysapir
What version of eSDK are you using? Looks like you are using an old revision (4.xx)? Try updating your installed release. The e_irq_enable() is not supported in esdk 5.xx.
Re: Linking individual functions from elib

Posted:
Tue Nov 12, 2013 1:21 pm
by MartinL
Ok, I don't know if we really ought to update, we're working with an Altera/Bittware
kit (the EMEK?), arriving with a pre-installed ubuntu-pc and all. But can it be that the
newer eSDK packages have the ability of including individual functions from a lib,
whereas the older (4.X) does not?
(Hopefully we'll soon receive our own parallella, and we'll be sure to keep ourselves
updated then...)
Re: Linking individual functions from elib

Posted:
Wed Nov 13, 2013 1:39 am
by ysapir
The new eSDK definitely packs only the linked-to functions. I believe that eSDK 4.xx did as well.
However, you can use some e-gcc (or e-ld) command options to strip out unused symbols and objects from your executable (don't remember the exact option right now, you can run a search online).
Re: Linking individual functions from elib

Posted:
Wed Nov 13, 2013 8:05 am
by mhonman
MartinL, Could you post your compiler and linker command lines?