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.
Avoid double increment of dst in adiv5 write bytes function.
Merge pull request #12 from UweBonnes/master

Make adaption to different STM32 boards easier
Merge pull request #9 from jeffstaley/master

Bug fixes for lpc11xx code
Merge pull request #11 from aibara/master

Another small fix for adiv5, ap_mem_write_bytes double increment analogous to previous fix for ap_mem_read_bytes