Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Submitting against 'develop'
Fixes #1818
When using Windows 11 and SDK 2.0.0, when trying to do a cmake -G "NMake Makefiles" .. or cmake -G "Ninja" .. then picotool executable is not found, and it gets built within the project. The Findpicotool.cmake file does not seem to find the picotool executable at least with Windows, I have not checked Linux/Mac.
I have a solution which should be benign, since it only kicks in if the user creates a system environment variable in Windows, called PICOTOOL_OVERRIDE_DIR. If that is set, then the picotool.exe file there is used (and the version command is executed to confirm it is the correct version).
The submitted change is in a single file (Findpicotool.cmake), placed near the top of the file, after the cmake_minimum_required(VERSION 3.17) line.
I have tested by performing a build, and I can see that the picotool executable was used, and that the .uf2 file was successfully created.
The attached files evidence that, and at the end there is a dir listing that shows that the .uf2 file was created.
nmake_output.txt
cmake_g_nmake_makefile_output.txt