user3540: I've compiled an Arduino program via a Makefile and have the resulting hex file.
From the Mac command line, how do I upload this hex file to my STM32 Cortex M3 board?  For an ATMEL processor I would use avrdude.

user3540: 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.
Note that this answer is identical for any binaries which run on the processor, be they Arduino sketches or programs developed with other frameworks.

3540: <p>I've compiled an Arduino program via a Makefile and have the resulting hex file.</p>

<p>From the Mac command line, how do I upload this hex file to my <a href="https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html" rel="nofollow noreferrer">STM32 Cortex M3</a> board?  For an ATMEL processor I would use avrdude.</p>
 3540: <p>There are several different tools for uploading binaries to a Cortex M3.  Depending on the board (not chip) configuration, they include (ht: Majenko):</p>

<ul>
<li>dfu-util through an FT232 adapter</li>
<li>stm32flash through serial</li>
<li>micronucleus through the Micronucleus bootloader</li>
<li>stlink through an STLink programmer</li>
</ul>

<p>Many Arduino flavors use a board with some kind of USB or FT232 adapter.  In this case:</p>

<p>the STM32 line of processors include a <a href="https://www.st.com/content/ccc/resource/technical/document/application_note/6a/17/92/02/58/98/45/0c/CD00264379.pdf/files/CD00264379.pdf/jcr:content/translations/en.CD00264379.pdf" rel="nofollow noreferrer">DFU</a> (<a href="https://www.digikey.com/en/articles/techzone/2018/jan/update-firmware-field-using-microcontroller-dfu-mode" rel="nofollow noreferrer">device firmware update</a>) bootloader in ROM.</p>

<p>The <a href="http://dfu-util.sourceforge.net/" rel="nofollow noreferrer">dfu-util</a> project supports a Mac version of dfu-util, their command line DFU tool.</p>

<p>Note that this answer is identical for any binaries which run on the processor, be they Arduino sketches or programs developed with other frameworks.</p>
