Skip to content

Latest commit

 

History

History
193 lines (112 loc) · 10.3 KB

README.md

File metadata and controls

193 lines (112 loc) · 10.3 KB


python3.x Documentation Status GPLv3 license Open Source? Yes!

Getting Started


(flash 2.1) is a free software which allows the user to access, flash and erase the ESP32 and ESP8266 internal memory. Meanwhile , flash introduces the set of features mentioned in the sections below.

Features


Serial Port

The serial port is selected using the ComboBox Designated Serial Port, like COM1 (Windows). If no option is specified,esptool will enumerate all connected serial ports and try each one until it finds an Espressif device (ESP32 or ESP8266) connected.

Baud Rate

The default baud rate is 115200bps. Different rates may be set using the Baud Rate ComboBox. This can speed up writing and reading flash operations.The baud rate is limited to 115200 when initial connection is established,higher speeds are only used for data transfers. Most hardware configurations will work with 230400, some with 460800, 921600 and/or 1500000 or higher.If you have connectivity problems then you can also set baud rates below 115200. You can also choose 74880, which is the usual baud rate used by the ESP8266 to output boot log information.

Flash Firmware/Bootloader

Binary data (Multiple flash addresses and file)can be written to the ESP's flash chip. The chip selection is optional when writing to ESP flash, as it will be detected when it connects to the serial port.The offset (address) and file name are crucial for this operation.

The file names created by "ELF to Bin" include the flash offsets as part of the file name. For other types of images, consult your SDK documentation to determine the files to flash at which offsets.Numeric values passed as offset address can only be specified in hex (ie 0x1000).

Setting Flash Mode and Size

You may also need to specify flash mode and flash size, if you wish to override the defaults.

Compression

By default, the serial transfered data is compressed by esptool.py for better performance.

Read Flash Contents

The Read flash feature allows reading back the contents of flash. for that you need to specify an address, a size, and a filename to dump the output to.

Erase Flash & erase region

To erase the entire flash chip (all data replaced with 0xFF bytes) To erase a region of the flash, for example starting at an address (ie 0x20000)with a length (ie 0x4000 bytes) (16KB) The address and length must both be multiples of the SPI flash erase sector size. This is 0x1000 (4096) bytes for supported flash chips.

Convert ELF to Binary

Converts an ELF file into the binary executable images which can be flashed and then booted into the chip. This command does not require a serial connection.

Output bin image details

The image info outputs some information (load addresses, sizes, etc) about a .bin file.

Verify flash

Allows you to verify that data in flash matches a local file. Additional verification is not usually needed. However, if you wish to perform a byte-by-byte verification of the flash contents then you can do so with this feature.

Dump Memory

Will dump a region from the chip's memory space to a file.

load RAM

Allows the loading of an executable binary image directly into RAM, and then immediately executes the program contained within it.The binary image must only contain IRAM- and DRAM-resident segments. Any SPI flash mapped segments will not load correctly and the image will probably crash. The image info can be used to check the binary image contents.

Read / write Memory

The read & write Memory allow reading and writing single words (4 bytes) of RAM. This can be used to "peek" and "poke" at registers.

Read flash status

Intended for use when debugging hardware flash chip-related problems. It allows sending a RDSR, RDSR2 and/or RDSR3 command to the flash chip to read the status register contents. This can be used to check write protection status. The bytes number determines how many status register bytes are read:

  • bytes 1 sends the most common RDSR command (05h) and returns a single byte of status.
  • bytes 2 sends both RDSR (05h) and RDSR2 (35h), reads one byte of status from each, and returns a two byte status.
  • bytes 3 sends RDSR (05h), RDSR2 (35h), and RDSR3 (15h), reads one byte of status from each, and returns a 3 byte status.

Write flash status

Intended for use when debugging hardware flash chip-related problems. It allows sending WRSR, WRSR2 and/or WRSR3 commands to the flash chip to write the status register contents. This can be used to clear write protection bits. The bytes option is similar to the corresponding option for read flash status and causes a mix of WRSR (01h), WRSR2 (31h), and WRSR3 (11h) commands to be sent to the chip. If bytes 2 is used then WRSR is sent first with a 16-bit argument and then with an 8-bit argument. Otherwise, each command is accompanied by 8-bits of the new status register value.

Chip Id

Allows you to read a 4 byte ID which forms part of the MAC address.

Efuse Table

The efuse tab introduced in flash makes it easier to display and burn any efuse without having to go through a long summary in a terminal. Also having as a simple security layer , a dialog that prevents you from making any unwanted burn operation, makes it safer than the traditional ways.

Export Efuse

You can now export the efuse table with all the values and states to an excel (xls) file.

Dependencies


flash uses a number of open source projects and libraries to work properly:

Download


flash itself is open source with a public repository on GitHub.You can also download the LTS (release).

Or simply by cloning the repository to your machine :

  git clone https://github.com/Gueni/flash.git

Installation


flash requires Python 3 to run.

Install python 3 from https://www.python.org/download/releases/3.0/

Install PyQt5 from https://pypi.org/project/PyQt5/

    pip install pyqt5

How to launch

    python3 main.py

or simply download the latest release : (Latest Release)

To do

  • Optimize the Efuse feature.
  • Enhance UI/UX.
  • More Interactive Help Section.
  • Secure Boot Feature.
  • A dedicated Firmware merge library for ESP32.
  • more file type choices for efuse export.

Copyright and Licensing


Licensed under the GNU General Public License, Version 3.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at GNU.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.