Content originally posted in LPCWare by CodeRedSupport on Mon Feb 21 06:53:30 MST 2011
IAP is "In Application Programming" and is a set of functions in ROM for your application to call, to read/write Flash.
ISP is "In System Programming" and is a boot mode that does not execute the code (your code) in Flash, but instead loads a program over one of the supported interfaces (UART, USB, etc depending on your chip) and programs the Flash
The Debugger uses its own mechanisms for programming the flash via the processors debug connection (JTAG/SWD).
When the processor comes out of reset, it always runs from code in ROM. This is the First Boot. The First Boot performas various configuration/setp operations, and then (depending on your pin configuration) either calls the ISP, or the code in Flash (providing the Flash checksum is correct).
If you have a debugger connected, the First Boot runs, and then the debugger takes over.
HTH