You have not said what Arduino board you are using. If it is an Uno with only one HardwareSerial port you should be able to use SoftwareSerial to create a second serial port on different pins thus leaving pins 0 and 1 free for uploading programs. Just be aware that SoftwareSerial is not as fast as HardwareSerial. Start with 9600 baud and then try higher rates if you want to.
Or just disconnect the HM10 when you want to upload a program.