Monitor Data


Detailed Description

Data structures used by the monitor to handle registers and do communication.

\

Data Structures

Defines

Typedefs

Variables


Define Documentation

#define AVR_MONITOR_NUM_BREAKPOINTS
 

Number of software breakpoints

#define AVR_MONITOR_REGS_SIZE
 

Size of the register structure.

#define AVR_MONITOR_BP_FLAGS_OFFSET
 

Offset into the monitor data structure for breakpoints.

#define AVR_MONITOR_CONTINUE_CMD_OFFSET
 

Offset into the monitor data structure for the continue command.

#define AVR_MONITOR_BREAKPOINTS_OFFSET
 

Offset into the monitor data structure for breakpoints.

#define AVR_MONITOR_BREAKPOINTS_SIZE
 

Size of the breakpoint structure.

#define AVR_MONITOR_STACK_OFFSET
 

Not used yet. Offset in the monitor structure for the dedicated stack.

#define AVR_MONITOR_STACK_SIZE
 

Size of dedicated stack in bytes.

#define AVR_MONITOR_DATA_SIZE
 

Size of the whole avr_monitor_data_t structure.

#define AVR_MONITOR_SIZEOF_DATA_INFO
 

sizeof(avr_monitor_data_info_t)


Typedef Documentation

typedef struct avr_registers_s avr_registers_t
 

Registers in the avr.

It is used by:

  • Target to store the registers when executing the monitor.
  • GDB internally, it much match in AVR-GDB (avr-tdep.c) avr_register_raw_size(int regnum) avr_register_name (int regnum)
Note:
Packed struct was not working for i386 gcc, avr-monitor.exe host does a manual translation

typedef struct avr_monitor_data_s avr_monitor_data_t
 

Data used by the target monitor to save registers and to do communication

Some advantages and disadvantages

  • + Stack is separated from the application stack, if the application stack is corrupt the monitor can still run
  • + The SP can be changed by the monitor

  • - The monitor save and restore block becomes a little more complicated (larger code)

Todo:
jbirkler. One idea is to skip the regs in avr_monitor_data_t and only use a dedicated stack that can hold all registers too. The monitor entry and exit block should be a little simpler: -Push to get some temp working regs -Set SP to dedicated area -Push everything to dedicated area -Host knows in what order the monitor pushes things on the dedicated stack and can restore registers .


Variable Documentation

volatile avr_monitor_data_t avr_monitor_data
 

Monitor data structure Declared volatile so that the compiler doesn't optimize way a check to the hw_bp_flags.

volatile avr_monitor_data_t avr_monitor_data
 

Monitor data structure Declared volatile so that the compiler doesn't optimize way a check to the hw_bp_flags.


Copyright 2002 Jörgen Birkler. For accelR8 Accelerometer on Mon Jan 19 21:43:20 2004 by Doxygen 1.3.5.