System firmware can be flashed by USB (–dfu or --serial), JTAG/SWD, or OTA. If you are taking the Particle system firmware, building locally and using the --program-dfu option is usually the easiest because it’s done right out of the makefiles.
Building a bootloader is also possible using the local toolchain. That can only be flashed in USB serial (–serial) mode, OTA, or JTAG/SWD. The reason is that DFU mode runs out of the bootloader, and since the STM32 does XIP, DFU mode cannot replace the bootloader because the code is running out of the bootloader.