int InitTarget(void) { // Base address where DMI registers can be found in the APB address space JLINK_ExecCommand("CORESIGHT_SetCoreBaseAddr = 0x5F908400"); // Use AP[x] to communicate with the RISC-V, ppr = APP JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0"); return 0; }