[SOLVED] [RISCV with JLINK] How to configure memory access as System Bus (SB)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] [RISCV with JLINK] How to configure memory access as System Bus (SB)

    I'm using the following command in Lauterbach based startup script to configure memaccess as SB for RISCV core:

    sys.MemAccess SB

    Just wanted to know the equivalent JLINK command that I can use in *.jlink script to debug with JLINK.

    Thanks
  • If SB is available on the core, J-Link will use it.
    Nothing needs to be setup.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Thanks for replying Alex
    RISC-V core that I'm using has SB but while connecting with JLINK it shows, system Bus - No
    Here is the complete log:

    Connecting to target via JTAG
    ConfigTargetSettings() start
    ConfigTargetSettings() end
    InitTarget() start
    ***************************************************
    J-Link script: RISCV J-Link script
    ***************************************************
    J-Link script: _InitTAP
    TotalIRLen = 15, IRPrint = 0x0011
    JTAG chain detection found 2 devices:
    #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
    #1 Id: 0x000000E1, IRLen: 11, Unknown device
    DP_REG_CTRL_STAT After=0xF0000000
    DP_REG_SELECT=0x01000000
    DATA_AP_REG_ADDR: 0x49300040
    DATA_AP_REG_DATA: 0x80000001
    DATA_AP_REG_ADDR: 0x49300044
    DATA_AP_REG_DATA: 0x004F03A2
    DATA_AP_REG_ADDR: 0x493000E0
    DATA_AP_REG_DATA: 0x20040407
    InitTarget() end
    TotalIRLen = 15, IRPrint = 0x0011
    JTAG chain detection found 2 devices:
    #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
    #1 Id: 0x000000E1, IRLen: 11, Unknown device
    RISC-V behind DAP detected
    DPv0 detected
    AP[1] (APB-AP) specified by user as debug AP.
    AP map scan skipped.
    AP map:
    AP[0]: MEM-AP, APAddr = 0x00000000
    AP[1]: APB-AP, APAddr = 0x49300000
    AP[2]: JTAG-AP, APAddr = 0x00000000
    AP[3]: AHB-AP, APAddr = 0x00000000
    Core base addr: 0x49300000 (user configured)
    Memory access:
    Via system bus: No
    Via ProgBuf: No (0 ProgBuf entries)
    DataBuf: 0 entries
    autoexec[0] implemented: No
    Failed to temporarily halt core during identification
    Attaching to core failed. Trying again with connect under reset (ndmreset-bit)
    Memory access:
    Detected: RV32 core
    CSR access via abs. commands: Yes
    CPU could not be halted
    ConfigTargetSettings() start
    ConfigTargetSettings() end
    InitTarget() start
    ***************************************************
    J-Link script: RISCV J-Link script
    ***************************************************
    J-Link script: _InitTAP
    DP_REG_CTRL_STAT After=0xF0000000
    DP_REG_SELECT=0x01000000
    DATA_AP_REG_ADDR: 0x49300040
    DATA_AP_REG_DATA: 0x80000001
    DATA_AP_REG_ADDR: 0x49300044
    DATA_AP_REG_DATA: 0x004F03A2
    DATA_AP_REG_ADDR: 0x493000E0
    DATA_AP_REG_DATA: 0x20040407
    InitTarget() end
    TotalIRLen = 15, IRPrint = 0x0011
    JTAG chain detection found 2 devices:
    #0 Id: 0x5BA00477, IRLen: 04, CoreSight JTAG-DP
    #1 Id: 0x000000E1, IRLen: 11, Unknown device

    ****** Error: Timeout while waiting for core to halt after reset and halt request
    Specific core setup failed.
    Cannot connect to target.
  • Hi,

    Are you 100% confident that the „CoreBaseAddr“ and „AP“ you manually configured, are correct?
    J-Link auto-detects the presence of SB by checking some SB related registers.
    If any of the manually configured settings is incorrect, nothing will work and you will probably see incorrect output.

    From the log I would say that at least your AP specification is incorrect.
    Can you send us your script and an excerpt from your CoreSight layout, to see how the core is connected to the DAP?

    We are 100% confident that J-Link works with RV32 behind a DAP, if you setup things correctly. We have several very big customers who are using this extensively.


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.