Exit status 127 while compiling esp32 code

Hi all,
Getting error while compiling blink code into esp32.
it's displaying "exit status 127". I'm not sure about the type of exit statuses.

The copied error message is as below:

Arduino: 1.8.19 (Mac OS X), Board: "ESP32 Dev Module, Disabled, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None, Disabled"



/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/localuser/Documents/Arduino/libraries -fqbn=espressif:esp32:esp32:JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none -ide-version=10819 -build-path /var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714 -warnings=default -build-cache /var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_cache_548639 -prefs=build.warn_data_percentage=75 -verbose /Users/localuser/Documents/Arduino/ESP_32/ESP_32a/ESP_32a.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/localuser/Documents/Arduino/libraries -fqbn=espressif:esp32:esp32:JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=none,EraseFlash=none -ide-version=10819 -build-path /var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714 -warnings=default -build-cache /var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_cache_548639 -prefs=build.warn_data_percentage=75 -verbose /Users/localuser/Documents/Arduino/ESP_32/ESP_32a/ESP_32a.ino
Using board 'esp32' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/espressif/esp32
Using core 'esp32' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/espressif/esp32
bash -c "[ ! -f \"/Users/localuser/Documents/Arduino/ESP_32/ESP_32a\"/partitions.csv ] || cp -f \"/Users/localuser/Documents/Arduino/ESP_32/ESP_32a\"/partitions.csv \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/partitions.csv"
bash -c "[ -f \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/partitions.csv ] || [ ! -f \"/Applications/Arduino.app/Contents/Java/hardware/espressif/esp32/variants/esp32\"/partitions.csv ] || cp \"/Applications/Arduino.app/Contents/Java/hardware/espressif/esp32/variants/esp32\"/partitions.csv \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/partitions.csv"
bash -c "[ -f \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/partitions.csv ] || cp \"/Applications/Arduino.app/Contents/Java/hardware/espressif/esp32\"/tools/partitions/default.csv \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/partitions.csv"
bash -c "[ -f \"/Users/localuser/Documents/Arduino/ESP_32/ESP_32a\"/bootloader.bin ] && cp -f \"/Users/localuser/Documents/Arduino/ESP_32/ESP_32a\"/bootloader.bin \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/ESP_32a.ino.bootloader.bin || ( [ -f \"/Applications/Arduino.app/Contents/Java/hardware/espressif/esp32/variants/esp32\"/bootloader.bin ] && cp \"/Applications/Arduino.app/Contents/Java/hardware/espressif/esp32/variants/esp32\"/bootloader.bin \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/ESP_32a.ino.bootloader.bin || \"{runtime.tools.esptool_py.path}\"/esptool --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o \"/var/folders/n9/1nbxw_w532l475s5gp3l_wjh0000gp/T/arduino_build_474714\"/ESP_32a.ino.bootloader.bin \"/Applications/Arduino.app/Contents/Java/hardware/espressif/esp32/tools/sdk/esp32\"/bin/bootloader_qio_80m.elf )"

bash: {runtime.tools.esptool_py.path}/esptool: No such file or directory
exit status 127
/Applications/Arduino.app/Contents/Java/arduino-builder returned 127
Error compiling for board ESP32 Dev Module.

I think that your installation is corrupt.

To my knowledge, the part between { and } should not show in a bash output but should have been replaced by the actual path.

What I would try to solve it is to downgrade the ESP32 board package using the boards manager and next upgrade it again.

Note: I'm not a Mac user.

1 Like

Incorrect board or port configuration in the Arduino IDE can sometimes cause this error.

1 Like