Ah well, when using target/stm32l0_dual_bank.cfg the commands for erase are flash erase_sector 0 0 23 and flash erase_sector 1 0 23 not flash erase_sector 1 24 47
Programming also works with target/stm32l0_dual_bank.cfg --- ** [tickets:#353] Improper detection of flash banks/sizes for STM32L082CZ & interface/stlink.cfg & target/stm32l0.cfg** **Status:** new **Milestone:** 0.11.0 **Labels:** stm32 STM32 STM stm32lx flash **Created:** Tue Jun 14, 2022 02:40 PM UTC by Maarten **Last Updated:** Tue Jun 14, 2022 02:40 PM UTC **Owner:** nobody I'm flashing my STM32L082CZ using openocd -f interface/stlink.cfg -f target/stm32l0.cfg and fail to program from the first bank onward into the second flash bank. A number of ST's microcontrollers come with flash being two banks, enabling booting one half or the other. But my programming fails at the end of the first bank. Effectively I have only 96kb program flash available (first bank only), rather than 192kb. Despite the banks being continuous in the unified memory space. Verification however does fail, so the verification is run properly over all program bytes spanning both banks it appears. Openocd does report (detect/probes) there being two banks (shows in the output) but flash erase_sector 1 24 47 gives you flash bank 1 does not exist. Bit confusing. (Grep for the phrase "flash size will be probed" which will show up in stm32l0.cfg) There's already target/stm32l0_dual_bank.cfg which tries to work around it. But it not fixes the probing but works around it? --- Sent from sourceforge.net because openocd-devel@lists.sourceforge.net is subscribed to https://sourceforge.net/p/openocd/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.