]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
flash/nor/rp2040: Fix up ROM table lookup for RP2350 A2
authorLuke Wren <luke@raspberrypi.com>
Fri, 28 Jun 2024 15:41:48 +0000 (16:41 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Fri, 25 Apr 2025 09:26:46 +0000 (09:26 +0000)
which has 16-bit well-known pointers.

Change-Id: Ia0838a0b062f73a9c5751abb48f1b4d55100bd1d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Signed-off-by: Luke Wren <luke@raspberrypi.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8443
Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
Tested-by: jenkins
src/flash/nor/rp2040.c

index 764a034c6aff0b7b403f98b4953c65e9d1e81e49..a9995f8c6dfcacd00850df34a08b447644e89079 100644 (file)
@@ -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)