nrf5: Comment the flash loader
authorAurélien Martin <martaurel@gmail.com>
Tue, 6 Aug 2019 20:08:18 +0000 (22:08 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 21 Apr 2020 15:45:04 +0000 (16:45 +0100)
Change-Id: Ia84b5b8ede53f59299a02dc6163d6bbaa31e0fbd
Signed-off-by: Aurélien Martin <martaurel@gmail.com>
Reviewed-on: http://openocd.zylin.com/5272
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
contrib/loaders/flash/nrf5/nrf5.S

index 6f7ed9ae7953757a3e8e9b408cb775b2e982434a..53551a2c2cea7f398ea294b0caa4142fc317bd6a 100644 (file)
        .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