|
這個不用問吧,不把原來的數據覆蓋掉
是要怎樣寫入新數據?
但是,若先前燒了個 5kb 的程式進去,
後來再燒個 1kb 的程序進去,可以
預料前面的 1kb(至少)會被覆蓋,但
其他 4kb 的資料可能還會殘存,只是
在程式碼的運作上它們永遠沒機會
被執行(能執行就出事了)
avrdudess 有個 erase flash & EEPROM
的執行參數 -e ,可以看看燒錄時是否有用
上這個參數:
-e
Causes a chip erase to be executed. This will reset the contents of the flash ROM and EEPROM to the value ‘0xff’, and clear all lock bits. Except for ATxmega devices which can use page erase, it is basically a prerequisite command before the flash ROM can be reprogrammed again. The only exception would be if the new contents would exclusively cause bits to be programmed from the value ‘1’ to ‘0’. Note that in order to reprogram EERPOM cells, no explicit prior chip erase is required since the MCU provides an auto-erase cycle in that case before programming the cell. |
|