Skip to main content

An application for streamlining development with ESP chips.

Project description

ESP Helper

Description

ESP Helper is designed to streamline the development process with ESP32 and ESP8266 boards by simplifying common tasks. In its default run mode, ESP Helper takes a serial port as an argument as well as the chip type, and attempts to flash all files from ./scripts to the device. Enhancing this feature is the ability to swap environment variables in the script prior to flashing, enabling the use of different variable sets for staged deployments. Additionally, ESP Helper can erase and flash the firmware of the device, with the default behavior being to automatically attempt to download the latest firmware from micropython.org.

Usage

Usage: main.py [OPTIONS] SERIAL_PORT

Options:
  --baud-rate INTEGER     Baud rate for the serial communication (default:
                          115200)
  --scripts-path TEXT     Absolute path to the directory that holds the
                          scripts to flash.
  --chip [ESP32|ESP8266]  Specify the chip type (ESP32 or ESP8266)  [required]
  --new-firmware          Erase and flash firmware. If --firmware-file is not
                          specified, this script will attempt to download the
                          latest firmware from micropython.org
  --firmware-file TEXT    Path to Micropython firmware bin to flash
  --write-env-vars        Overwrite environment variables in the script
                          (os.environ['ENV_VAR']) with local environment
                          variables
  --help                  Show this message and exit.

Default Operation

The default operation of the script is to attempt to flash all files from the ./scripts directory to the specified chip on the specified port.

Environment Variable Substitution

When the --write-env-vars flag is used, ESP Helper will replace instances of os.environ['VARIABLE'] with the environment variable of the same name. The modified script is written to a temp file before being flashed and cleaned up.

This feature can be leveraged to apply different variable sets for different environments, allowing for staged deployments.

Erase and Flash Firmware

The --new-firmware flag causes the script to erase the current firmware and flash new firmware. If --firmware-file is not specified, the script will attempt to download the latest .bin firmware from micropython.org.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esp_helper-0.0.5.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

esp_helper-0.0.5-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file esp_helper-0.0.5.tar.gz.

File metadata

  • Download URL: esp_helper-0.0.5.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for esp_helper-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5481027c6457d099e49ede9358d181a161023343aecd029f5b4f0ab3f7e74aeb
MD5 9eb97581a63fb75862c0893b36e42e5f
BLAKE2b-256 adba5b8c73e4c9da110b9551c3f94ab6c64afed7fdcae161a46f9439e776d3d6

See more details on using hashes here.

File details

Details for the file esp_helper-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: esp_helper-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for esp_helper-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 91418bf0919b23bf4a36d9afa99a757cc20b2b1df55204e26f5d3a483f04b34e
MD5 a6841af34afe816f8a99f8968e3874dd
BLAKE2b-256 c85578b4938706989550f55bf9958a7435161c84262f0cf9f9106d6cffecb35e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page