Want to compile for ESP32S3 not ESP32

olivertrepte
Posts: 4
Joined: Mon Jun 17, 2024 11:35 pm

Want to compile for ESP32S3 not ESP32

Postby olivertrepte » Mon Jun 17, 2024 11:41 pm

I have a Waveshare ESP32S3 A7670E board and am trying to get hello_world from the ESP-IDF to work. I can compile but when trying to flash, it tells me

A fatal error occurred: This chip is ESP32-S3 not ESP32. Wrong --chip argument?

I am at a loss to understand where I should configure the environment for ESP32-S3. Probably just a simple setting, but I am not able to find it. Help appreciated.

ESP_Sprite
Posts: 9985
Joined: Thu Nov 26, 2015 4:08 am

Re: Want to compile for ESP32S3 not ESP32

Postby ESP_Sprite » Tue Jun 18, 2024 4:26 am

Pretty simple indeed. Just do `idf.py set-target esp32s2`.

olivertrepte
Posts: 4
Joined: Mon Jun 17, 2024 11:35 pm

Re: Want to compile for ESP32S3 not ESP32

Postby olivertrepte » Tue Jun 18, 2024 6:29 am

Thanks! I have tried it but get:

>idf.py set-target esp32s3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Executing action: set-target
Set Target to: esp32s3, new sdkconfig will be created.
Target 'esp32s3' specified on command line is not consistent with target 'esp32' in the environment.

When I then try to compile and flash, the problem remains. Is there anywhere else I need to change the target?

ESP_Sprite
Posts: 9985
Joined: Thu Nov 26, 2015 4:08 am

Re: Want to compile for ESP32S3 not ESP32

Postby ESP_Sprite » Tue Jun 18, 2024 8:52 am

Not sure. Are you using vscode or something? If so, you may need to change it in the IDE.

olivertrepte
Posts: 4
Joined: Mon Jun 17, 2024 11:35 pm

Re: Want to compile for ESP32S3 not ESP32

Postby olivertrepte » Tue Jun 18, 2024 9:25 am

Yes, I am using VS Code, but I can't find where to change the environment target setting there. Any ideas?

ESP_Sprite
Posts: 9985
Joined: Thu Nov 26, 2015 4:08 am

Re: Want to compile for ESP32S3 not ESP32

Postby ESP_Sprite » Fri Jun 21, 2024 6:06 am

I think it's one of the buttons on the bottom bar, but I don't use vscode myself, so I don't know for sure.

olivertrepte
Posts: 4
Joined: Mon Jun 17, 2024 11:35 pm

Re: Want to compile for ESP32S3 not ESP32

Postby olivertrepte » Fri Jun 21, 2024 7:27 am

I got it to work by running "New project" in the Welcome to Espressif IDF extensions graphical interface rather than following the command line procedure outlined by Espressif. Thanks for assistance!

Taozi-
Posts: 1
Joined: Tue Feb 18, 2025 4:57 am

Re: Want to compile for ESP32S3 not ESP32

Postby Taozi- » Tue Feb 18, 2025 5:02 am

you can try
export IDF_TARGET=esp32s3
# then
idf.py set-target esp32s3

lyhistory
Posts: 1
Joined: Fri Mar 07, 2025 2:14 pm

Re: Want to compile for ESP32S3 not ESP32

Postby lyhistory » Fri Mar 07, 2025 2:41 pm

for my case, i'm using idf terminal in vscode, the solution is simply open a new terminal after set-target, probably there is a bug that the terminal failed to refresh it's env even though we set the target successfully

MicroController
Posts: 2046
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Want to compile for ESP32S3 not ESP32

Postby MicroController » Sat Mar 08, 2025 11:58 am

To avoid the hassle, I include this into my projects' CMakeLists.txt:

Code: Select all

if(NOT DEFINED ENV{IDF_TARGET})
    set(ENV{IDF_TARGET} esp32s3)
    message("IDF_TARGET not set, defaulting to: $ENV{IDF_TARGET}")
endif()

Who is online

Users browsing this forum: justinmreina and 62 guests