Skip to content

Commit e57634e

Browse files
lstnlkartben
authored andcommitted
boards: nordic: nrf54h20dk: VPRs board runner config
Added basic support for west debug for nrf54h20 RISC-V cpus: nrf54h20_cpuppr and nrf54h20_cpuppr. Note external jlink probe needs to be used. Signed-off-by: Łukasz Stępnicki <[email protected]>
1 parent 0632873 commit e57634e

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

boards/nordic/nrf54h20dk/board.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ if(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP OR CONFIG_BOARD_NRF54H20DK_NRF54H20_C
1212
board_runner_args(jlink "--device=CORTEX-M33" "--speed=4000" "--tool-opt=-jlinkscriptfile ${JLINKSCRIPTFILE}")
1313
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
1414
endif()
15+
16+
if(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUPPR OR CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUFLPR)
17+
if(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUPPR)
18+
set(JLINKSCRIPTFILE ${CMAKE_CURRENT_LIST_DIR}/support/nrf54h20_cpuppr.JLinkScript)
19+
else()
20+
set(JLINKSCRIPTFILE ${CMAKE_CURRENT_LIST_DIR}/support/nrf54h20_cpuflpr.JLinkScript)
21+
endif()
22+
23+
board_runner_args(jlink "--device=RISC-V" "--speed=4000" "-if SW" "--tool-opt=-jlinkscriptfile ${JLINKSCRIPTFILE}")
24+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
25+
endif()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
int InitTarget(void) {
2+
// Base address where DMI registers can be found in the APB address space
3+
JLINK_ExecCommand("CORESIGHT_SetCoreBaseAddr = 0x5F8D4400");
4+
5+
// Use AP[x] to communicate with the RISC-V, flpr = APP
6+
JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0");
7+
8+
return 0;
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
int InitTarget(void) {
2+
// Base address where DMI registers can be found in the APB address space
3+
JLINK_ExecCommand("CORESIGHT_SetCoreBaseAddr = 0x5F908400");
4+
5+
// Use AP[x] to communicate with the RISC-V, ppr = APP
6+
JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0");
7+
8+
return 0;
9+
}

0 commit comments

Comments
 (0)