[prev in list] [next in list] [prev in thread] [next in thread]
List: openocd-development
Subject: [OpenOCD-devel] [PATCH]: feb40f9 nrf5: Comment the flash loader
From: gerrit () openocd ! org (gerrit)
Date: 2019-08-06 20:16:14
Message-ID: 20190806201614.C27752522571 () mail ! openocd ! org
[Download RAW message or body]
This is an automated email from Gerrit.
Aurélien Martin (martaurel@gmail.com) just uploaded a new patch set to Gerrit, which \
you can find at http://openocd.zylin.com/5272
-- gerrit
commit feb40f95c5d21929eb15d75d03549c78808a1278
Author: Aurélien Martin <martaurel@gmail.com>
Date: Tue Aug 6 22:08:18 2019 +0200
nrf5: Comment the flash loader
Change-Id: Ia84b5b8ede53f59299a02dc6163d6bbaa31e0fbd
Signed-off-by: Aurélien Martin <martaurel@gmail.com>
diff --git a/contrib/loaders/flash/nrf5/nrf5.S b/contrib/loaders/flash/nrf5/nrf5.S
index 6f7ed9a..53551a2 100644
--- a/contrib/loaders/flash/nrf5/nrf5.S
+++ b/contrib/loaders/flash/nrf5/nrf5.S
@@ -35,24 +35,35 @@
.global _start
_start:
wait_fifo:
+ // Kick the watchdog
str r6, [r7, #0]
+ // Load write pointer
ldr r5, [r1, #0]
+ // Abort if it is NULL
cmp r5, #0
beq.n exit
+ // Load read pointer
ldr r4, [r1, #4]
+ // Continue waiting if it equals the write pointer
cmp r4, r5
beq.n wait_fifo
+ // Copy one word from buffer to target, and increment pointers
ldmia r4!, {r5}
stmia r3!, {r5}
+ // If at end of buffer, wrap back to buffer start
cmp r4, r2
bcc.n no_wrap
mov r4, r1
adds r4, #8
no_wrap:
+ // Update read pointer inside the buffer
str r4, [r1, #4]
+ // Deduce the word transferred from the byte count
subs r0, #4
+ // Start again
bne.n wait_fifo
exit:
+ // Wait for OpenOCD
bkpt #0x00
.pool
--
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic