Skip to content

Command Build & Flash fail in monitor (IDFGH-6805) #8432

@HiFiPhile

Description

@HiFiPhile

Environment

  • Development Kit: [ESP32-C3-DevKitM-1]
  • Kit version (for WroverKit/PicoKit/DevKitC): [v1]
  • IDF version (run git describe --tags to find it):
    v5.0-dev-1599-gb66cc63c41
  • Build System: [df.py]
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    (crosstool-NG esp-2021r2-patch2) 8.4.0
  • Operating System: [Windows]
  • (Windows only) environment type: [ESP Command Prompt].
  • Using an IDE?: [No]
  • Power Supply: [USB]

Problem Description

Both idf.py -p COM7 monitor and idf.py -p COM7 flash can be run succesfully.

Launch idf.py -p COM7 monitor, command Ctrl+F Build & flash project fail in monitor.

Running C:\Tool\esp-idf\python_env\idf5.0_py3.9_env\Scripts\python.exe E:\mcu\esp-idf\tools\idf.py -p COM7 flash...
Option "port" provided for "flash" is already defined to a different value. This option can appear at most once in the command line.
--- Build failed
--- Press Ctrl+] to exit monitor.
--- Press Ctrl+F to build & flash project.
--- Press Ctrl+A to build & flash app.
--- Press any other key to resume monitor (resets target).

Then I modified idf.py to print the value:

 if global_value != default and local_value != default and global_value != local_value:
                            raise FatalError(
                                'Option "%s" provided for "%s" is already defined to a different value. '
                                'Local : %s ; Global : %s '
                                'This option can appear at most once in the command line.' % (key, task.name, local_value, global_value))

Which get :

Option "port" provided for "flash" is already defined to a different value. Local : \\.\COM7 ; Global : COM7 This option can appear at most once in the command line.

Turns out \\.\ is not correctly handled inside the script.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions