Thank you cartu, I will give your suggestions a try and let you know how it works out.
The main reason I want to be able to change the target MCU on a per-build-configuration basis is that my project needs to be able to be built to run on several different hardware platforms, all which use different STM32 variants - some of these are M0-core devices, others are M4. (STM32F0xx vs. STM32F3xx). The compiler needs to know what core it needs to build to; this is set with gcc’s -mcpu= command line option. The only way to get the auto-generated compiler invocation to include the right -mcpu= setting is to specify the proper STM32 device in the TARGET setting tab. I suspect that the TARGET setting also affects other aspects of the build process and IDE operation, but it’s the -mcpu compiler option setting that I’m particularly interested in.
The sort of things that are specified by the BOARD xml are not that critical, as they can all be customized when setting up a debug configuration.
My suggestion for the future would be to remove the mandatory board-setting requirement from the TARGET specification, or provide a ‘generic’ or ‘default’ board config for all MCUs, or assume that if the BOARD setting is not specified, that a predefined “default” board config should be used.