As per the lpc11xx manual the stack pointer should be set before IAP
calls are made.  

In lpc11xx_flash_prepare() and lpc11xx_flash_erase() bug in calculating
the ending sector number.
Error in calculating ending sector number.
Merge branch 'master' of git://github.com/jeffstaley/blackmagic