Windows Environment Flash Issue Under Eclipse
Posted: Wed May 24, 2017 12:31 am
For some weeks now, I’ve been beating my head against an environmental problem with the ESP32 environment on Windows 7, and I was hoping that someone here might be able to give me a pointer in the right direction.
I’ve set up the pre-packaged msys2 environment and toolchain release from March 30th, and git cloned the latest esp-idf (as late as yesterday), and installed eclipse neon, all according to the latest instructions.
Everything works well, with only one exception, I cannot make flash from within eclipse. It does work from the msys32 built in command window.
What I get on the eclipse console when doing a “make flash” target is the following:
I know that this is a problem on my development environment, as I have used the same setup files and instructions on a second PC, and it builds properly from eclipse on that machine.
The msys32 environment seems very self-contained, and even more so from eclipse, where the path is set to only directories under the msys2 environment, but something is throwing off the make flash target, and it would seem to be deep in the guts of python (my guess is its somewhere in loading its internal security modules), where I have no experience.
The principle differences between the machine were it works and the one which fails is that the machine which fails:
1. Had a standalone python 2.7 environment installed on it, which has since been removed, and rebooted, but the problem remains.
2. Has a GIT windows client installed on it.
3. Has the self-contained esp8266 development environment installed on it under c:/MinGW and an older version of eclipse.
I would appreciate any advice on what to do next or if anyone else has seen this problem.
Thanks.
I’ve set up the pre-packaged msys2 environment and toolchain release from March 30th, and git cloned the latest esp-idf (as late as yesterday), and installed eclipse neon, all according to the latest instructions.
Everything works well, with only one exception, I cannot make flash from within eclipse. It does work from the msys32 built in command window.
What I get on the eclipse console when doing a “make flash” target is the following:
I get this same problem under the new python script under eclipse, as well as under the previous shell script invoked from eclipse. All was set up according to the latest instructions online (last try yesterday)....
make[1]: Entering directory 'C:/msys32/home/Marcus/esp/hello_world/build/xtensa-debug-module'
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 147, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "C:\msys32\mingw32\lib\python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
File "C:/msys32/home/Marcus/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2349, in <module>
_main()
File "C:/msys32/home/Marcus/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2342, in _main
main()
File "C:/msys32/home/Marcus/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 2100, in main
operation_func(esp, args)
File "C:/msys32/home/Marcus/esp/esp-idf/components/esptool_py/esptool/esptool.py", line 1626, in write_flash
calcmd5 = hashlib.md5(image).hexdigest()
AttributeError: 'module' object has no attribute 'md5'
make: *** [/home/Marcus/esp/esp-idf/components/esptool_py/Makefile.projbuild:53: flash] Error 1
make[1]: Leaving directory 'C:/msys32/home/Marcus/esp/hello_world/build/xtensa-debug-module'
I know that this is a problem on my development environment, as I have used the same setup files and instructions on a second PC, and it builds properly from eclipse on that machine.
The msys32 environment seems very self-contained, and even more so from eclipse, where the path is set to only directories under the msys2 environment, but something is throwing off the make flash target, and it would seem to be deep in the guts of python (my guess is its somewhere in loading its internal security modules), where I have no experience.
The principle differences between the machine were it works and the one which fails is that the machine which fails:
1. Had a standalone python 2.7 environment installed on it, which has since been removed, and rebooted, but the problem remains.
2. Has a GIT windows client installed on it.
3. Has the self-contained esp8266 development environment installed on it under c:/MinGW and an older version of eclipse.
I would appreciate any advice on what to do next or if anyone else has seen this problem.
Thanks.