Interchangeability of SWD programmers
The SWD interface itself is cross-platform, but the drivers for the programmer/ICD are not necessarily supported by your specific IDE, nor do they necessarily support all MCU parts. So I'd be sceptic against using a device specifically manufactured by ST, for anything else than ST parts.

You could instead use one from a "silicon independent" company like Segger etc. My own setup is Crossworks IDE + Segger ICD for all my ARM projects, where neither the IDE nor the programmer is locked up to a specific vendor, but have very broad part support. Works just fine for entirely different Cortex-M - I'm doing various projects with different parts from NXP, Microchip and ST, all with the same tool chain setup.