duff2013 / ulptool

Program the esp32 ULP coprocessor in Arduino
278 stars 69 forks source link

can not compile (esp32 dev module) #12

Closed MohammedZwayen closed 5 years ago

MohammedZwayen commented 5 years ago

i installed latest esp32 core files (1.0.1-rc2) by board manager i tried to compile the example in readme page but i got this error :

Archiving built core (caching) in: C:\Users\HP\AppData\Local\Temp\arduino_cache_2759\core\core_esp32_esp32_esp32_PSRAM_disabled,PartitionScheme_no_ota,FlashMode_qio,FlashFreq_80,FlashSize_4M,UploadSpeed_921600,DebugLevel_none_04ce2202089ddf708ce82231010a10d0.a File "C:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 85

print "No ULP Assembly File(s) Detected..."

                                          ^

SyntaxError: invalid syntax

exit status 1 Error compiling for board ESP32 Dev Module.

i am not expert in python but i think the error pointing to print function i have python 3.7 installed in my windows 64bit machine

per1234 commented 5 years ago

That code is written for Python 2. To use with python 3, it should look like: python print("No ULP Assembly File(s) Detected...")

duff2013 commented 5 years ago

Yes I wrote it for python 2. Also I've had many people say that installing esp32 core from the board manager gives them errors too. I used the manual install described here.

MohammedZwayen commented 5 years ago

Thank you for fast answer I change print function to become ptint( ) in version 3.7 but i got anathor errors so I revert to python version 2.7.0 but i still got some script errors Is their any chance to makw it work with esp32 core from board manager ?

duff2013 commented 5 years ago

I have been wanting just haven't looked at it yet, will do sometime soon.

SensorsIot commented 5 years ago

I also have problems with ESP32 version 1.01-RC2 installed by the boards manager:

File "C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 89, in main build_ulp(bpath, ppath, ulp_files, board_options) File "C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 105, in build_ulp

proc = subprocess.Popen(cmd[1],stdout=subprocess.PIPE,stderr=subprocess.STDOUT,shell=False)

File "C:\Python27\lib\subprocess.py", line 711, in init errread, errwrite) File "C:\Python27\lib\subprocess.py", line 948, in _execute_child startupinfo) WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden

I assume it has to do with the path. You see where the IDE installs the files (C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/

MohammedZwayen commented 5 years ago

@SensorIot mr.andreas since you have very long experince in esp32 have you noticed any other solution ?

SensorsIot commented 5 years ago

No. duff2013 did a great job, I think. Unfortunately, I am not good at Python to fix the issue. So we have to wait. I plan a video on it ;-)

SensorsIot commented 5 years ago

I did some further investigations (not exactly knowing what I do). I installed the new rc2 environment and "transplanted" the lines of code which were different from duff2013's platform.txt. Now I am stuck with the linker (I also had to put the ulp_main.ld in the \sdk\ld\ directory). Now I get syntax errors in the upl_main.ld file and have to give up :-(

duff2013 commented 5 years ago

I started looking at this last night and its most likely just path issues I hope.

My goal is to make a little script that will install all this for you but that won't be for awhile so manual install will be necessary in the near future.

SensorsIot commented 5 years ago

That is ok as long as it works with the board manager installation. Most use now the new rc2 version and install it with the board manager. I try to make a video with some instructions if I get it running. Maybe you know my channel (Andreas Spiess)

duff2013 commented 5 years ago

I have seen a video or two and if want to do one on this that would be fine with me:) Hopefully will have a fix this weekend my main concern is making the same ulp python script work for both esp32 install methods.

SensorsIot commented 5 years ago

I would not concentrate too much on the "old one". I assume most will use the much easier and faster IDE method. BTW: I used the "old" method and it also did not work anymore. I assume they changed also to the rc2 release there...

duff2013 commented 5 years ago

The version I installed with the board manger says "version 1.0.0" and no other versions show up in the board manger to install so thats the one I'm working with. Hopefully tonight I'll have something for this in the interim but my goal is to simplify the process but the first run will be similar to the old ulp install method but for using the board manger esp32 core.

SensorsIot commented 5 years ago

I use this string in the "additional Boards Manager" : https://dl.espressif.com/dl/package_esp32_dev_index.json Then you get all releases.

duff2013 commented 5 years ago

Ah ok I see, it shouldn't matter unless they change how things get built but I don't think so. I have a fix for the board manger installed esp32 core but still want to change a few things and update the readme.

cedricwritescode commented 5 years ago

I installed everything new (Python 2.7, the latest Arduino IDE, manually installed the latest stable esp32-arduino release (1.0.0)). I have Windows 10. But I get this error when trying to compile the example sketch:

c:/users/cedric/documents/arduino/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: cannot find -lhttp_server

collect2.exe: error: ld returned 1 exit status

duff2013 commented 5 years ago

@Redstoned When I publish my "arduino_ulp" update you will have to use the Arduino Board Manger to install the esp32 core for it to work. My plan was to have the update published this last weekend but I still need to decide on a few things before I can publish it. I have decided that the manual esp32 core install will not be supported anymore because of support issues, my limited time and that is the preferred way to install esp32 core to Arduino now.

duff2013 commented 5 years ago

Ok I published it finally, didn't test it on Windows or Linux hoping you guys try it out let me know?

cedricwritescode commented 5 years ago

Setup steps step 3: Windows path is: C:\Users(user)\AppData\Local\Arduino15\packages\esp32

So I set up everything to this instruction but I get the same error as @SensorsIot :

Traceback (most recent call last):

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 407, in

main(sys.argv[1:])

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 93, in main

build_ulp(bpath, ppath, xpath, upath, ulp_files, board_options)

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 118, in build_ulp

proc = subprocess.Popen(cmd[1],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)

File "C:\Python27\lib\subprocess.py", line 672, in init

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 882, in _execute_child

startupinfo)

WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden

duff2013 commented 5 years ago

Can make "Show verbose output during" compilation is checked in your Arduino preferences and turn compiler warnings to "ALL" and show me the whole output.

cedricwritescode commented 5 years ago

Is that what You need?

duff2013 commented 5 years ago

Did you increase the ulp memory sdkconfig.h? The default is 512 try 1024.

cedricwritescode commented 5 years ago

I changed it to 1024 but I still get the error:

Unable to cache built core, please tell esp32 maintainers to follow http://goo.gl/QdCUjo python "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/config" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid/api" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_trace" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_update" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bootloader_support" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bt" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/driver" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp32" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_adc_cal" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_http_client" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp-tls" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ethernet" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/fatfs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/freertos" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/heap" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/jsmn" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/log" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mdns" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls_port" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nvs_flash" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/openssl" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spi_flash" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/sdmmc" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/smartconfig_ack" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spiffs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/tcpip_adapter" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/vfs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wear_levelling" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/xtensa-debug-module" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/coap" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/console" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/expat" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/json" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/lwip" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nghttp" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/soc" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wpa_supplicant" -b "C:\Users\cedric\AppData\Local\Temp\arduino_build_552450" -p "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0" -u "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\share/bin/" -x "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/" --DFCPU=240000000L --DARDUINO=10808 --DARDUINO=ESP32_DEV --DARDUINOARCH=ESP32 "--DARDUINO_BOARD=\"ESP32_DEV\"" "--DARDUINO_VARIANT=\"doitESP32devkitV1\"" ULP Assembly File(s) Detected: rtcio.s

Traceback (most recent call last):

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 407, in

main(sys.argv[1:])

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 93, in main

build_ulp(bpath, ppath, xpath, upath, ulp_files, board_options)

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 118, in build_ulp

proc = subprocess.Popen(cmd[1],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)

File "C:\Python27\lib\subprocess.py", line 672, in init

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 882, in _execute_child

startupinfo)

WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden

cedricwritescode commented 5 years ago

So to avoid errors, this line CONFIG_ULP_COPROC_RESERVE_MEM=1024

in this file:

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\tools\sdk

duff2013 commented 5 years ago

yes, it should say on the adc sketch comments to do that? I also deleted the super long error message just so everyone know.

cedricwritescode commented 5 years ago

I didn't see that. So I changed it to 2048 but I still get the same error compiling ulp_adc.

duff2013 commented 5 years ago

Can you try the README.ino example instead and only post the output from where it says detected ulp files? Also can you give me the whole path to the binutils folder on your system.

cedricwritescode commented 5 years ago

ULP Assembly File(s) Detected: ulp.s

Traceback (most recent call last):

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 407, in

main(sys.argv[1:])

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 93, in main

build_ulp(bpath, ppath, xpath, upath, ulp_files, board_options)

File "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 118, in build_ulp

proc = subprocess.Popen(cmd[1],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)

File "C:\Python27\lib\subprocess.py", line 672, in init

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 882, in _execute_child

startupinfo)

WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden

cedricwritescode commented 5 years ago

thats the path to binutils: C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils

duff2013 commented 5 years ago

can you tell me what files are in this directory: C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils\bin

Just tried it out on my Windows 7 machine it works fine. Seems like the python script can't find the binutils files. This is what my paths are on my machine:

platform.txt -> C:\Users\ULP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\

ulp folder -> C:\Users\ULP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\tools\sdk\include\ulp\

binutils bin folder -> C:\Users\ULP\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils\bin

cedricwritescode commented 5 years ago

I made a screenshot with the files in the according folder.

the platform.txt, ulp folder and binutils bin folder are in the same directory as you specified.

unbenannt

MohammedZwayen commented 5 years ago

I edited this to display relevant errors - duff

-my machine is widows7 64bit supported by python 2.7 -first of all I have changed line 19 in platform.txt to be like this (compiler.ulp.path={runtime.tools.esp32ulp-elf-binutils.path}/bin/) or you have to change file name to binutils ,the actual path and the one in platform.txt should be the same -second i changed line 303 in sdkconfig file to make ulp memory 2048 but I still got the same error shown in ide:

python "C:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py" -DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/config" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/bluedroid" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/bluedroid/api" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/app_trace" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/app_update" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/bootloader_support" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/bt" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/driver" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/esp32" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/esp_adc_cal" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/esp_http_client" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/esp-tls" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ethernet" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/fatfs" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/freertos" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/heap" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/jsmn" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/log" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/mdns" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/mbedtls" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/mbedtls_port" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/newlib" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/nvs_flash" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/openssl" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/spi_flash" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/sdmmc" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/smartconfig_ack" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/spiffs" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/tcpip_adapter" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/vfs" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/wear_levelling" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/xtensa-debug-module" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/coap" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/console" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/expat" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/json" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/lwip" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/newlib" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/nghttp" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/soc" "-IC:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/wpa_supplicant" -b C:\Users\HP\AppData\Local\Temp\arduino_build_926211 -p C:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2 -u C:\Users\HP\AppData\Local\Arduino15\packages\esp32\tools\esp32ulp-elf-binutils\share/bin/ -x C:\Users\HP\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/ --DFCPU=240000000L --DARDUINO=10804 --DARDUINO=ESP32_DEV --DARDUINOARCH=ESP32 --DARDUINO_BOARD="ESP32_DEV" --DARDUINO_VARIANT="esp32" ULP Assembly File(s) Detected: ulp.s

Traceback (most recent call last):

File "C:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 407, in

main(sys.argv[1:])

File "C:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 93, in main

build_ulp(bpath, ppath, xpath, upath, ulp_files, board_options)

File "C:\Users\HP\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1-rc2/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 118, in build_ulp

proc = subprocess.Popen(cmd[1],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)

File "C:\Python27\lib\subprocess.py", line 672, in init

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 882, in _execute_child

startupinfo)

WindowsError: [Error 2] The system cannot find the file specified

exit status 1 Error compiling for board DOIT ESP32 DEVKIT V1.

I made little search for this kind of python error(I am not a python expert ) it seems like python bug,may be this page could be helpful : (https://bugs.python.org/issue17023)

how can we solve the quote issue in the ULP code as the link suggest because the python had not fixed it yet and will not soon as it seem?

duff2013 commented 5 years ago

@MohammedZoen just replace platform.txt with the one you downloaded what you edited won't work.

duff2013 commented 5 years ago

and also you have to make directory called "binutils" in C:\Users\HP\AppData\Local\Arduino15\packages\esp32\tools\

and then put the "esp32ulp-elf-binutils" folder in that so your final path is: C:\Users\HP\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils

duff2013 commented 5 years ago

Here is a pic of the "tools" folder: tools

Here is pick of the "binutils" folder: binutils

cedricwritescode commented 5 years ago

Now it compiles for me. I tested the example as well as ulp_tsens and it works but the log still says it couldn't cache it.

Unable to cache built core, please tell esp32 maintainers to follow http://goo.gl/QdCUjo python "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/config" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid/api" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_trace" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_update" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bootloader_support" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bt" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/driver" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp32" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_adc_cal" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_http_client" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp-tls" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ethernet" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/fatfs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/freertos" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/heap" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/jsmn" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/log" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mdns" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls_port" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nvs_flash" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/openssl" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spi_flash" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/sdmmc" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/smartconfig_ack" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spiffs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/tcpip_adapter" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/vfs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wear_levelling" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/xtensa-debug-module" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/coap" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/console" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/expat" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/json" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/lwip" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nghttp" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/soc" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wpa_supplicant" -b "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251" -p "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0" -u "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/" -x "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/" --DFCPU=240000000L --DARDUINO=10808 --DARDUINO=ESP32_DEV --DARDUINOARCH=ESP32 "--DARDUINO_BOARD=\"ESP32_DEV\"" "--DARDUINO_VARIANT=\"doitESP32devkitV1\"" ULP Assembly File(s) Detected: ulp.s

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -MMD -MP -DWITH_POSIX -DMBEDTLS_CONFIG_FILE=mbedtls\esp_config.h -DHAVE_CONFIG_H -MT ulp.ulp.o -E -P -xc -o ulp.ulp.pS -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/config -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid/api -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_trace -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_update -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bootloader_support -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bt -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/driver -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp32 -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_adc_cal -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_http_client -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp-tls -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ethernet -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/fatfs -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/freertos -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/heap -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/jsmn -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/log -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mdns -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls_port -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nvs_flash -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/openssl -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spi_flash -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/sdmmc -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/smartconfig_ack -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spiffs -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/tcpip_adapter -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/vfs -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wear_levelling -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/xtensa-debug-module -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/coap -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/console -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/expat -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/json -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/lwip -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nghttp -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/soc -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wpa_supplicant -DFCPU=240000000L -DARDUINO=10808 -DARDUINO=ESP32_DEV -DARDUINOARCH=ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -I C:\Users\cedric\AppData\Local\Temp\arduino_build_372251\sketch -DASSEMBLER ulp.s

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/esp32ulp-elf-as -al=ulp.ulp.lst -o ulp.ulp.o ulp.ulp.pS

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-gcc -DESP_PLATFORM -MMD -MP -DWITH_POSIX -DMBEDTLS_CONFIG_FILE=mbedtls\esp_config.h -DHAVE_CONFIG_H -MT ulp_main.common.ld -E -P -xc -o ulp_main.common.ld -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/config -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid/api -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_trace -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_update -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bootloader_support -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bt -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/driver -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp32 -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_adc_cal -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_http_client -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp-tls -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ethernet -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/fatfs -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/freertos -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/heap -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/jsmn -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/log -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mdns -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls_port -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nvs_flash -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/openssl -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spi_flash -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/sdmmc -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/smartconfig_ack -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spiffs -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/tcpip_adapter -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/vfs -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wear_levelling -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/xtensa-debug-module -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/coap -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/console -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/expat -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/json -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/lwip -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nghttp -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/soc -I C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wpa_supplicant -DFCPU=240000000L -DARDUINO=10808 -DARDUINO=ESP32_DEV -DARDUINOARCH=ESP32 -DARDUINO_BOARD="ESP32_DEV" -DARDUINO_VARIANT="doitESP32devkitV1" -I C:\Users\cedric\AppData\Local\Temp\arduino_build_372251\sketch -DASSEMBLER C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\tools\sdk\include\ulp\ld\esp32.ulp.ld

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/esp32ulp-elf-ld -o ulp_main.elf -A elf32-esp32ulp -Map=ulp_main.map -T ulp_main.common.ld ulp.ulp.o

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/esp32ulp-elf-nm -g -f posix ulp_main.elf

python C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\tools\sdk\include\ulp\esp32ulp_mapgen.py -s ulp_main.sym -o ulp_main

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/esp32ulp-elf-objcopy -O binary ulp_main.elf ulp_main.bin

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-objcopy --input-target binary --output-target elf32-xtensa-le --binary-architecture xtensa --rename-section .data=.rodata.embedded ulp_main.bin ulp_main.bin.bin.o

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-ar cru C:\Users\cedric\AppData\Local\Temp\arduino_build_372251\arduino.ar ulp_main.bin.bin.o

Linking everything together... "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-gcc" -nostdlib "-LC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/lib" "-LC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/ld" "-LC:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch/" -T ulp_main.ld -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u cxa_guard_dummy -u cxx_fatal_exception -Wl,--start-group "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251\sketch\sketch_jan07a.ino.cpp.o" "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/arduino.ar" -lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lhal -lnewlib -ldriver -lbootloader_support -lpp -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lapp_trace -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lcxx -lxtensa-debug-module -lmdns -lvfs -lsoc -lcore -lsdmmc -lcoap -ltcpip_adapter -lc_nano -lesp-tls -lrtc -lspi_flash -lwpa2 -lesp32 -lapp_update -lnghttp -lspiffs -lespnow -lnvs_flash -lesp_adc_cal -llog -lsmartconfig_ack -lexpat -lm -lc -lheap -lmbedtls -llwip -lnet80211 -lpthread -ljson -lstdc++ -Wl,--end-group -Wl,-EL -o "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.elf" "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/gen_esp32part.exe" -q "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/partitions/default.csv" "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.partitions.bin" "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\esptool\2.3.1/esptool.exe" --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.bin" "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.elf" esptool.py v2.3.1

"C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-size" -A "C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.elf" Der Sketch verwendet 179740 Bytes (13%) des Programmspeicherplatzes. Das Maximum sind 1310720 Bytes. Globale Variablen verwenden 13880 Bytes (4%) des dynamischen Speichers, 313800 Bytes für lokale Variablen verbleiben. Das Maximum sind 327680 Bytes. C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\esptool\2.3.1/esptool.exe --chip esp32 --port COM10 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/partitions/boot_app0.bin 0x1000 C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/bin/bootloader_dio_80m.bin 0x10000 C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.bin 0x8000 C:\Users\cedric\AppData\Local\Temp\arduino_build_372251/sketch_jan07a.ino.partitions.bin

duff2013 commented 5 years ago

Caching issue is esp32 and Arduino IDE issue it won't harm your compiled program.

jubueche commented 5 years ago

So now I am trying on Windows. I get the compilation error exec: "/bin/xtensa-esp32-elf-g++": file does not exist Error compiling for board Adafruit ESP32 Feather.

This is the location of the .exe file: /Documents/Arduino/hardware/esspresif/esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe

I am aware that I don't have a version folder after my esp32 directory. I tried adding a dummy one, but this did not resolve the issue.

duff2013 commented 5 years ago

@jubueche Now you have to install esp32 core through the Arduino Board Manger described here for using this update arduino_ulp.

cedricwritescode commented 5 years ago

Every example compiles now, except of the ulp_i2c_bitbang. I even set CONFIG_ULP_COPROC_RESERVE_MEM to 4096 but the error still occurs:

Unable to cache built core, please tell esp32 maintainers to follow http://goo.gl/QdCUjo python "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py" -DESP_PLATFORM "-DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\"" -DHAVE_CONFIG_H "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/config" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bluedroid/api" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_trace" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/app_update" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bootloader_support" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/bt" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/driver" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp32" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_adc_cal" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp_http_client" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/esp-tls" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ethernet" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/fatfs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/freertos" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/heap" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/jsmn" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/log" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mdns" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/mbedtls_port" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nvs_flash" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/openssl" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spi_flash" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/sdmmc" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/smartconfig_ack" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/spiffs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/tcpip_adapter" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/vfs" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wear_levelling" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/xtensa-debug-module" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/coap" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/console" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/expat" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/json" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/lwip" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/newlib" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/nghttp" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/soc" "-IC:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/wpa_supplicant" -b "C:\Users\cedric\AppData\Local\Temp\arduino_build_948990" -p "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0" -u "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/" -x "C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/" --DFCPU=240000000L --DARDUINO=10808 --DARDUINO=ESP32_DEV --DARDUINOARCH=ESP32 "--DARDUINO_BOARD=\"ESP32_DEV\"" "--DARDUINO_VARIANT=\"doitESP32devkitV1\"" ULP Assembly File(s) Detected: i2c.s, i2c_dev.s, stack.s

C:\Users\cedric\AppData\Local\Arduino15\packages\esp32\tools\binutils\esp32ulp-elf-binutils/bin/esp32ulp-elf-ld -o ulp_main.elf -A elf32-esp32ulp -Map=ulp_main.map -T ulp_main.common.ld i2c.ulp.o i2c_dev.ulp.o stack.ulp.o

SensorsIot commented 5 years ago

I tried it now with version 1.0.0 and get the following error (last lines of compiling): Traceback (most recent call last): Error message: `File "C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 407, in

main(sys.argv[1:])

File "C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 93, in main

build_ulp(bpath, ppath, xpath, upath, ulp_files, board_options)

File "C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0/tools/sdk/include/ulp/esp32ulp_build_recipe.py", line 118, in build_ulp

proc = subprocess.Popen(cmd[1],stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=False)

File "C:\Python27\lib\subprocess.py", line 711, in init

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 948, in _execute_child

startupinfo)

WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden

exit status 1 Error compiling for board ESP32 Dev Module. End Error Message

I think I got the same error with the rc2 version. I deleted everything and reinstalled it. The only thing I was not sure is: I copied the directory esp32ulp-elf-binutils to C:\Users\andre\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\tools and renamed it to binutils. Maybe this was wrong. Sorry I did not manage to insert the error messge as code

duff2013 commented 5 years ago

@SensorsIot make sure your directories look like mine in these screen shots, also turn on verbose compiling in the Arduino perf. and post the output starting from where it tells you what ulp files you have in your sketch. If you can also post screen shot of your "binutils" folder you created and for anyone else posting this type of error please use the README.ino example, thats the simplest example to debug from.

SensorsIot commented 5 years ago

It works now with 1.0.0. Great! I can now experiment with the ULP and do some energy measurements. Thank you!

duff2013 commented 5 years ago

@SensorsIot I'm glad you got it working! Let me know if any other issues come up and one thing you can do is up the ulp memory in the sdkconfig.h file if you haven't done already. I put mine at 2048 which I believe are words not bytes and seems to fit anything I've done with the ulp so far.

SensorsIot commented 5 years ago

Do you have any cool projects already done? Or what are your ideas? I will publish a video on Sunday showing how to use the ULP (basics).

duff2013 commented 5 years ago

I haven't really done to much with the ULP yet it was just more of a vanity project to try to get it to work with Arduino. If you have any questions for your video let me know this will help a lot with other trying to do this, Thanks! As a side note someone now is working on a script to automate the install but he is using v1.0.1 and it doesn't work like you had, he thinks Arduino esp guys might have removed the ULP binary from the Arduino esp, I hope not... I'll take a look at this later today.

duff2013 commented 5 years ago

@SensorsIot Hey I will have a update that fixes v1.0.1 compile problems but I'm reworking the install process so its hopefully much easier, you might want to wait to publish your video?

SensorsIot commented 5 years ago

Great! I am working on the video and only say they should come to your GitHub for installation. So whatever you do I do not have to change it. I focus on the whole process of working with the ULP. I will also start a competition to foster ULP development (main price: 100$ in goods). So I hope we will get some nice projects...

SensorsIot commented 5 years ago

Here it is: https://youtu.be/-QIcUTBB7Ww

cedricwritescode commented 5 years ago

@SensorsIot In minute 11:32 : There is an register that both cleares and sets the RTC_GPIO-pins. I think RTCIO_GPIO_OUT_DATA_W1TS and - W1TC set and clear the bits in RTCIO_GPIO_OUT_REG so You can use this register. It looks something like this:

    WRITE_RTC_REG(RTC_GPIO_OUT_REG, 26, 1, 1)
    WRITE_RTC_REG(RTC_GPIO_OUT_REG, 26, 1, 0)

This lines works like digitalWrite(2, HIGH) and Low.