Programming the STM32F10x via USART with this app note from STMicroelectronics
The STM32F10x microcontroller can run user-specific firmware to perform in-application programming (IAP) of the microcontroller-embedded Flash memory.
IAP driver must be program first to the Flash memory base address via JTAG/SWD interface using the development toolchain of your choice or the factory-embedded boot loader in the System memory area.
Then IAP driver can do:
-Download the binary file from PC via USART to the STM32F10x’s internal Flash Memory
-Upload the STM32F10x’s internal flash memory content (starting from the defined user application address) into a binary file.
-Execute the user program.