问题描述: 在例程中第一次烧录不会出错,当修改了源程序再次烧录时会出现
Programming Failed! Error: Flash Download failed - "Cortex-M0"
的错误。在Debug和Utilities配置中都没有错,代码编译也没有出错。
解决方法:在target里面修改,当再次烧录时 IROM1 区和 IRAM1区的起始地址和大小发生改变,改回来就行了,例如用的是s110_nrf51_8.0.0协议栈,协议栈大小为96k,那么IROM1起始地址为0x18000,大小0x28000,IRAM1 起始地址0x20002000 大小0x6000,不同的协议栈大小不同,改的值也不同,可以参考未修改过的官方例程里面的设置来配