platformiofirmwarenamechange
link: https://docs.platformio.org/en/stable/scripting/examples/custom_program_name.html
Sometimes it is useful to have a different firmware/program name in build_dir. The following example uses Custom options in platformio.ini and adds a project version suffix to the firmware name.
platformio.ini:
[env:env_custom_prog_name]
platform = platformio/espressif32
framework = arduino
board = esp32dev
build_flags =
-DVERSION=${this.custom_prog_version}
extra_scripts = pre:extra_script.py
custom_prog_version = 1.2.3
then in extra_script.py (save in where platformio.ini is):
Import("env")
env.Replace(PROGNAME="firmware_%s" % env.GetProjectOption("custom_prog_version"))
platformiofirmwarenamechange.txt · Last modified: by 127.0.0.1
