
VxWorks
BSP Developer’s Guide, 6.0
120
In this example, you have 0x036670 - 0x000000 = 0x036670. Notice that
edata - romInit (that is, 0x36670 - 0x000000) is 0x033670 from the above nmarch -n
output.
To verify that this is correct, you can check the output of sizearch.
For example:
C:\T22\ppc\host\x86-win32\bin\sizeppc bootrom
text data bss dec hex filename
186422 36410 38544 261376 3fd00 bootrom
In this case, add the text and data sizes. The sum of the sizes should be identical to
the size calculated for the hex file: 186422 + 36410 = 0x036670 - 0x000000.
The fact that these calculations come out the same gives the hex file some validity.
It is always a good idea to double check this calculation if your image is not
working as expected.
Another check is to use the objdumparch -D command to look at the disassembly
of the executable. The following is a small example of objdumpppc -D bootrom:
bootrom: file format elf32-powerpc
Disassembly of section .text:
00100000 <_romInit>:
100000: 48 00 00 39 bl 100038 <cold>
100004: 60 00 00 00 nop
100008: 48 00 00 3d bl 100044 <warm>
10000c: 43 6f 70 79 .long 0x436f7079
100010: 72 69 67 68 andi. r9,r19,26472
100014: 74 20 31 39 andis. r0,r1,12601
100018: 38 34 2d 32 addi r1,r20,11570
10001c: 30 30 31 20 addic r1,r16,12576
100020: 57 69 6e 64 rlwinm r9,r27,13,25,18
100024: 20 52 69 76 subfic r2,r18,26998
<rest of output cut off here>
Notice how the data in the above S-record matches up with the data in the
disassembly.
48 00 00 39
60 00 00 00
48 00 00 3d
43 6f 70 79
compared to:
48 00 00 39 60 00 00 00 48 00 00 3D 43 6F 70 79
After programming the flash, read back the flash contents to confirm that the flash
is programmed correctly. Always check this when bringing up the board for the
first time, to confirm that the development processes are valid.
Comentários a estes Manuais