Debugging Applications with eRTOS Shell Commands

eRTOS supports a text-based terminal accessible via the target system’s serial port.

Note: This is only available if eRTOS is configured to boot using MaxRT eRTOS - Debug Mode.

Sections in this topic:

 


Configuring PuTTY for Serial Connections

A serial terminal emulator must be configured from the development computer. PuTTY is one such terminal emulator that can be configured for serial TTY console connections.

To configure PuTTY for serial connections:

  1. Determine the COM port used on the development computer.
  2. Launch the PuTTY terminal emulator. Under Category > Connection, select Serial.

  1. Set Serial line to connect to to the COM port you want to use. You can locate available COM ports in Device Manager under Ports (COM & LPT).
  2. Configure the serial line as needed.
  3. Under Category > Session, set Connection type to Serial.

  1. Click Open to start serial session.

RTHAL Shell Commands

eRTOS SDK provides some useful RTHAL shell commands for debugging real-time applications.

Command Description

help

Displays information about supported RTHAL shell commands.

version

Displays RTHAL version information.

dump_mem <address, length>

Dumps memory starting at a given address (in hexadecimal) for a given length (in decimal), displayed in bytes.

int

Lists interrupt information per CPU.

Example:

dump_ioapic

Shows native IOAPIC information.

Example:

cpuid <leaf> [subleaf]

Displays the CPUID leaf [subleaf] in hexadecimal.

reboot

Reboots the target system.

rdmsr [-p <pcpu_id>] <msr_index>

Reads the MSR at msr_index in hexadecimal for CPU ID pcpu_id.

wrmsr[-p <pcpu_id>] <msr_index> <value>

Writes the value in hexadecimal to the MSR at msr_index in hexadecimal for CPU ID pcpu_id.

e820

Displays e820 memory map.

Example:

pciscan [ -v]

Displays PCI configuration information for each device after searching for devices on the machine's PCI buses.

Example:

[-v] displays verbose PCI configuration information for each device.

Example:

dv

Dumps 8bytes as value

rva

Relative address

dt [ thread,process, ]

Passes a structure and gives the type. For example, to pass in a thread object.

Related topics: