Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TW#26745] ESPPORT not being forwarded properly #2553

Closed
sysprogs opened this issue Oct 12, 2018 · 0 comments
Closed

[TW#26745] ESPPORT not being forwarded properly #2553

sysprogs opened this issue Oct 12, 2018 · 0 comments

Comments

@sysprogs
Copy link

Currently CMake-based ESP-IDF does not properly handle the ESPPORT environment variable.
It happens due to the following line in run_esptool.cmake:

if(NOT ENV{ESPPORT})
    message("Note: esptool.py will search for a serial port. To specify a port, set the ESPPORT environment variable.")
else()
    set(port_arg "-p $ENV{ESPPORT}")
endif()

As something like "COM1" is not a valid boolean expression from CMake's point of view, the "NOT" branch is taken even if the environment variable is set.

You can fix it by using the following check instead:
if("$ENV{ESPPORT}" STREQUAL "")

@Alvin1Zhang Alvin1Zhang changed the title ESPPORT not being forwarded properly [TW#26745] ESPPORT not being forwarded properly Oct 14, 2018
@igrr igrr closed this as completed in 897670b Oct 18, 2018
catalinio pushed a commit to catalinio/pycom-esp-idf that referenced this issue Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant