J-Link debugging USB applications
When debugging target applications with J-Link that themselves enumerate as USB devices at the same PC where J-Link is connected to, some special things should be considered:
- The target CPU should not be halted during the enumeration process because many USB hubs to not handle delays in the enumeration phase properly and sometimes just hang / block all other devices that are connected to the same USB hub. This "do not halt" rule also applies when using semihosting in the project as this also temporarily halts the CPU. There should not be any semihosting activity during the enumeration phase. Before and after enumeration, semihosting is not problematic.
- Ideally, J-Link and the target device should not be connected to the same USB hub in case 1) cannot be guaranteed. This avoids the previously mentioned blocking / hanging of other devices connected to the same USB hub.