Hello, I can't flash to STM32L031 with the version of openocd-0.10.0-3 and later. I have checked the difference and I saw that flash write code was changed with openocd-0.10.0-3. I think there is a problem with the new code. It works when I change the hex array inside of the stm32lx.inc file acording to the openocd-0.10.0.
# Latest version of the stm32lx.inc file (Not working) /* Autogenerated with ../../../../src/helper/bin2char.sh */ 0x92,0x00,0x8a,0x18,0x01,0xe0,0x08,0xc9,0x08,0xc0,0x91,0x42,0xfb,0xd1,0x00,0xbe, # Here is the error output when I try to flash to the STM32L031 ** Programming Started ** Info : Device: STM32L0xx (Cat. 2) Info : STM32L flash size is 32kb, base address is 0x8000000 Warn : target was in unknown state when halt was requested Info : SWD DPIDR 0x0bc11477 Info : SWD DPIDR 0x0bc11477 Error: error writing to flash at address 0x08000000 at offset 0x00000000 ** Programming Failed ** # Latest version of the stm32lx.inc file (Working) /* Autogenerated with ../../../../src/helper/bin2char.sh */ 0x00,0x23,0x04,0xe0,0x51,0xf8,0x04,0xcb,0x40,0xf8,0x04,0xcb,0x01,0x33,0x93,0x42,0xf8,0xd3,0x00,0xbe # Here is the output when I try to flash to the STM32L031 with fixed hex array ** Programming Started ** Info : Device: STM32L0xx (Cat. 2) Info : STM32L flash size is 32kb, base address is 0x8000000 Error: stm32l0.cpu -- clearing lockup after double fault Warn : Couldn't use loader, falling back to page memory writes ** Programming Finished **