avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #22883] Chip Erase performed even with no-write flag


From: anonymous
Subject: [avrdude-dev] [bug #22883] Chip Erase performed even with no-write flag (-n)
Date: Wed, 09 Apr 2008 17:31:39 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

URL:
  <http://savannah.nongnu.org/bugs/?22883>

                 Summary: Chip Erase performed even with no-write flag (-n)
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: Mittwoch 09.04.2008 um 17:31 UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Thomas Holland
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

While the -n flag prevents avrdude from writing anything to the flash memory,
it will nevertheless happily do a chip erase. 

This is somewhat unexpected, as the docs state that -n "disables actually
writing data to the MCU". I would consider filling the memory with 0xff very
much as writing to the MCU.

Below is a small patch to prevent the chip erase when the -n option has been
selected.

brgds

Thomas

Index: main.c
===================================================================
RCS file: /sources/avrdude/avrdude/main.c,v
retrieving revision 1.131
diff -u -r1.131 main.c
--- main.c      8 Nov 2007 22:34:36 -0000       1.131
+++ main.c      9 Apr 2008 17:29:42 -0000
@@ -1015,7 +1015,7 @@
   }
 
 
-  if (erase) {
+  if (erase && !nowrite) {
     /*
      * erase the chip's flash and eeprom memories, this is required
      * before the chip can accept new programming






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?22883>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]