Input file matching full data flash size is rejected
sim- opened this issue · comments
Simon Kirby commented
Hello! I tried to use rl78flash to send a 16kB .srec file to an R5F102AAA micro, and rl78flash bailed with just an error "Read failed". I added some more debugging and found that srec_read() was failing because address + data_length equalled CODE_OFFSET + code_len, but the condition did not allow for the equals case. Is this because it was supposed to match the data segment instead in some cases?
Probably these checks should change to data_length - 1, since writing one byte is really only updating the byte at CODE_OFFSET, not it and the one after.
Maksim Salau commented
Thank you for feedback.
I'll verify the issue shortly and fix it.