This is an automated email from Gerrit. "Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7001
-- gerrit commit ff531cfe5369bb7cf818433621ffdce28484ea0e Author: Tomas Vanek <van...@fbl.cz> Date: Thu May 26 13:51:18 2022 +0200 flash/nor/fespi: check target type Change-Id: I09d3ed20966b37ec63c09c2ffb0e0403986cb1e5 Signed-off-by: Tomas Vanek <van...@fbl.cz> diff --git a/src/flash/nor/fespi.c b/src/flash/nor/fespi.c index 5474ffae4b..ec3d575360 100644 --- a/src/flash/nor/fespi.c +++ b/src/flash/nor/fespi.c @@ -523,6 +523,12 @@ static int fespi_write(struct flash_bank *bank, const uint8_t *buffer, } } + struct riscv_info *riscv = riscv_info(target); + if (!is_riscv(riscv)) { + LOG_ERROR("Unexpected target type"); + return ERROR_FAIL; + } + unsigned int xlen = riscv_xlen(target); struct working_area *algorithm_wa = NULL; struct working_area *data_wa = NULL; --