Write failure during load
There are several possible reasons for write failure during load. The most common is that your application has been incorrectly linked:
Check the contents of your linker configuration file and make sure that your application has not been linked to the wrong address
Check that you are using the correct linker configuration file.
Caution
In the IDE, the linker configuration file is automatically selected based on your choice of device.
Choose Project>Options.
Select the General Options category.
Click the Target tab.
Choose the appropriate device from the Device drop-down list.
Choose Project>Options.
Select the Linker category.
Click the Config tab.
Select the Override default option, and choose the appropriate linker configuration file in the Linker configuration file area. A browse button is available.