K210 Register Definition File (RDF)

  • Hi Folks,

    I'm tring to get something put together so I can debug the APU more easily.

    I followed the guide at http://visualgdb.com/documentation/hwregs to create a simple RDF for the first two APU registers. That file is linked below. I determined the register addresses and subregister fields from SDK source as follows:

    APU.C (22)

    #define BEAFORMING_BASE_ADDR (0x50250200)

    APU.H (253)

    typedef struct _apu_reg
       apu_ch_cfg_t bf_ch_cfg_reg;
       apu_ctl_t bf_ctl_reg;
       //0x208 ...

    Subregister fields are also defined in apu.h ...

    line 45: typedef struct _apu_ch_cfg { ... }.
    line 107: typedef struct _apu_ctl_t { ... }

    The file loads without issue and when I hit a breakpoint I can open the register sections to see subregister detail...
    0_1579554774709_RDF_View_Sample.png )

    ... but the problem is that the register values do not reflect actual memory (all 1's) and I can't modify them either. I've prepared a link to the sample RDF >>> here <<< and would appreciate it if someone else that is setup with VisualGDB tried this file as well to confirm that it loads and if it can be used to inspect/modify memory.

    I will post on SysProgs as well to get their input.

    I have no trouble inspecting and modifying program variables so it may be that they simply do not yet support this function for the K210.


  • I now realize that hardware registers aren't supported by this version of OpenOCD. That's unfortunate as I've almost completed the RDF. I have defined register sets for all peripherals with all known registers and subregisters defined as well.
    0_1579566850638_RDF Structure.png

    I would make it publicly available if it could be used but if OpenOCD doesn't support it then it looks like I've completely wasted my time 😞

    If there is real interest in having this feature added to OpenOCD then let the developers know by adding your support for it here with a vote.

  • I have already received a response with troubleshooting suggestions from SysProgs.


    It looks like OpenOCD is failing to read memory in the range 0x50200000 - 0x50300000 as well as the range 0x50400000 - 0x50500000, which is where most of the peripherals live...