Open easyvolts opened 1 year ago
Thanks for the report!
Verified that this is caused by the STM32L0xx_192.FLM
flash algorithm from the Keil.STM32L0xx_DFP.2.2.0
pack indicating that the page size (0x400) is greater than the sector size (0x80). Pyocd currently doesn't support a configuration like this, as the normal definition of a flash page is a subset of a sector.
I'll report a bug for this algorithm.
Pyocd should probably be more flexible, too, but that's not something that can be done quickly.
In version 0.34.3, there is a warning when this happens and it silently changes the page size to be equal sector size:
(target\pack\cmsis_pack.py, inside the function _split_flash_region_by_sector_size(), that was removed with commit f0e62258)
# Limit page size.
if page_size > sector_size:
region_page_size = sector_size
LOG.warning("Page size (%d) is larger than sector size (%d) for flash region %s; "
"reducing page size to %d", page_size, sector_size, region.name,
region_page_size)
else:
region_page_size = page_size
Maybe something similar could be done with the current version to "fix" some flash algorithms.
pyOCD 0.35.1 flashing fails for target stm32l071cztx (erase works), log output: