If a microcontroller has USB functionality, can I program it directly from a USB port? Can I design the PCB without a USB to serial converter? What are the precautions I should take? The example that came to my mind was STM32F070 series.
closed as too broad by Chris Stratton, Elliot Alderson, DoxyLover, RoyC, Oleg Mazurov Aug 20 at 16:37
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
If a microcontroller has USB functionality, can I program it directly from a USB port?
That depends entirely on the microcontroller.
In the case of the STM32F070, the answer is "no". While this part supports USB, its bootloader only supports programming over the USART. Another option to consider for programming is SWD.
The bootloader needs to receive the application binary and save it to flash. It is always possible to create a bootloader that receives the binary over USB or any other communication channel.
EDIT: my answer implies that you don't need an USB to TTL Serial adapter on your PCB. But make sure you can connect one externally to pins of the factory bootloader. Or that you can connect a programmer to SWD pins of the MCU. Because as easy the bootloader can write the application binary, the application can accidentally delete the bootloader.