Hi All!
Zephyr Tools now allow you to set custom defines for compilation. See the new CMake Defines in the side bar.

Additionally, on a per project/per board basis we store the state of all the conf, overlay, cmake defines and save them in a .zephyr-overrides.json file. This allows you to change boards & projects without having to set all these things over and over. Here’s an example of one:
{
"circuitdojo_feather_nrf9151/nrf9151/ns": {
"sysbuild": true,
"extraConfFiles": [
"env/nrf9151.conf"
],
"extraOverlayFiles": [],
"extraCMakeDefines": [
"SB_CONFIG_BOOTLOADER_MCUBOOT=y"
]
},
"native_sim/native": {
"sysbuild": true,
"extraConfFiles": [
"env/native_sim.conf"
],
"extraOverlayFiles": [],
"extraCMakeDefines": []
}
}
This is released in version 0.5.16 and is available on VSCode Marketplace and Open VSX.
Have fun!