gdb command support for openocd

hey,

I have recently started working on openocd. I wrote board.cfg, target.cfg and adaptar.cfg files for my board (it was unavailable anywhere). I have also written flashloader.c file and tested… it is working fine. I have tried loading my program into flash many times and erasing it. Everything works fine with openocd flashloader commands.

My problem came, when I started using gdb command to write my program into flash. Whenever I give the command

load D:/project/ledtest/bin/Debug/ledtest.elf

It works fine for the first time and failed next time i.e; This command failed every alternate time.

I didn’t know whether its a problem in my openocd or in gdb integration? If anyone faced the issue earlier, kindly help.