Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flash/nor/kinetis: fix assertion during flash write
If the device has at lest one FlexNVM bank and it is set as EE backup only, the bank has no protection blocks. kinetis_fill_fcf() collects protection data from all banks before flash write of the sector containing FCF block. In case it encountered a FlexNVM bank with no protection blocks assert failed. Failed flash write of previously erased FCF block could cause engaging debugging lock (if the device was run or reset). Skip banks with zero protection blocks. Replace assert() by LOG_ERROR() as we have to finish FCF write. Change-Id: Ibe7e7ec6d0db4453b8a53c8256987621b809c99d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Suggested-by: Jasper v. Blanckenburg <jazzpi@users.sourceforge.net> Fixes: https://sourceforge.net/p/openocd/tickets/448/ Reviewed-on: https://review.openocd.org/c/openocd/+/8719 Tested-by: jenkins Reviewed-by: Jasper v. Blanckenburg <jasper@mezzo.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
- Loading branch information