Thanks for bearing with us. It seems like the Windows environment variable IDF_TARGET is being set to "esp32" somewhere. We don't have any explanation for why this has happened, though. Setting this environment variable is not required to use ESP-IDF, but it is optional to automatically override the selected target (which is why you keep getting these errors - there's a conflict between the "overridden" value in the environment variable and the target you're asking to build).
- If you open a clean cmd window and then immediately run "echo %IDF_TARGET%" (before running export.bat or anything else), do you still see esp32?
- If you "edit system environment variables" and check the list of environment variables for both the system and your user (both lists are in the same window), then do you see IDF_TARGET in the list anywhere? If it's there, please delete it.
- If that doesn't lead anywhere, could you please post the output of "idf.py version" (after running export.bat)?