So, given that the project you are using is taking up 100 kB, and your device only supports 32 kB, you think there is a solution without cutting out hundreds of lines of code? Not likely. If your device really only supports 32 kB of space, then you will need to keep cutting out code/components, or increasing optimization (-o3 is usually the max compression iirc). Otherwise, you need a bigger chip :)
the limit does not come from the device. As I said in the first post, without the CapSense Component the project still consumes more than 100 kB and I can build and flash and debug with IAR without any problems.
It seems like the code size limit is imposed by the Cypress library for the CapSense v3.1 block "CapSense_SmartSense_SL_v3_10.o(Capsense_P4Library_IAR.a)".
Anyway the CapSense v3.10 block was from PSoC Creator 4.0 update 1. After updating the PSoC Creator to Version 4.1 I used the CapSense v4.0 block. Somehow the reference to the older CapSense library was not removed automatically from the IAR project but after taking out this reference, everything is fine now.
Ah, sorry for the misunderstanding. I thought you were trying to shove a 100 kB project into a 32 kB device >.<
I think when installing new PSoC creator versions it leaves the older versions to allow for multi-version development. Thus, I would suspect that you didn't uninstall the PSoC 4.0 once you got the PSoC 4.1 installed. Glad you figured out the problem though!