Compatibility, Implementation details, New platform ports – Comtrol eCos User Manual

Page 319: New architecture ports, Io channels, The section called io channels

Advertising
background image

Chapter 11. Porting Guide

Compatibility

When a platform is changed to support the calling interface, applications will use it if so configured. That means
that if an application is run on a platform with an older ROM monitor, the service is almost guaranteed to fail.

For this reason, applications should only use Console Comm for HAL diagnostics output if explicitly configured
to do so (

CYGSEM_HAL_VIRTUAL_VECTOR_DIAG

).

As for asynchronous GDB interrupts, the service will always be used. This is likely to cause a crash under older
ROM monitors, but this crash may be caught by the debugger. The old workaround still applies: if you need
asynchronous breakpoints or thread debugging under older ROM monitors, you may have to include the debugging
support when configuring eCos.

Implementation details

During the startup of a ROM monitor, the calling table will be initialized. This also happens if eCos is configured
not to rely on a ROM monitor.

Note:: There is reserved space (256 bytes) for the vector table whether it gets used or not. This may be
something that we want to change if we ever have to shave off every last byte for a given target.

If thread debugging features are enabled, the function for accessing the thread information gets registered in the
table during startup of a RAM startup configuration.

Further implementation details are described where the service itself is described.

New Platform Ports

The

hal_platform_init()

function must call

hal_if_init()

.

The HAL serial driver must, when called via

cyg_hal_plf_comms_init()

must initialize the communication

channels.

The

reset()

function defined in

hal_if.c

will attempt to do a hardware reset, but if this fails it will fall

back to simply jumping to the reset entry-point. On most platforms the startup initialization will go a long way
to reset the target to a sane state (there will be exceptions, of course). For this reason, make sure to define

HAL_STUB_PLATFORM_RESET_ENTRY

in plf_stub.h.

All debugging features must be in place in order for the debugging services to be functional. See general platform
porting notes.

New architecture ports

There are no specific requirements for a new architecture port in order to support the calling interface, but the basic
debugging features must be in place. See general architecture porting notes.

215

Advertising