Flashing firmware through SWD

I’m trying to flash arducopter firmware to my custom made board based on STM32F405RGT6. The thing is that I don’t have direct access to DFU via USB. Is there a way to flash the firmware through SWD or UART (which I have access to)?
How can I build from source without bootloader embedded into the binaries? Do I need the bootloader other than the one already hard-coded in MCU memory?

https://www.st.com/en/development-tools/stm32cubeprog.html