<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)? in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429343#M2459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written a blog on exactly how to do this at: &lt;A href="http://centaurian.co.uk/2015/12/23/ksdk-usb-cdc-printf/" title="http://centaurian.co.uk/2015/12/23/ksdk-usb-cdc-printf/"&gt;KSDK USB CDC PRINTF | Centaurian&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Dec 2015 23:11:50 GMT</pubDate>
    <dc:creator>wesleyhunter</dc:creator>
    <dc:date>2015-12-23T23:11:50Z</dc:date>
    <item>
      <title>How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429337#M2453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that DbgConsole_Init() has to be called with a debug_console_device_type_t == kDebugConsoleUSBCDC, but what else?&lt;/P&gt;&lt;P&gt;- Do I need to include the virtual_com.c &amp;amp; virtual_com.h files in my project?&lt;/P&gt;&lt;P&gt;- Do I need to grab the usb callback routines from the virtual com demo and put them somewhere?&lt;/P&gt;&lt;P&gt;- Where do I define BOARD_USE_VIRTUALCOM?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use the Virtual COM port for my console I/O on a FRDM-KL27Z running mqx-lite. I've successfully converted the virtual_com usb demo to use mqx-lite, and now I need to write my "real" application with real console I/O (not just echoed characters).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 15:31:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429337#M2453</guid>
      <dc:creator>markdobrosielsk</dc:creator>
      <dc:date>2015-06-04T15:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429338#M2454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't fully understand your question!&lt;/P&gt;&lt;P&gt;As my understanding, the debugger console should be configured by the IDE itself.&lt;/P&gt;&lt;P&gt;When using a usb stack, you may make a USB works as a virtual_com, but "Debugging" is IDE's job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you give me more description on this issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 07:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429338#M2454</guid>
      <dc:creator>Rick_Li</dc:creator>
      <dc:date>2015-06-09T07:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429339#M2455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the IAR IDE. For any given bit of example code (lwdemo, for example), there is a workspace comprising several different projects. There's one project for each library (mqx library, ksdk library, etc)and then one for the example itself. In many (maybe all) of the example projects, there's a Debug Console sub-directory containing a number of files, including:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fsl_debug_console.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; fsl_debug_console.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; print_scan.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; print_scan.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe they're named improperly, and the fsl_debug_console files should just be named fsl_console.c &amp;amp; fsl_console.h. The point is, these files appear to let you redirect stdio to whichever port you'd like. In board.h, for the FRDM-KL43Z &amp;amp; -27Z, you'll find the line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; #define BOARD_USE_LPUART&lt;/P&gt;&lt;P&gt;which makes stdio (printf, scanf) use the LPUART. On the FRDM boards, this actually gets sent out the SDA port. By using this line instead&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; #define BOARD_USE_VIRTUALCOM&lt;/P&gt;&lt;P&gt;the fsl_debug_console module should redirect stdio to the USB port using the CDC Virtual COM port functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT it's not as simple as just changing the #define in board.h. I've added the USB Device library to the workspace, and link it into the example code. I've added virtual_com.c &amp;amp; .h and usb_descriptor.c &amp;amp; .h to the example project. I've merged the main functions together (virtual.c has its own main).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first big problem is that the init_bsp.c function _bsp_pre_init() has code to configure the UART pins for BOARD_USE_LPSCI, BOARD_USE_LPUART, and BOARD_USE_UART. Anything else, like BOARD_USE_VIRTUALCOM, causes a compile error by way of this statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; #error Default serial module is unsupported or undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I need to know what else I need to do to make my USB port be used for stdio.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 13:35:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429339#M2455</guid>
      <dc:creator>markdobrosielsk</dc:creator>
      <dc:date>2015-06-09T13:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429340#M2456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try the steps from this example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example on FRDM-K27,&amp;nbsp; the steps to make USB virtual com work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- Build USB lib from folder &lt;STRONG&gt;Freescale\KSDK_1.2.0\usb\usb_core\device\build\iar\usbd_sdk_frdmkl27z_bm\usbd_sdk_frdmkl27z_bm.eww&lt;/STRONG&gt; . If you use other rtos, you must build corresponding lib.&lt;/LI&gt;&lt;LI&gt;- Add file&amp;nbsp; virtual_com.c, virtual_com.h , usb_descriptor.c, usb_descriptor.c.h from &lt;STRONG&gt;Freescale\KSDK_1.2.0\platform\utilities\src&lt;/STRONG&gt; virtual com to project &lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin-left: .25in;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image001.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54184iB12FA2E936A05856/image-size/large?v=v2&amp;amp;px=999" role="button" title="image001.png" alt="image001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- In project option&amp;nbsp; C/C++ Complier -&amp;gt; Preprocessor include path&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="margin-left: 27.65pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="638"&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/osa/inc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/utilities/inc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/CMSIS/Include&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/devices&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/devices/MKL27Z644/include&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/devices/MKL27Z644/startup&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/hal/inc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/drivers/inc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/system/inc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/utilities/inc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../..&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../platform/utilities/inc/virtual_com&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/include/frdmkl27z&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/include&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/adapter/sources&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/adapter/sources/sdk&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/hal&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/include&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/include&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/audio&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/cdc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/common&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/composite&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/hid&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/include&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/msd&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/classes/phdc&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/controller/khci&lt;/P&gt;&lt;P&gt;$PROJ_DIR$/../../../../../usb/usb_core/device/sources/controller&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- Add &lt;STRONG&gt;BOARD_USE_VIRTUALCOM &lt;/STRONG&gt;definition in project setting&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;2&lt;span class="lia-inline-image-display-wrapper" image-alt="image002.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54185i3F7F2C4485B9B0BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image002.png" alt="image002.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- In linker option, add lib usb to project &lt;STRONG style="color: #1f497d;"&gt;$PROJ_DIR$/../../../../../lib/ksdk_platform_lib/iar/KL27Z644/debug/libksdk_platform.a&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;With release target, you must include release usb lib.a&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image003.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54186iDB82680514CAA574/image-size/large?v=v2&amp;amp;px=999" role="button" title="image003.png" alt="image003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- In linker/config&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="margin-left: 55.7pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="638"&gt;&lt;P&gt;__ram_vector_table__=1&lt;/P&gt;&lt;P&gt;__stack_size__=0x400&lt;/P&gt;&lt;P&gt;__heap_size__=0x400&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin-left: .25in;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image004.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/54187i1C05B6B99C89B4B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="image004.png" alt="image004.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- Define &lt;STRONG&gt;BOARD_DEBUG_USBCDC_INSTANCE&lt;/STRONG&gt; and &lt;STRONG&gt;BOARD_DEBUG_USBCDC_BAUD&lt;/STRONG&gt; in board.h&lt;/LI&gt;&lt;/UL&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="margin-left: 0.5in;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="638"&gt;&lt;P style="margin-left: .25in;"&gt;/* The USB_CDC to use for debug messages. */&lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;#ifndef BOARD_DEBUG_USBCDC_INSTANCE&lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define BOARD_DEBUG_USBCDC_INSTANCE&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;#endif&lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;#ifndef BOARD_DEBUG_USBCDC_BAUD&lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define BOARD_DEBUG_USBCDC_BAUD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 115200&lt;/P&gt;&lt;P style="margin-left: .25in;"&gt;#endif&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="list-style-type: disc;"&gt;&lt;LI&gt;- In board.c modify dbg_uart_init to use USB virtual com. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="margin-left: 50.1pt;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="top" width="746"&gt;&lt;P&gt;void dbg_uart_init(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DbgConsole_Init(BOARD_DEBUG_USBCDC_INSTANCE, BOARD_DEBUG_USBCDC_BAUD, &lt;SPAN style="background: yellow;"&gt;kDebugConsoleUSBCDC&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 02:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429340#M2456</guid>
      <dc:creator>macl</dc:creator>
      <dc:date>2015-06-22T02:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429341#M2457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite there yet…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this snippet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;debug_console_status_t DbgConsole_Init(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t uartInstance, uint32_t baudRate, debug_console_device_type_t device)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (s_debugConsole.type != kDebugConsoleNone)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return kStatus_DEBUGCONSOLE_Failed;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Set debug console to initialized to avoid duplicated init operation.*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_debugConsole.type = device;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_debugConsole.instance = uartInstance;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Switch between different device. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (device)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;#if (defined(USB_INSTANCE_COUNT) &amp;amp;&amp;amp; defined(BOARD_USE_VIRTUALCOM))&amp;nbsp; /&lt;STRONG&gt;&amp;amp;&amp;amp; defined()&lt;/STRONG&gt;/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case kDebugConsoleUSBCDC:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VirtualCom_Init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_debugConsole.base = (void*)g_app_handle;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_debugConsole.ops.tx_union.USB_Send = VirtualCom_SendDataBlocking;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s_debugConsole.ops.rx_union.USB_Receive = VirtualCom_ReceiveDataBlocking;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/P&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; s_debugConsole.base = (void*)g_app_handle;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g_app_handle = 0, so the program goes off into the weeds on execution of DbgConsole_Init. In the other cases, like the LPUART, s_debugConsole.base is set to the base address of the lpuart instance. What should I do here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark Dobrosielski&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 20:17:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429341#M2457</guid>
      <dc:creator>markdobrosielsk</dc:creator>
      <dc:date>2015-06-22T20:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429342#M2458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri, sans-serif; color: #303030;"&gt;Hi Mark,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: Calibri, sans-serif; font-size: 12pt; line-height: 1.5;"&gt;I have a few more tips that might help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030; font-family: Calibri, sans-serif; font-size: 12pt; line-height: 1.5;"&gt;When the program is downloaded and running, be sure to manually install the virtual cdc driver which is in directory: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri, sans-serif; color: #303030;"&gt;C:\Freescale\KSDK_1.2.0\examples\frdmkl27z\demo_apps\usb\device\cdc\virtual_com\inf. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri, sans-serif; color: #303030;"&gt;A more detail description is in the readme file of usb virtual cdc example: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Calibri, sans-serif; color: #303030;"&gt;C:\Freescale\KSDK_1.2.0\examples\frdmkl27z\demo_apps\usb\device\cdc\virtual_com\readme.pdf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;Also, although I only highlighted the last parameter in the DbgConsole_Init function above, please note that all parameters need to be changed.&amp;nbsp; See below. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;void dbg_uart_init(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; configure_uart_pins(BOARD_DEBUG_UART_INSTANCE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;&amp;nbsp;&amp;nbsp; /* For UART */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;&amp;nbsp;&amp;nbsp; // DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUD, kDebugConsoleUART);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;&amp;nbsp;&amp;nbsp; /* For USB CDC */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DbgConsole_Init(BOARD_DEBUG_USBCDC_INSTANCE, BOARD_DEBUG_USBCDC_BAUD, kDebugConsoleUSBCDC);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jun 2015 19:36:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429342#M2458</guid>
      <dc:creator>macl</dc:creator>
      <dc:date>2015-06-30T19:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429343#M2459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written a blog on exactly how to do this at: &lt;A href="http://centaurian.co.uk/2015/12/23/ksdk-usb-cdc-printf/" title="http://centaurian.co.uk/2015/12/23/ksdk-usb-cdc-printf/"&gt;KSDK USB CDC PRINTF | Centaurian&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 23:11:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429343#M2459</guid>
      <dc:creator>wesleyhunter</dc:creator>
      <dc:date>2015-12-23T23:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I setup the debug console to use the Virtual COM port (USB CDC driver)?</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429344#M2460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wesley,&lt;BR /&gt;&lt;BR /&gt;How to use the above link for scanf? I got it working for my (MK50DX256CLK10) custom board for printf. I want to make it work for scanf. &lt;BR /&gt;-Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 18:43:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-do-I-setup-the-debug-console-to-use-the-Virtual-COM-port-USB/m-p/429344#M2460</guid>
      <dc:creator>kirantujare</dc:creator>
      <dc:date>2016-08-23T18:43:35Z</dc:date>
    </item>
  </channel>
</rss>

