[Gnuk-users] Can't erase FS-BB48 using openOcd

Paul Fertser fercerpav at gmail.com
Thu Apr 20 18:30:53 UTC 2017


Hello,

On Thu, Apr 20, 2017 at 08:00:23PM +0200, Florian Uekermann wrote:
> First off, I have an FS-BB48 running with chopstx and the sample
> application. Serial interface, LED blinking, touch button are all working
> fine. I use openocd for flashing and on a new device flashing works fine
> using "openocd -f interface/stlink-v2.cfg -f target/klx.cfg" with the "flash
> write_image" command.
> 
> The problem is that I can only flash the firmware once, since I can not
> erase the flash memory. For example the command "flash erase_sector 0 0 15"
> returns:
> > erase sector 0 failed

Please re-ask question on the OpenOCD devel mailing list and provide a
-d3 output for the erase operation. I have a KL25 board here so I can
verify the erasing operation if it fails. It shouldn't require
mass-erase normally.

Normally one is supposed to flash such targets using the "program"
command (please see the official manual).

> > Cannot perform mass erase with a high-level adapter in procedure 'flash'
> Memory protection is off for all sectors. I tried using kl25z.cfg, with
> identical results.
> Should I use different hardware than the ST-Link/V2 (I was under the
> impression that Niibe used it successfully in the past, so that is what I
> tried)?

Unfortunately, Kinetis designed their interface in a way that only a
low-level SWD adapter can perform the mass erase operation. Something
like CMSIS-DAP, J-Link, FTDI in SWD mode, a single-board computer
bitbanging SWD etc.

HTH
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com



More information about the gnuk-users mailing list