Thank you for your reply.
I'm still trying to understand how to get from scratch. For example, I used some microcontrollers which have the bootstrap option where I send a 0x00 byte and receive a response with 0xD5 by serial communication (USART), after that I can send my own firmware to control the device. What I still couldn't understand was how I can control the microcontroller. Is it the same idea as I did with bootstrap sending a byte and later sending my own firmware? Or the microcontroller has some command (opcode) where I send it and the micro will send me back the data.