
VxWorks
BSP Developer’s Guide, 6.0
62
After the copy action, verify that the data segment is properly initialized. For
example:
int thisVal = 17; /* some data segment variable */
...
if (thisVal != 17)
somethingIsWrong();
If something is wrong, check whether RAM access is working properly. For
example:
int dummy;
...
dummy = 17;
if (dummy != 17)
somethingIsWrong();
If RAM access is working, check that the data segment was copied into memory at
the right offset. This is only a problem for vxWorks_resrom_nosym images. The
romStart( ) routine assumes that the data is located at some architecture-specific
offset from the end of the text segment in ROM. The exact address used is an
architecture-dependent offset from the etext symbol. For the specific value used by
your architecture, see the copyLongs( ) or bcopyLongs( ) calls in romStart( ) in
target/config/all/bootInit.c.
Keep in mind that the memory offset can be different from the reference BSP offset
if you are using alternative tools to create your ROM image or if you are using a
custom linker script to create your VxWorks image. In these cases, you may need
to adjust the offset accordingly.
The last task romStart( ) performs is to call the generic initialization routine
usrInit( ) in usrConfig.c. The rest of the initialization sequence is described in
Initializing All Image Types, p.65.
Creating Additional Diagnostic Routines
Once the processor and memory have been initialized, you have the opportunity
to spend some time preparing additional diagnostic routines that will help with
the remainder of the development effort.
LED Routines
If you have not done so already, you may wish to create LED routines for
debugging purposes. For more information, see 3.2.3 Using Debug Routines in the
Initialization Code, p.57.
Comentários a estes Manuais