[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/imote2
binarymover.s, 1.4, 1.5
Robbie Adler
radler at users.sourceforge.net
Tue Sep 6 11:10:35 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24864
Modified Files:
binarymover.s
Log Message:
simple comment cleanup
Index: binarymover.s
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/imote2/binarymover.s,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** binarymover.s 2 Sep 2005 23:40:34 -0000 1.4
--- binarymover.s 6 Sep 2005 18:10:33 -0000 1.5
***************
*** 26,34 ****
.func __Binary_Mover @r1 = addr
@r2 = size
!
! ldr r5,=ARM_CPSR_INT_MASK @Store int mask value
! mrs r4,CPSR @Store Core Program Status Reg
orr r4,r4,r5 @Add int mask
! msr CPSR,r4 @Replaces previous CPSR value
ldr r5,=0x40000000
--- 26,33 ----
.func __Binary_Mover @r1 = addr
@r2 = size
! ldr r5,=ARM_CPSR_INT_MASK @Store int mask value
! mrs r4,CPSR @Store Core Program Status Reg
orr r4,r4,r5 @Add int mask
! msr CPSR,r4 @Replaces previous CPSR value
ldr r5,=0x40000000
***************
*** 39,43 ****
ldr r7,=0x7
orr r6,r6,r7,LSL #7
! str r6,[r5] @should set GPIO 103-105 to output
ldr r6,=0x18 @offset between GPDR3 and GPCR3
--- 38,42 ----
ldr r7,=0x7
orr r6,r6,r7,LSL #7
! str r6,[r5] @should set GPIO 103-105 to output
ldr r6,=0x18 @offset between GPDR3 and GPCR3
***************
*** 45,53 ****
ldr r6,=0x7
mov r6,r6,LSL #7
! str r6,[r5] @Turn on 3 LEDs
sub r9,r5,#0xC @r9 will store GPSR3, 0x40e0 0118
! ldr r4,=0x0 @Counter
cmp r4,r2
beq __Binary_Mover_end @If imagesize is 0 then skip a bunch of stuff
--- 44,52 ----
ldr r6,=0x7
mov r6,r6,LSL #7
! str r6,[r5] @Turn on 3 LEDs
sub r9,r5,#0xC @r9 will store GPSR3, 0x40e0 0118
! ldr r4,=0x0 @Counter
cmp r4,r2
beq __Binary_Mover_end @If imagesize is 0 then skip a bunch of stuff
***************
*** 64,75 ****
blo __Binary_Mover_RA_setup @Repeat
! ldr r6,=0x1 @switching to 2 LEDs
mov r6,r6,LSL #7
! str r6,[r9] @Turn off 1 LED
! ldr r4,=0x0 @Counter
ldr r5,=0x8000 @Block size 0x0000 8000 initially...moves up to 0x0002 0000
__Binary_Mover_Erase_loop:
! ldr r6,=FLASH_CLEARSTATUS @Unlock block
strh r6,[r4] @Clear Status
ldr r6,=FLASH_DLOCKBLOCK
--- 63,74 ----
blo __Binary_Mover_RA_setup @Repeat
! ldr r6,=0x1 @switching to 2 LEDs
mov r6,r6,LSL #7
! str r6,[r9] @Turn off 1 LED
! ldr r4,=0x0 @Counter
ldr r5,=0x8000 @Block size 0x0000 8000 initially...moves up to 0x0002 0000
__Binary_Mover_Erase_loop:
! ldr r6,=FLASH_CLEARSTATUS @Unlock block
strh r6,[r4] @Clear Status
ldr r6,=FLASH_DLOCKBLOCK
***************
*** 90,94 ****
ldrh r6,[r4] @Read Block Status
and r6,r6,#0x80
! cmp r6,#0x0 @Check if Erase is complete
beq EraseBlockSpin @Spin if not complete
ldr r6,=FLASH_READARRAY
--- 89,93 ----
ldrh r6,[r4] @Read Block Status
and r6,r6,#0x80
! cmp r6,#0x0 @Check if Erase is complete
beq EraseBlockSpin @Spin if not complete
ldr r6,=FLASH_READARRAY
***************
*** 108,120 ****
blo __Binary_Mover_Erase_loop @Repeat
! ldr r6,=0x1 @switching to 1 LEDs
mov r6,r6,LSL #8
! str r6,[r9] @Turn off 1 LED
! ldr r4,=0x0 @Reset counter for writing
__Binary_Mover_Write_loop:
ldrh r6,[r1, r4] @Get data
! ldr r5,=FLASH_CLEARSTATUS @Write word start
strh r5,[r4] @Clear Status register
ldr r5,=FLASH_PROGRAMWORD
--- 107,119 ----
blo __Binary_Mover_Erase_loop @Repeat
! ldr r6,=0x1 @switching to 1 LEDs
mov r6,r6,LSL #8
! str r6,[r9] @Turn off 1 LED
! ldr r4,=0x0 @Reset counter for writing
__Binary_Mover_Write_loop:
ldrh r6,[r1, r4] @Get data
! ldr r5,=FLASH_CLEARSTATUS @Write word start
strh r5,[r4] @Clear Status register
ldr r5,=FLASH_PROGRAMWORD
***************
*** 124,128 ****
ldrh r5,[r4] @Read Block Status
and r5,r5,#0x80
! cmp r5,#0x0 @Check if Write is complete
beq WriteWordSpin @Spin if not complete
ldr r5,=FLASH_READARRAY
--- 123,127 ----
ldrh r5,[r4] @Read Block Status
and r5,r5,#0x80
! cmp r5,#0x0 @Check if Write is complete
beq WriteWordSpin @Spin if not complete
ldr r5,=FLASH_READARRAY
***************
*** 132,141 ****
add r4,r4,#0x2 @Increment Counter
cmp r4,r2
! blo __Binary_Mover_Write_loop @Repeat
__Binary_Mover_end:
! ldr r6,=0x1 @switching to 0 LEDs
mov r6,r6,LSL #9
! str r6,[r9] @Turn off 1 LED
--- 131,140 ----
add r4,r4,#0x2 @Increment Counter
cmp r4,r2
! blo __Binary_Mover_Write_loop @Repeat
__Binary_Mover_end:
! ldr r6,=0x1 @switching to 0 LEDs
mov r6,r6,LSL #9
! str r6,[r9] @Turn off 1 LED
***************
*** 144,148 ****
add r5,r5,#0x18 @r5 contains 0x40a0 0018, OWER
ldr r6,=0x1
! str r6,[r5] @enables watchdog timer reset
sub r5,r5,#0xC @r5 contains 0x40a0 000c OSMR3
--- 143,147 ----
add r5,r5,#0x18 @r5 contains 0x40a0 0018, OWER
ldr r6,=0x1
! str r6,[r5] @enables watchdog timer reset
sub r5,r5,#0xC @r5 contains 0x40a0 000c OSMR3
***************
*** 150,154 ****
ldr r6,[r4]
add r6,r6,#0x10000
! str r6,[r5] @osmr3 = oscr0 + 0x10000
__Binary_Mover_spin:
b __Binary_Mover_spin @spin until watchdog timer resets this
--- 149,153 ----
ldr r6,[r4]
add r6,r6,#0x10000
! str r6,[r5] @osmr3 = oscr0 + 0x10000
__Binary_Mover_spin:
b __Binary_Mover_spin @spin until watchdog timer resets this
More information about the Tinyos-beta-commits
mailing list