There are several different tools for uploading binaries to a Cortex M3. Depending on the board (not chip) configuration, they include (ht: Majenko):
- dfu-util through an FT232 adapter
- stm32flash through serial
- micronucleus through the Micronucleus bootloader
- stlink through an STLink programmer
Many Arduino flavors use a board with some kind of USB or FT232 adapter. In this case:
the STM32 line of processors include a DFU (device firmware update) bootloader in ROM.
The dfu-util project supports a Mac version of dfu-util, their command line DFU tool.
Further information here.
Note that this answer is identical for any binaries which run on the processor, be they Arduino sketches or programs developed with other frameworks.