Closed nyh-workshop closed 2 months ago
On top of that, do we have a "gitignore" for each Pico-SDK app generated? I'm not sure what to gitignore the compile intermediates at the build folder there.
Hi @nyh-workshop, thanks for reporting the issue. I have some questions that can help us track down the issue.
%USERHOME%/.pico-sdk/cmake/pico-vscode.cmake
?For configuring of the build system after deleting/cleaning the build folder I generally recommend using our built-in Raspberry Pi Pico: Configure CMake
command.
Concerning the question what to ignore on a generated pico-sdk app: you should exclude the full build/
folder as in the cmake configure process it will be filled with platform specific ninja build configuration files therefore syncing this directory only causes problems on different system and wast space on your version control system.
Hi @paulober , thanks for the support.
C:\Users\<my username>\.pico-sdk\cmake\pico-vscode.cmake
.I am excluding and deleting the build folder and try doing the Raspberry Pi Pico: Configure CMake
again.
Hmm, I'm not sure if this output is correct or the compilation is being completed when I did this now:
CMake: Clean
anymore)Output (you can ignore the warning - the code was still under testing):
ninja: Entering directory `E:\pico-projects-2024\pico2dexed/build'
[21/174] Building C object synth_dexed/CMakeFiles/synth_dexed.dir/arm_math.c.obj
E:/pico-projects-2024/pico2dexed/synth_dexed/arm_math.c: In function 'arm_biquad_cascade_df1_init_f32':
E:/pico-projects-2024/pico2dexed/synth_dexed/arm_math.c:14:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
14 | S->pCoeffs = pCoeffs;
| ^
[174/174] Linking CXX executable pico2dexed.elf
* Terminal will be reused by tasks, press any key to close it.
The CMake: Clean
broke the compilation when I press this again, but can be corrected by doing what is suggested by you too. :D
Great that this works for you.
Yes, the output seems correct to me. This should give you a pico2dexed.elf
and pico2dexed.uf2
in your build folder.
The selection if you compile for pico2 or a different board also only happens during the cmake configuration step. Afterwards it is
"hardcoded" in the build configurations files generated into your build folder.
So CMake clean should not have been the issue but the configuration step after this requires the right environment configuration. Therefor we recommend using our cmake configure command otherwise you would have to setup cmake tools extension with the same settings.
Thanks for the help @paulober ! Now I can have cleaner Pico2 repositories! :D
Hi Raspberry Pi team,
I encountered a severely broken compilation after doing "CMake: Clean" (Ctrl-shift-P and you can find that command) on a Pico 2 project with ARM cores.
The compile errors range from being defaulted back to "RP2040", to a lot of other linker errors. Here is this primary example:
Looks like the CMakeLists.txt has this one missing at the beginning of the file so I added it back again:
However, after doing "Delete Cache and Reconfigure", it just doesn't compile anymore and now presenting me with more linker errors:
As a result I have to delete the entire project and re-generate the Pico project and manually add the files I worked on earlier to compile it successfully again.
I have a snapshot of the failed build and the fresh build at my new project in Git: https://github.com/nyh-workshop/pico2dexed/commits/main/
The first two commits and by some comparisons, seems that the build had defaulted back to RP2040: