The datasheet for the SPI master says that it requires 849 bytes of FLASH. However, actually seems to use 1693 bytes!
In fact, all of the components seem to use more FLASH than their datasheets claim. This is a problem because the components in the project are using up about 9k of a total of 16k!
Am I doing something wrong, or is the extra is coming from all the pins?
I just created a (very) small project: 2 pins, 1 SPI Master. Came up to 2882 Bytes flash. Then I deleted the SPI, set the pins to no hardware-connection and it used 280 bytes less. Did not try to initialize the module.
Optimization was turned on to level 5.
Do not forget the bootloader! This will put all the pins, modules,clocks etc to a known state and that costs 2.5K.
When compiling an empty project, you'll see the amount of overhead, there are some basic functions that have to be maintained including programming of flash, which is not performed from the outside, though initialized and controlled.
Guys. Remeber that PSoC3 is not a microcontroller. It needs to be confiured first. We call it the boot code(cy_boot) that configures the device as in your topdesign. And that is the poertion that might have taken the initial 2k Flash and not the pin component.