Serial Debugging

From Stm32World Wiki
Revision as of 04:12, 30 April 2021 by Lth (talk | contribs) (Created page with "Category:STM32Category:STM32 DevelopmentCategory:STM32CubeMXCategory:STM32CubeIdeCategory:STM32 HAL{{metadesc|How to redirect printf to USB Serial Port}} R...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Redirecting printf to a Virtual COM port is really easy:

int _write(int file, char *ptr, int len) {
	CDC_Transmit_FS((uint8_t *)ptr, len);
    return len;
}