-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Add support to use AVR dude to upload .eep files on sketch upload #4963
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
Conversation
added parameter for write eeprom from eep file
This (IMO) will need to be implemented with a switch in the settings. It is fairly well accepted that while using the IDE, what you place in the EEPROM while a sketch is running will stay there when you upload the next version of your code. The attribute It definitely would be a good feature to have. For one my As it is an AVR specific switch, careful consideration of where to put it in the IDE may be required. |
Well, this is good "chicken / egg" question. Searching forums I found lot of questions why arduino not uploading those eep files. Once you would like to be conservative, then here can be configuration in prefferences.txt with default "false". Then you will see reaction of users. Or from the other hand - default for platform.txt can be empty "tools.avrdude.upload.params.uploadeep" with some comment how to set it for enable uploading. |
You wont find questions arguing the former, due to it being accepted, and widely known. Arduino is a large platform, so a number of questions still only represents a small number of the total user base. |
Hi @fulda1, I am trying this change out with my Uno and the eeprom_read.ino example sketch. However, when I add the following to the sketch:
The uploading with verbose logging outputs:
Based on the following forum post, the optiboot boot loader for the Uno does not contain support for write EEPROM data with AVR dude: http://forum.arduino.cc/index.php?topic=335117.msg2310790#msg2310790 Which board have you been testing with? Note: If the sketch contains no
|
Hello sandeepmistry, I'm using default boot loader I received in my boards from china. I'm using Nano and Pro Mini boards (variety of, from various suppliers). All of them (minimum 3 types tested) support upload of eeprom. Regarding empty eep file - yes, that is why I was added condition for minimum file size 13 octets, because empty intel hex file not mean 0 file size. |
Hi @fulda1, I was able to do some more tests and have this patch working with my Leonardo and Mega 2560 boards. However, still no success with the Uno. I now understand why you check the minimum file size, AVR dude hangs if it tries to write a zero length .eep data:
Since this feature doesn't work with the Uno, and might be incompatible with other official Arduino boards I'm thinking it needs to be board specific now. |
Or it is possible it is specific for bootloader version or for MCU version. I have only 328 types and no 168. |
IIRC optiboot does not support writing to EEPROM when compiled with the default options. I guess you could be seeing this, since I think the Uno uses optiboot, but the Mega2560 does not? |
This should also be an option in the menus. Like where you can choose the native/programming usb for Due, this could also be a board specific option. If it is enforced, there isn't an easy way to update an AVR program that has data already in the EEPROM. For building/debugging purposes this is really working against the user. I mean, lets face it, people do not use the EEPROM for static data. Maybe for boards that support it, show an additional upload button with some nice modification to the graphic. This can signify upload EEPROM data as well. Although, it would be better suited as a board specific menu item though as there are now probably more boards supported by the IDE, than the AVR's with EEPROM (or at least will be in the future). |
Squash and rebase of arduino/Arduino#4963
I'm closing the issue here; if anyone wants to adopt this functionality (after carefully testing it with latest avrdude and a range of official boards) please reopen it using this link https://github.com/arduino/ArduinoCore-avr/compare/pr_4963 |
Hello,
I'm not good in java programming and using github, but I would like to present small update for uploadre to recognize new eep file and upload them to eeprom of arduino. See bug #1318 https://github.com/arduino/Arduino/issues/1318
It is necessary to extract also SerialUploader.java from my patch-1