Go Down

Topic: AF_ave util.h takes 9996 byes program memory (Read 417 times) previous topic - next topic

avandalen

When I include header ultil.h in the in folder libraries\AF_Wave the program size is 10590 bytes.
Code: [Select]
#include <util.h> // 9996 bytes
void setup()
{
}

void loop() / 594 bytes of 14336 maximum
{
}

When I replace it with the header contents the program size is 594 bytes.
Code: [Select]


void ROM_putstring(const char *str, uint8_t nl);

#define UINT16_MAX 65535U
#define putstring(x) ROM_putstring(PSTR(x), 0)
#define putstring_nl(x) ROM_putstring(PSTR(x), 1)
#define nop asm volatile ("nop\n\t")

void setup()
{
}

void loop() // 594 bytes of 14336 maximum
{
}

Why?

AdderD

My guess would be that when you include the header file it seems that and links to the corresponding library. It might be linking in the whole library and not just the functions you are using.

Go Up