User`s guide

VxWorks
BSP Developer’s Guide, 6.0
50
Use a ROM emulator (such as NetROM from AMC). The drawback of this
approach is that it can take time for you to learn how to use the tool. The
advantages include fast download times, portability to most boards, and a
communication protocol that lets debugging messages pass from the target to
the host through the ROM socket. For more information on ROM emulators,
see ROM Emulator, p.45).
Use an OCD device (see On-Chip Debugging (OCD) Devices, p.45). This allows
you to single-step through much of the initialization code.
Use an ICE (see In-Circuit Emulator, p.46). The main drawbacks of this
approach include a high procurement cost and a lack of availability for all
processors. However, it does let you single-step through the initialization code
and can significantly improve a product’s time to market.
Use the WDB agent (see 2.4.2 WDB Debugging Interface, p.47). Once the WDB
agent is available, many parts of BSP initialization can be downloaded and
tested while running. In addition to a fast, efficient download path, this gives
you access to the Wind River tools, including the full capabilities of the
debugger.
After you have downloaded code to the target, examine memory or ROM to make
sure your code is loaded in the right place. The GNU tools nmarch and
objdumparch, supplied by Wind River, can be used on your compiled images to
see what should be in the target memory. When reviewing this information, give
special attention to the start addresses of the text and data segments.
2.5 Avoiding Common Problems
Most of the problems listed in this section are the result of doing the right thing in
the wrong place or at the wrong time. Context is important. To avoid introducing
problems into your BSP, examine your reference BSP carefully before starting your
development and ensure that the reference BSP developer did not make the
following mistakes.
Failing to Include LOCAL_MEM_LOCAL_ADRS
Many BSP writers assume that LOCAL_MEM_LOCAL_ADRS is zero and fail to
include it in macros that must be offset by the start of memory.