SPI code size in LPC11U24 too big.

01 Nov 2012

I export and modified a project, built under Keil, and only a empty main function like below, the built .bin file is 2K.

int main()
{
}

If I add a SPI in it like below, the built .bin file is 16K

SPI spi_(p11,p12,p13);
int main()
{
}

Is it too big?

If I want to modify the library to reduce to bin size, where could I get the source code?

The official repo only supply .o files.

If there no source of mbed library downloadable, how could I migrate to my own circuit?

Thank you in advance.

Cid

01 Nov 2012

The LPC11u24 has 32KByte of flash. Your 16K bin should fit without problems.

The sourcecode for the libraries is currently not available. When your code gets to big you either need to develop some tailored libs or you can transition to the LPC1768 mbed (512KB flash).