From 6b61973e396eb663af070aa1d542f7e24e307db7 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Wed, 19 Feb 2025 14:18:18 -0700 Subject: [PATCH] ite/it8xxx2: Fix JTAG support when using a flash offset If a board defined CONFIG_FLASH_LOAD_OFFSET to a non-zero value, enabling CONFIG_SOC_IT8XXX2_JTAG_DEBUG_INTERFACE generated a linker error because when trying to move the location counter backwards. Fixed by allocating the JTAG section within the deined ROM region. Signed-off-by: Keith Short --- soc/ite/ec/it8xxx2/linker.ld | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soc/ite/ec/it8xxx2/linker.ld b/soc/ite/ec/it8xxx2/linker.ld index b5b0f686d73..3d46d9e00e2 100644 --- a/soc/ite/ec/it8xxx2/linker.ld +++ b/soc/ite/ec/it8xxx2/linker.ld @@ -131,9 +131,9 @@ SECTIONS } GROUP_LINK_IN(ROMABLE_REGION) #ifdef CONFIG_SOC_IT8XXX2_JTAG_DEBUG_INTERFACE -#define JTAG_DEBUG_RESERVED_ADDR_START 0x80000800 -#define JTAG_DEBUG_RESERVED_ADDR_END 0x800008FF - /* The CPU address from 0x80000800 to 0x800008FF is reserved for JTAG +#define JTAG_DEBUG_RESERVED_ADDR_START (ROM_BASE + 0x800) +#define JTAG_DEBUG_RESERVED_ADDR_END (ROM_BASE + 0x8FF) + /* The flash range at offset 0x800 to 0x8FF is reserved for JTAG * debug usage. */ SECTION_PROLOGUE(jtag_dbg,,) {