BigBoss21X / mega-isp

Automatically exported from code.google.com/p/mega-isp
0 stars 0 forks source link

Compare Fail if you use -D option to not erase before write #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Flash with avrdude and the -D option to not erase before
2. during verify an error of compare appear

What is the expected output? What do you see instead?
Using -D option is not affecting the result

Original issue reported on code.google.com by occhiobe...@gmail.com on 17 Nov 2011 at 8:31

GoogleCodeExporter commented 8 years ago
These are two hex file the lamp.hex is the program that I want to flash and his 
result after a flash with -D

They are similar but not equal!

Original comment by occhiobe...@gmail.com on 17 Nov 2011 at 8:59

Attachments:

GoogleCodeExporter commented 8 years ago
You have to erase the flash before you can reprogram it. Why would you not 
erase the flash?

Original comment by rsb...@gmail.com on 19 Nov 2011 at 9:44

GoogleCodeExporter commented 8 years ago
That's strange, Arduino upload programs with a "-D" option, always, before 
programming. It is so wrong with flash?

Original comment by occhiobe...@gmail.com on 19 Nov 2011 at 1:37

GoogleCodeExporter commented 8 years ago
Without "-D" avrdude erase flash AND EEPROM, with my radio Turnigy 9X I have to 
setup again all my parameter.

Original comment by occhiobe...@gmail.com on 19 Nov 2011 at 2:16

GoogleCodeExporter commented 8 years ago
Before new contents can be written to the Flash Program Memory, the memory has 
to be
erased. Without erasing, it is only possible to program bits in Flash memory to 
zero, not selectively setting a bit to one. 

Arduino is a special case. What you're seeing is expected behavior.

Original comment by rsb...@gmail.com on 20 Nov 2011 at 4:31

GoogleCodeExporter commented 8 years ago
It is possible to erase only a page (256byte) before writing it without erasing 
all flash AND eeprom?

Original comment by occhiobe...@gmail.com on 20 Nov 2011 at 8:22

GoogleCodeExporter commented 8 years ago
Not with SPI programming. There is only one 'erase' command, to erase the whole 
chip. Arduino uses self-programming which does allow 'erase page' for flash. 
You'd have to install a bootloader on the mega8 chip to get this feature. 
Alternatively you could store a copy of the eeprom with your settings on it and 
then restore it each time you reflash the chip.

Original comment by rsb...@gmail.com on 21 Nov 2011 at 1:52