flashing older nodes across t03 now works!

older nodes need the new bootloader which doesn't depend on pagesize because
those older nodes used quite large message sizes which are not supported
across t03 nodes (we would need to much RAM on t03 for this).
This commit is contained in:
Martin Preuss
2025-03-23 22:40:34 +01:00
parent 24dc3e1c0a
commit 0165b02310
3 changed files with 359 additions and 15 deletions

View File

@@ -28,9 +28,11 @@ ioWaitForGivenMsg:
ldi r20, 10 ; number of tries
ioWaitForGivenMsg_loop:
push r16
rcall ioRawWaitForValidMsg ; (r16, r17, r18, r19, r22, X)
pop r17 ; pop into r17 (from r16)
brcc ioWaitForGivenMsg_end
push r20
rcall ioRawWaitForValidMsg ; (r16, r17, r18, r19, r20, r21, r22, X)
pop r20
pop r17 ; pop expected code to r17!
brcc ioWaitForGivenMsg_loopEnd
ldi xl, LOW(flashRecvBuffer)
ldi xh, HIGH(flashRecvBuffer)
adiw xh:xl, COM2_MSG_OFFS_CMD
@@ -40,7 +42,8 @@ ioWaitForGivenMsg_loop:
breq ioWaitForGivenMsg_gotIt
cpi r16, CPRO_CMD_FLASH_END
breq ioWaitForGivenMsg_gotIt
mov r16, r17 ; put expected msg code back into r16 for next loop
ioWaitForGivenMsg_loopEnd:
mov r17, r16 ; move expected code back to r16
dec r20
brne ioWaitForGivenMsg_loop
clc
@@ -52,6 +55,3 @@ ioWaitForGivenMsg_end:
; @end