introduce macros bigjmp and bigcall for intermodule calls/jmps

translates to rjmp/rcall on MCUs with up to 8K flash and to jmp/call
on others.
This commit is contained in:
Martin Preuss
2025-06-01 19:18:25 +02:00
parent 188e7da379
commit bb14dd4c22
11 changed files with 128 additions and 96 deletions

View File

@@ -29,7 +29,7 @@ NETMSG_Device_Write:
ldi zh, HIGH(devInfoBlock*2) ; 6-17: devInfoBlock
ldi zl, LOW(devInfoBlock*2)
ldi r18, 12
rcall Utils_CopyFromFlash ; (R17, R18, X, Z)
bigcall Utils_CopyFromFlash ; (R17, R18, X, Z)
sbiw xh:xl, 20 ; go back to beginning of message (1 byte dst addr, 1 byte length, 18 bytes payload)
rcall NETMSG_CalcAndAddChecksumByte ; (R16, R17, R18, R19, R20, X)
sbiw xh:xl, 21 ; go back to beginning of message (1 byte dst addr, 1 byte length, 18 bytes payload, 1 byte crc)