I want to ask how to implement programming or debugging interface for a MCU based device.
For example, I have created an ESP8266 based device using development board, everything is working fine and I have ordered a PCB for it. Then I need to flash the MCU over the wires, but for the first time only - afterwards I can use OTA flashing. However I want to have some interface in case things go south and I will need to re-flash it over the wires again. Or, another example, I want to build a small batch of devices (10-50) and flash all of them.
Placing pin header on the board is not good option - it takes some space and creates unneeded wiring. Soldering wires directly to the ESP module worked fine for me, but it is not good option in case of batch or LGA packages without exposed pins.
So, I want to ask - are there best practices for solving this problem?