Robot-Will/Stino

Stino+Arduino-Esp32: Error creating binaries and uploading after building a sketch

miguelpom opened this issue · 2 comments

Hi. I am not an expert in this field, but so far y have enjoyed very much this package.

I have used it developing scripts for Arduino boards and also for the Esp8266 and Esp32 from Espressif. However, just this week I encounter this error everytime I build a sketch for the Esp32 platform. I even tried several platform examples and got the same result.

After build completion:
[100.0%] Creating binary files... "C:/Users/casfid/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/casfid/AppData/Local/Arduino15/packages/esp32/hardware/esp32/1.0.0/tools/sdk/lib" "-LC:/Users/casfid/AppData/Local/Arduino15/packages/esp32/hardware/esp32/1.0.0/tools/sdk/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/casfid/AppData/Local/Arduino15/build/Arduino_dualcore_test/sketch/Arduino_dualcore_test.ino.cpp.o" "C:/Users/casfid/AppData/Local/Arduino15/build/Arduino_dualcore_test/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/casfid/AppData/Local/Arduino15/build/Arduino_dualcore_test/Arduino_dualcore_test.elf" {tools.gen_esp32part.cmd} -q "C:/Users/casfid/AppData/Local/Arduino15/packages/esp32/hardware/esp32/1.0.0/tools/partitions/default.csv" "C:/Users/casfid/AppData/Local/Arduino15/build/Arduino_dualcore_test/Arduino_dualcore_test.partitions.bin" "{tools.gen_esp32part.cmd}" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable. [Build] Error occurred.

I got the definition of this {tools.gen_esp32part.cmd} in the "platform.txt" file at "~\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0". This item is defined as:
tools.gen_esp32part.cmd=python "{runtime.platform.path}/tools/gen_esp32part.py"
And for what I see I'd say the problem here is that somehow Sublime Text has problems executing that python script gen_esp32part.py, or maybe it cannot find it. But actually it can be found at "~\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.0\tools".

Has anyone ever encounter this same problem?
Any help would be really appreciated. Thanks!
PS: This does not happen when working with the ESP8266.
PS2: Strangely, it does not happen when working from the Arduino IDE either. No matter what platform I'm using.

OK, so yesterday I (kind of) solved the problem by changing the variables and explicitly writing down all the paths and commands that are present in "platform.txt" and that Stino failed to run.
I.e.:
"{tools.gen_esp32part.cmd}" was not recognized as a command but its definition and location in the hardware sdk was written in the very same "platform.txt", right in the same file its execution is called.

I know is not the best solution by far but for now it works: Stino builds and uploads my sketches without problems.

H4R0 commented

@miguelpom can you post your platform.txt please.

I have the same problem and can't get it fixed.

I tried replacing macros with absolute paths, replacing python with absolute path etc. nothing worked.