Diagnose missing USB CDC or UART output on STM32F4
Find which interface Serial uses, then test USB enumeration and hardware UART independently.
Check USB serial first at the host
When the Arduino board configuration maps Serial to native USB CDC, the host must first enumerate the device and open its serial port. Test with a known data cable. Confirm the board variant uses the wired USB connector and provides the clock required for USB. Keep the test loop printing periodically so an early message sent before a terminal opens cannot hide a working connection.
Some boards expose a second USB connector tied to the ST-LINK virtual COM port. That port listens to a hardware USART wired by the board. Check the schematic and any solder bridges before assuming either USB connector listens to Serial.
Verify the USART independently
Choose explicit RX and TX pins on one USART supported by the board variant. Use a 3.3 V USB-to-TTL adapter with its RX connected to board TX and with common ground. Use the same baud rate and framing in the sketch and monitor. A logic analyzer on board TX can show whether the MCU sends bytes before you diagnose the adapter.
Identify the change that broke Serial.print
Reduce the problem to a periodic print and use the same board, port and compile options across all builds. Record the last known working core revision and one failing revision. Test for output after the port enumerates, and log the interface and observed behaviour for each run.
If you can build the core revisions locally, use git bisect with the known good and bad revisions. Flash and observe the same sketch at each step. Mark revisions that do not build with git bisect skip. Re-test both the first bad revision and its parent so you can distinguish a code change from a nondeterministic USB or serial failure.
