Comtrol eCos User Manual

Page 316

Advertising
background image

Chapter 11. Porting Guide

For debugging with raw diagnostic output, mangling is disabled.

Debugging session continues as initiated by the ROM monitor, whether the application was launched via serial
or Ethernet. Diagnostic output is directed at the IO port configured in the application configuration.

Note:: There is one caveat to be aware of. If the application uses proper devices (be it serial or Ethernet)
on the same ports as those used by the ROM monitor, the connections initiated by the ROM monitor will be
terminated.

And for ROM startup configurations:

Production configuration with raw output and no debugging features (configured for RAM or ROM), mangling

is disabled, no stubs are included.

Diagnostic output appears (in unmangled form) on the specified IO port.

RedBoot configuration, includes debugging features and necessary mangling.

Diagnostic and debugging output port is auto-selected by the first connection to any of the supported IO ports.
Can change from interactive mode to debugging mode when a debugger is detected - when this happens a
mangler will be installed as required.

GDB stubs configuration (obsoleted by RedBoot configuration), includes debugging features, mangling is hard-

wired to GDB protocol.

Diagnostic and debugging output is hardwired to configured IO ports, mangling is hardwired.

Footnote: Design Reasoning for Control of Console Channel

The current code for controlling the console channel is a replacement for an older implementation which had some
shortcomings which addressed by the new implementation.

This is what the old implementation did: on initialization it would check if the CDL configured console channel
differed from the active debug channel - and if so, set the console channel, thereby disabling mangling.

The idea was that whatever channel was configured to be used for console (i.e., diagnostic output) in the application
was what should be used. Also, it meant that if debug and console channels were normally the same, a changed
console channel would imply a request for unmangled output.

But this prevented at least two things:

It was impossible to inherit the existing connection by which the application was launched (either by RedBoot

commands via telnet, or by via a debugger).

This was mostly a problem on targets supporting Ethernet access since the diagnostic output would not be
returned via the Ethernet connection, but on the configured serial port.

212

Advertising