The magic words are "Bootloader" and "Bootloadable Project".
The first is a short program that scans after reset a communication interface for having a new program version ready and if so, it stores/programs the new application in flash and starts it.
What you additionally need compared to a "normal" project:
A mass-storage device (PC, SD-Card for instance)
A communication Interface (USBUART, UART, I2C or something alike) to connect the mass-storage to the PSoC
Some special precautions to initially program the Bootloader (together with the application) into the PSoC.
Get your kicks here http://www.cypress.com/?rID=51139
For what is the mass storage device used in a bootloader project?
The mass storage device is needed to store the data to be programmed into the PSoC. There are two kind of data you need:
the configuration data that defines the hardware, properties of the hardware and the interconnections. The amount of memory needes is about 5KB.
The application program which will be different since the hardware is different.
Have a look at the size of the hex-files to get a feeling what size for the mass-storage-device is needed.
What if I want to previously store 3 programs in the flash (each for a different sensor) and choose any one on the fly?Can then the need of mass storage device be eliminated?
This sounds more like a simple coding problem.
How do you know what sensor is active/connected/being used ? If
its a user input, or sensor has a "signature", thats easily solved by
simple codeing methods.