ESP32 wont compile anymore

Hi My project used to compile and upload fine
No long does. I have re-installed all apps same issue
I have env paths set to esp tools
Below is the error message
Hope this makes sense to someone. Its my first ESP32 Project and struggling with IDE
Thanks

FQBN: esp32:esp32:esp32_family
Using board 'esp32_family' from platform in folder: C:\Users\brett\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1
Using core 'arduino' from platform in folder: C:\Users\brett\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1

cmd /c if exist "B:\\Work\\Bretts_Stuff\\EGT_Sensor\\Code\\06_LVGL_Measuring_voltage\\partitions.csv" COPY /y "B:\\Work\\Bretts_Stuff\\EGT_Sensor\\Code\\06_LVGL_Measuring_voltage\\partitions.csv" "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\partitions.csv"
        1 file(s) copied.
cmd /c if not exist "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\partitions.csv" if exist "\\partitions.csv" COPY "\\partitions.csv" "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\partitions.csv"
cmd /c if not exist "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\partitions.csv" COPY "C:\\Users\\brett\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.1\\tools\\partitions\\{build.partitions}.csv" "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\partitions.csv"
cmd /c IF EXIST "B:\\Work\\Bretts_Stuff\\EGT_Sensor\\Code\\06_LVGL_Measuring_voltage\\bootloader.bin" ( COPY /y "B:\\Work\\Bretts_Stuff\\EGT_Sensor\\Code\\06_LVGL_Measuring_voltage\\bootloader.bin" "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\06_LVGL_Measuring_voltage.ino.bootloader.bin" ) ELSE ( IF EXIST "\\bootloader.bin" ( COPY "\\bootloader.bin" "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\06_LVGL_Measuring_voltage.ino.bootloader.bin" ) ELSE ( "C:\\Users\\brett\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\4.9.dev3\\esptool.exe" --chip {build.mcu} elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o "C:\\Users\\brett\\AppData\\Local\\arduino\\sketches\\69713FC8CE2D4D504399E5A09ED2DAF2\\06_LVGL_Measuring_voltage.ino.bootloader.bin" "C:\\Users\\brett\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.3-cfea4f7c-v1\\{build.mcu}\\bin\\bootloader_qio_80m.elf" ) )
usage: esptool [-h]
               [--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32c6beta,esp32h2beta1,esp32h2beta2,esp32c2,esp32c6,esp32c61,esp32c5,esp32c5beta3,esp32h2,esp32p4}]
               [--port PORT] [--baud BAUD] [--port-filter PORT_FILTER]
               [--before {default_reset,usb_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset,no_reset_stub}]
               [--no-stub] [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
               [--connect-attempts CONNECT_ATTEMPTS]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,read_flash_sfdp,merge_bin,get_security_info,version}
               ...
esptool: error: argument --chip/-c: invalid choice: '{build.mcu}' (choose from 'auto', 'esp8266', 'esp32', 'esp32s2', 'esp32s3beta2', 'esp32s3', 'esp32c3', 'esp32c6beta', 'esp32h2beta1', 'esp32h2beta2', 'esp32c2', 'esp32c6', 'esp32c61', 'esp32c5', 'esp32c5beta3', 'esp32h2', 'esp32p4')
exit status 2

Compilation error: exit status 2
1 Like

It sounds like something installed/updated and broke something else...

Please always put blocks of error messages in code tags. There's always a chance that some sequence of characters in the error messages with cause the forum software to misinterpret them, just like happens if you post code without code tags. Plus no-one needs to wear out their fingers scrolling past it!

Thanks
I fixed the issue, The Board config was wrong.

1 Like

Hi Brett -

If you don't mind, could you explain (with steps) how you fixed this problem? I have the exact same problem and I'm not quite up on how to change the board config as you identified the problem.

Thanks in advance! Best wishes.

  • DaveFer
1 Like

in my case this was not selected as the correct model for my board type

3 Likes

Thank you, sir. :+1:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.