From 157a67a98ab17f88fca4e98e0c5fcc09843f825c Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Fri, 11 Aug 2017 13:36:58 -0700 Subject: [PATCH] Be more clear in multi-core systems without -rtos Don't print out there's a hart with XLEN of 0. --- src/target/riscv/riscv-013.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 8809483ff..c474b9803 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1175,9 +1175,13 @@ static int examine(struct target *target) LOG_INFO("Examined RISC-V core; found %d harts", riscv_count_harts(target)); for (int i = 0; i < riscv_count_harts(target); ++i) { - LOG_INFO(" hart %d: XLEN=%d, program buffer at 0x%" PRIx64 - ", %d triggers", i, r->xlen[i], r->debug_buffer_addr[i], - r->trigger_count[i]); + if (riscv_hart_enabled(target, i)) { + LOG_INFO(" hart %d: XLEN=%d, program buffer at 0x%" PRIx64 + ", %d triggers", i, r->xlen[i], r->debug_buffer_addr[i], + r->trigger_count[i]); + } else { + LOG_INFO(" hart %d: currently disabled", i); + } } return ERROR_OK; }