Error: redefinition of 'cycfg_ClockStartupError'

From vsCode (on a linux), with the helloworld example loaded I hit “PSoC Config” to enable some peripherals.
Once the “Device Configurator” is loaded it has a “minor” complaint

image

Clicking the Fix wrench I am offered “Enable System Clocks”. Doing so and then just save.

Then back in vsCode the build starts to fail:

[build] [  8%] Building C object CMakeFiles/VSCodeHelloWorld-take2.elf.dir/design/GeneratedSource/cycfg_system.c.obj
[build] /home/mogul/Onethings_vsCode/VSCodeHelloWorld-take2/design/GeneratedSource/cycfg_system.c:51:13: error: redefinition of 'cycfg_ClockStartupError'
[build]    51 | __WEAK void cycfg_ClockStartupError(uint32_t error)
[build]       |             ^~~~~~~~~~~~~~~~~~~~~~~
[build] In file included from /home/mogul/Onethings_vsCode/VSCodeHelloWorld-take2/design/GeneratedSource/cycfg_system.h:32,
[build]                  from /home/mogul/Onethings_vsCode/VSCodeHelloWorld-take2/design/GeneratedSource/cycfg_system.c:27:
[build] /home/mogul/Onethings_vsCode/VSCodeHelloWorld-take2/psoc6pdl/drivers/include/cy_ble_clk.h:279:13: note: previous definition of 'cycfg_ClockStartupError' was here
[build]   279 | __WEAK void cycfg_ClockStartupError(uint32_t error)
[build]       |             ^~~~~~~~~~~~~~~~~~~~~~~
[build] CMakeFiles/VSCodeHelloWorld-take2.elf.dir/build.make:206: recipe for target 'CMakeFiles/VSCodeHelloWorld-take2.elf.dir/design/GeneratedSource/cycfg_system.c.obj' failed
[build] make[2]: *** [CMakeFiles/VSCodeHelloWorld-take2.elf.dir/design/GeneratedSource/cycfg_system.c.obj] Error 1
[build] make[2]: *** Waiting for unfinished jobs....
[build] CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/VSCodeHelloWorld-take2.elf.dir/all' failed
[build] make[1]: *** [CMakeFiles/VSCodeHelloWorld-take2.elf.dir/all] Error 2
[build] Makefile:83: recipe for target 'all' failed
[build] make: *** [all] Error 2
[build] Build finished with exit code 2

Best option is to leave the top-level System Clocks disabled. You’re still able to use the peripheral clocks based on the disabled System clock setting as explained over here.

After any changes are made using the Modus configurator, it’s best to do a “Clean Reconfigure” (Cmake extension), as the folder/files structure may have been changed which needs to be reconfigured by Cmake.