duff2013 / ulptool

Program the esp32 ULP coprocessor in Arduino
272 stars 66 forks source link

Add setup_ulp.py script - python 3 compatibility - core version detection #19

Closed Vincent-Stragier closed 5 years ago

Vincent-Stragier commented 5 years ago

Main goals

Add python 3 compatibility for all OS and for all the core version of the ESP32 for the Arduino IDE

setup_ulp.py

Script able to install the duff2013/arduino_ulp files and a specific version (see script) of binutils for the esp32. It detect core version according to the name of a directory:

    ## Find and print the core version
    core_version = os.listdir(os.path.join(wdir,'hardware','esp32'))[0]
    print("ESP32 core version: " + core_version)

It do the trick, but may not works if you have more than one version of the core.

Works under Windows 10 and is able to overwrite an older installation of the arduino_ulp and binutils components.

Has to be tested under Linux and Mac OS for python 2 and 3. Let me know if it works.

Scripts in the 'ulp' directory

Add python 3 compatibility. Seems to work only for the README.ino sketch under Windows 10, python 2.7.14 and python 3.7.0 but not for adc (need to test more sketches) with the same conditions.

Add core detection

Again it need to be tested under others OS and with python2 and 3.

duff2013 commented 5 years ago

Thanks for the pull, right now I'm reorganizing the directory structure so it will be easier and less error prone when manually installing. I am also going to rename this project to "ulptool", a better reflection of what it actually is and to conform to the esp maintainers naming conventions. I have gone over some of your changes and I do want incorporate them but this pull will need to redone after I rename the repository and finalize the directory stuff or I can just incorporate them into my repository manually. I would like for you to get credit on Github so maybe wait until I make these changes and then you can redo your pull after?

Vincent-Stragier commented 5 years ago

I can redo the pull later. I will close this one.