-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't switch target on v1.9.0 (VSC-1537) #1363
Comments
How are you switching target? What steps are you doing ? If you select a new target from the status bar it should run the If an error happened we need those doctor command output as requested in the issue template. |
Can confirm this bug. If I run set target via button in status bar, let's say idf.py set-target esp32s3, then id does reconfigure and update sdkconfig for esp32s3, BUT env IDF_TARGET is not updated, and if I try to build the project, it will be written that esp32 is sert as IDF_TARGET, whille project is configured for esp32s3, this is a conflict, workaround is just to manually export IDF_TARGET=esp32s3 and then continue with idf.py build |
Hey @brianignacio5 I tried multiple switching via the terminal command directly and via the bottom bar option via the plugin. Both always reverted back to esp32 (I think because the bottom bar never changed). So not matter what I did even after removing old sdkconfig/build files it would always conflict and wouldn't let me build even if I did IDF_TARGET=esp32s3 @atlex92 . The fix for me has just been to downgrade to the previous version. |
same here, no way to change the target any more with that release, neither in idf terminal with "idf.py set-target ..." nor with the bottom bar. |
Seems to me that the issue is that Could you share the
@atlex92 @john30 Please also share the troubleshooting information, as a I said, I can't reproduce the issue myself but it seems that |
Do you try to build the project from IDF Terminal that you opened before changing the target ? The terminal IDF_TARGET would not be updated. Need to close and open a new terminal for IDF_TARGET changes to be seen. |
thanks for looking into it @brianignacio5 . I think it is related to #1263 but didn't have time to look at it in depth. |
#1263 does indeed remove the idf.adapterTargetName that was used before and instead reads IDF_TARGET from sdkconfig. We have tested that it should work the same for extension commands. I haven't been able to reproduce the issue which makes me believe there is something specific happening in your setup, that is why I need to check the troubleshooting information as requested in the issue template. You mention you are using WSL. This could be the issue. If you open any host project in WSL, the settings being used are still from the host (Windows) instead of the WSL settings. You can try to save WSL settings on the current project .vscode/settings.json to make sure it works properly. |
My sdkconfig is not in the root of the workspace directory. When I put a dummy sdkconfig in the root with the single line containing the config_id_target set to the target I want it works. |
You could also try using the |
That also is working.
On Wed, Dec 18, 2024 at 8:26 PM, Brian A. ***@***.***> wrote:
You could also try using the idf.sdkconfigFilePath in your <project-dir>/.vscode/settings.json to define the sdkconfig file path. @MBWeno
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
isn't this a chicken-egg issue? my impression when trying to get it working was that the target is reset to the default of esp32 whenever trying to change it via "idf.py set-target" or via the bottom bar action item. as it was impossible to be saved to a decent sdkconfig due to the errors reported, it wasn't able to save at all. |
This is not true. This command should set the desired IDF_TARGET to currently defined sdkconfig file path. The If you don't provide any troubleshooting information, I can't see why running the idf.py set-target via bottom bar doesn't work. Alternatively, could you share an example project where this behavior is shown ? I can't reproduce the issue locally. |
Hey @brianignacio5 I am currently traveling for the remainder of the week or I would have sent some debug over for this earlier - sorry about that. I should be back home in 2 days. |
No worries @michaelboeding whenever you can. |
I've tried to get the issue on one of the example projets of esp-idf and it is easily reproducable whenever something in the build system is wrong, i.e. a part of the set-target fails. I've tested it with an invalid CMakeLists.txt in the main component (and I'm sure this can also be done for any other subcomponent) by using "INCLUDES_DIR" instead of the correct "INCLUDE_DIR". |
@john30 Without the |
please find attached the report and this is the error message:
|
Well, the thing you are testing is literally the reason why the target is not updated. Because there is an issue in the build system the It seems that what you want is to override the "idf.cmakeCompilerArgs": [
"-G",
"Ninja",
"-DPYTHON_DEPS_CHECKED=1",
"-DESP_PLATFORM=1",
"-DIDF_TARGET=esp32"
] But if I add the previous setting, the build command will return something like this:
This is because the sdkconfig file and the build directory both need to be deleted before running the build command with The use of I hope this output explain why a successful set-target command is necessary to update the IDF_TARGET, regardless of a configuration setting that force a new target in the build system. Let say instead you execute
|
I am also experiencing odd issues with switching the target. I have set my My configuration can be seen on this branch in my project - https://github.com/K3Engineering/dynamite-sampler-firmware/tree/add-multiple-configurations I did the following:
After this point, if I try to build, it will build a This was done on plugin version |
Your |
I think I come up with a fix that makes sense in #1385 by saving IDF_TARGET in Please try this vsix installer. You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension. |
OS
MacOS
Operating System version
15.1.1 (24B2091)
Visual Studio Code version
1.9.0
ESP-IDF version
5.3.1
Python version
3.8.7
Doctor command output
NA
Extension
No response
Description
Project will not switch back to esp32s3 after going to esp32 target. Downgraded to 1.8.1 and it worked.
Debug Message
NA
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: