I have designed custom-made PCB with STM32L071C8 MCU. I'm using OpenOCD 'master' branch and SWD interface via FT2232H to debug the MCU.
I successfully did some RAM reading and Flash writing, erasing on the MCU via the OpenOCD so the OpenOCD ->FT2232H-> SWD on MCU works.
But, I have a weird problem with writing to Flash more than 192 bytes or in other words 128 bytes (page) + 64 (half page). the OpenOCD prints an error message about failing to write the data to the desired flash address
error writing to flash at address 0x08000000 at offset 0x00000000
I have executed OpenOCD with debug prints and came up with these logs.
as you can see in the logs I'm using 'fillb' OpenOCD command to write bytes to flash.
Before each 'fillb' command I take care to erase the desired flash page. I didn't mention the erasing in log.
Have you any advice about how can I investigate this problem? or maybe any solution?