Hacking microcontroller firmware through a USBI have given a step-by-step guide on the analysis of embedded firmware, finding vulnerabilities and exploiting them to acquire a firmware dump and to carry out code execution on a USB device.
Source:
Hacking microcontroller firmware through a USB