Install hex on arm using J-flashProgram
After installing the J-Link driver, click the J-flash arm icon under START/Program (or 'all projects')/segger/J-linkarm v4.10, you can use this software to easily download programs.
You can use the following steps to write programs for the chips used for the first time.
A. Open J-flash arm, click File-openproject..., and select stm32f103rb. jflash.
B. Click file-open data file... and select the executable file to be burned.
C. Select "burn file" and click "target-Connect" to link the hardware. If the connection succeeds, "connected successfully" is displayed in the last line of the log window ".
D. Press F3 to erase the chip.
E. Press F5 to write the program to the chip.
F. Click target-Secure Chip after the hardware link to prevent the program from being maliciously read. If your chip is used for debugging, do not perform this step.
Take the following steps for a program chip:
A. Click target-connect to check whether the hardware is connected. If the connection succeeds, "connected successfully" is displayed in the last line of the log window ".
B. Click target-unsecure chip to unencrypt the chip.
C. Power off the circuit board.
D. Perform the steps described in "write a program using the following steps for the First Time chip" again.