From: Luke Wren Date: Fri, 28 Jun 2024 15:41:48 +0000 (+0100) Subject: flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2e8e1a3da386685a2a572bcc85f043505a7b3d94;p=users%2Fborneoa%2Fopenocd-next.git flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2 which has 16-bit well-known pointers. Change-Id: Ia0838a0b062f73a9c5751abb48f1b4d55100bd1d Signed-off-by: Tomas Vanek Signed-off-by: Luke Wren Reviewed-on: https://review.openocd.org/c/openocd/+/8443 Reviewed-by: Jonathan Bell Tested-by: jenkins --- diff --git a/src/flash/nor/rp2040.c b/src/flash/nor/rp2040.c index 764a034c6..a9995f8c6 100644 --- a/src/flash/nor/rp2040.c +++ b/src/flash/nor/rp2040.c @@ -331,8 +331,8 @@ static int rp2xxx_lookup_rom_symbol(struct target *target, uint16_t tag, uint16_ /* Distinguish old-style RP2350 ROM table (A0, and earlier A1 builds) based on position of table -- a high address means it is shared with RISC-V, i.e. new-style. */ - uint32_t table_ptr; - err = target_read_u32(target, BOOTROM_MAGIC_ADDR + 4, &table_ptr); + uint16_t table_ptr; + err = target_read_u16(target, BOOTROM_MAGIC_ADDR + 4, &table_ptr); if (err != ERROR_OK) return err; if (table_ptr < 0x7c00)