Table 9-3 Program Breakdown; Table 9-4 Resulting B-Records - Motorola DragonBall MC9328MX1 Reference Manual

Integrated portable system processor
Table of Contents

Advertisement

Bootstrap Mode Operation
Code Example 9-2 fills memory locations starting from0x00310000 to 0x003100FF (the length of 0x100)
with 0x12345678.
ldr
ldr
ldr
ldr
loop:
str
subs
bne
mov
Because the instruction buffer is of limited size, the programmer cannot do everything at the same time.
The program can be broken into five parts, as shown in Table 9-3.
Part
1
2
3
4
5
loop
Breaking down the register initialization into three parts is not mandatory, however it produces similar
b-records and therefore is easier to manage.
The resulting b-records appear in Table 9-4.
B-Record Number
1
2
3
4
9-4
Code Example 9-2. Instruction Buffer Sample
r1,=0x00310000
r2,=0x100
r3,=0x12345678
r4,=0x00000100
r3,[r1, r2]
r2,r2, #4
loop
pc, r4
Table 9-3. Program Breakdown
ldr
r4,=0x00000100
mov
pc, r4
ldr
r1,=0x00310000
mov
pc, r4
ldr
r2,=0x00000100
mov
pc, r4
ldr
r3,=0x12345678
mov
pc, r4
str
r3,[r1, r2]
subs
r2,r2, #4
bne
loop
mov
pc, r4
Table 9-4. Resulting B-Records
00000004 08E3A04F40E1A0F004
0000000400
00000004 08E3A019C4E1A0F004
0000000400
00000004 08E3A02F40E1A0F004
0000000400
00000004 0CE59F3000E1A0F00412345678
0000000400
MC9328MX1 Reference Manual
// starting address is 0x0031130100FF
// length is 0x100
// data to fill is 0x12345678
// bootloader program
// store data
// decrement address
// loop back till r2 down to 0x0
// return to bootloader program
Code
// bootloader address 0x00000100
// return to bootloader program
// starting address is 0x00310000
// return to bootloader program
// length is 0x100
// return to bootloader program
// data to fill is 0x12345678
// return to bootloader program
// store data
// decrement address
// loop back till r2 down to 0x0
// return to bootloader program
B-Record
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents