Skip to content

msalau/rx-gdb-stub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is GDB stub for bare-metal Renesas RX target.

Stub can:
* read/write RAM;
* read ROM;
* read/write registers (all or specific);
* step single machine instruction (also from specified address);
* continue execution (also from specified address);
* interrupt execution by BREAK or ^C (Ctrl-C) signal;
* print debug messages on GDB console (function debug_puts).

GDB client can set software breakpoints in functions that reside in RAM.
To place function in RAM area specify subsection for it in .ramfunc section.
E.g.:

__attribute__((section(".ramfunc.foo")))
void foo (void)
{
    /* ... */
}

Stub impose restrictions on host application:
* external quartz crystal must be 12 MHz;
* stub configures PCLK for maximum allowable frequency: 48 MHz
  (this should not be changed);
* stub uses SCI1 for communication with GDB client
  (host application should not access SCI1 registers or disable the module);
  (sleep modes that stop SCI1 operation should be avoided);
* stub rely on SCI1 interrupts
  (so debug functionality will not work while inerrupts are disabled;
  if interrupt vector table must be relocated, perform this operation with disabled interrupts
  and copy vectors 0, 1, VECT(SCI1,RXI1) and VECT(SCI1,ERI1) to new vector table);
* single stepping is implemented as software breakpints placed at next instruction address
  (as a result stepping into hardware generated interrupts is not possible; however stepping into
  software interrupts is possible, if they are generated by unconditional trap instruction);
* with absence of debugger firmware (that include stub) will not be functional.

About

GDB stub for bare-metal Renesas RX target

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages