File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,24 @@ To upload EEPROM data (from EEMEM directive) you need to use ``uploadeep``
194194target instead ``upload `` for :option: `pio run --target ` command.
195195For example, ``pio run -t uploadeep ``.
196196
197+ Erase chip before programming
198+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199+
200+ In some cases erasing chip memory is a mandatory procedure before uploading bootloader
201+ or setting fuses. AVRDUDE provides a special flag ``-e `` that causes a chip erase to be
202+ executed. This will reset the contents of the flash ROM and EEPROM to the value ``0xff ``,
203+ and clear all lock bits. The easiest way to use it is to add this flag via the
204+ :ref: `projectconf_upload_flags ` option:
205+
206+ .. code-block :: ini
207+
208+ [env:uno]
209+ platform = atmelavr
210+ framework = arduino
211+ board = uno
212+ upload_flags =
213+ -e
214+
197215 Fuses programming
198216~~~~~~~~~~~~~~~~~
199217
Original file line number Diff line number Diff line change @@ -117,22 +117,6 @@ This option can also be set by global environment variable
117117
118118Please specify each flag/option in a new line starting with minimum 2 spaces.
119119
120- Here are a few examples for the ``AVRDUDE `` tool used in Atmel-based platforms:
121-
122- 1. Enable verbose output and erase chip before uploading
123-
124- .. code-block :: ini
125-
126- [env:atmega4809]
127- platform = atmelmegaavr
128- board = atmega4809
129- framework = arduino
130- upload_flags =
131- -V
132- -e
133-
134- 2. Configure upload settings and set fuses
135-
136120.. code-block :: ini
137121
138122 [env:atmega328pb]
You can’t perform that action at this time.
0 commit comments