Confusion about stlink and mbed (why do I need to upload via stlink for mbed to work)
I have been doing a lot of reading lately about the flashing process and bootloaders and not everything is clear.
The datasheet of my microcontroller says that it is stlink that enables mbed. I have confirmed that I have to upload via stlink in order for mbed to work. I uploaded an mbed program using stm32flash via uart and it didn't work. My question is why? Why does the way in which I upload firmware affect how it runs? Is there a workaround (a way to use mbed while uploading with stm32flash and uart)?
My next question has to do with the stlink firmware. As I understand it, the nucleo boards have the main microcontroller and an stm32f103cbt6 or similar for stlink. If I create a pcb and want mbed support, will I need to add this ic also? Will I need to flash stlink firmware onto it instead of the factory bootloader? Would this be doable for someone who has made pcbs in the past but is still not an expert?
Edit:
Looks like I had an error in my code and that's why flashing over uart didn't work with my mbed code. I have fixed the error and confirm that you can compile with mbed and upload over uart.
