Checksum Over Flash Region
Compute a 32-bit additive checksum over a flash region in assembly, processing four bytes at a time and handling a non-multiple-of-four length.
Constraints
- r0 = start address, r1 = length in bytes, result in r0.
- Sum 32-bit words while at least 4 bytes remain.
- Sum any trailing bytes individually.
- Wrapping addition is intended, not an error.
- A length of 0 returns 0.
- No calls to C.
1.global flash_checksum2flash_checksum:3 @ r0 = address, r1 = length4 @ TODO5 bx lr