Describe The Problem To Be Solved
This issue is taken from ARM-software/vscode-cmsis-csolution#336, but suggests a different solution.
Since cbuild version 2.11, the *.cbuild.yml file has been relocated into the /out folder. Keil uVision saves its debug configuration files (*.cbuild.uvpdbgx, *.cbuild.uvoptx, and *.cbuild.uvguix.<username>) into the same folder. Every invocation of cbuild --rebuild or cbuild --clean therefore deletes µVision's debug configuration files.
(Optional): Suggest A Solution
cbuild could be adapted so that it does not delete the µVision configuration files (*.cbuild.uvpdbgx, *.cbuild.uvoptx, and *.cbuild.uvguix.<username>) in the /out folder with the options --rebuild and --clean. There are already exceptions for *.cbuild.yml and *.cbuild-run.yml files.
The current implementation is in https://github.com/Open-CMSIS-Pack/cbuild/blob/main/pkg/builder/csolution/builder.go, lines 829 and 806, for the 'out' and 'tmp' folders, respectively.
if err = utils.DeleteAll(outDir, []string{"*.cbuild.yml", "*.cbuild-run.yml"}); err != nil {
Describe The Problem To Be Solved
This issue is taken from ARM-software/vscode-cmsis-csolution#336, but suggests a different solution.
Since
cbuildversion 2.11, the*.cbuild.ymlfile has been relocated into the/outfolder. Keil uVision saves its debug configuration files (*.cbuild.uvpdbgx,*.cbuild.uvoptx, and*.cbuild.uvguix.<username>) into the same folder. Every invocation ofcbuild --rebuildorcbuild --cleantherefore deletes µVision's debug configuration files.(Optional): Suggest A Solution
cbuildcould be adapted so that it does not delete the µVision configuration files (*.cbuild.uvpdbgx,*.cbuild.uvoptx, and*.cbuild.uvguix.<username>) in the/outfolder with the options--rebuildand--clean. There are already exceptions for*.cbuild.ymland*.cbuild-run.ymlfiles.The current implementation is in https://github.com/Open-CMSIS-Pack/cbuild/blob/main/pkg/builder/csolution/builder.go, lines 829 and 806, for the 'out' and 'tmp' folders, respectively.