adafruit / adafruit/Adafruit_Learning_System_Guides

ArduinoISP.ino does not properly handle word-based address for EEPROM read/write

Open
#2,186 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.1k
Forks
806
Avg merge
16h 52m
Merged PRs (30d)
11

Description

**Steps to reproduce**
Reading and writing EEPROM using Adafruit ArduinoISP.ino will cause Bad EEPROM data. The official Arduino [ArduinoISP.ino](https://github.com/arduino/arduino-examples/tree/main/examples/11.ArduinoISP/ArduinoISP) does not have similar issue. See avrdudes/avrdude/issues/990

**Possible solution**
The read and write EEPROM function does not handle word-based address. The high address byte is 0x00 in both function.
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/0090edd636158f91e5356d7806f3f21cea0c9cde/ArduinoISP/ArduinoISP/ArduinoISP.ino#L550-L557
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/0090edd636158f91e5356d7806f3f21cea0c9cde/ArduinoISP/ArduinoISP/ArduinoISP.ino#L487-L496

Contributor guide

No contributing guide indexed for this repository

Research direction

Open ArduinoISP/ArduinoISP.ino and inspect the EEPROM read and write functions at the linked lines 550-557 and 487-496. Compare their address handling with the official ArduinoISP.ino, then reproduce EEPROM reads and writes to verify that word-based addresses no longer produce bad data.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.