This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Subroutines

I have file with many subroutines. How can I use this file in my project? I have problem that in output hex file are all subroutines (used and NOT USED)

example:

main.c

extern void Sub1(void);

void main(void)
{
  // some code
  Sub1();
  // some code
}


subroutines.c
void Sub1(void)
{
  // some code
}

void Sub2(void)
{
  // some code
}
/pre

in output hex file Sub2 is included. How can I remove unused code from output

0