-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NewEEPROMClass - wrong use of ARIADNE_SIGPOS [ EEPROM_IMG_STAT @ pos 2 ] #25
Comments
About ARIADNE_OFFSET, I don't see an error, the last used address is 63, which means 64 is the first one we can write into, which in hex is 0x40. Am I missing something? About ARIADNE_SIGPOS, yes, you are right that it is used for determining both the correct upload and the existence of ariadne in the chip. The reason that happens is because if the sketch was uploaded by ariadne, the value in ARIADNE_SIGPOS should be set to ARIADNE_SIGVAL, otherwise either it was not uploaded by ariadne or it wasn't uploaded correctly, in which case we either don't care about the ariadne settings or they won't be accessed at all respectively. At least that is what i was thinking back then. Do you have a different use case where this behaviour is causing you problems? |
oops.. my bad about the 0x40 :( ARIADNE_SIGPOS - if you are using NewEEPROM, it is because you want the "protection" of the first 0x40 bytes. isn't it ? At the end, you are right, that it will not cause a "real life" problem. |
Well, I agree that it is ugly, but it was good enough. The proper solution would be to have a .text area in the bootloader, like the version of the bootloader or a magic string, which then can be tested. Actually optiboot does it that way, but I never got around doing it in ariadne as I couldn't figure out, at the time, some compilation error involving it, and then it just faded from my memory. |
we can remove the conditioned protection and always use the offset of 0x40 bytes if NewEEPROMClass is used. or we can close the issue and forget about it. |
the code below seem wrong to me.
ARIADNE_SIGPOS which is the same as EEPROM_IMG_STAT from neteeprom.h, use as status, if the image uploaded by the booloader is OK or not.
While in the below code, it look like it is used as if the ARIADNE boolader itself is been used... in the system, and if not use all the EEPROM (start from offset 0).
byw: the ARIADNE_OFFSET also seem not right. in neteeprom.h, last used eeprom address is 63.
The text was updated successfully, but these errors were encountered: