<?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: Using semihosting with custom printf in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319727#M7712</link>
    <description>&lt;P&gt;Nice. I'll give it a try ASAP.&lt;/P&gt;&lt;P&gt;And what about the serial parameters?&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;</description>
    <pubDate>Fri, 06 Aug 2021 13:38:33 GMT</pubDate>
    <dc:creator>Joao_Roscoe</dc:creator>
    <dc:date>2021-08-06T13:38:33Z</dc:date>
    <item>
      <title>Using semihosting with custom printf</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319413#M7709</link>
      <description>&lt;P&gt;Hello, there,&lt;/P&gt;&lt;P&gt;I'm working in a project that will use all therr UARTS in S32K144, and one of them will be used as a simple console, with custom print code - not libc printf.&lt;/P&gt;&lt;P&gt;At this point, I'm still using S32K144EVB, and I would like to use semihosting console - so I looked at the EVB schematics, and saw that PTC6 and PTC7 are connected to&amp;nbsp;UART1_TX_TGTMCU_R and&amp;nbsp;UART1_RX_TGTMCU_R nets, and to&amp;nbsp;MK20DX128VFM5, which implements OpenSDA.&lt;/P&gt;&lt;P&gt;I patched my custom print code (which works with a regular UART adapter connected to EVB pins) to use UART1, and configured PTC6 and PTC7 as follows:&lt;BR /&gt;/* Tx pin configuration data */&lt;BR /&gt;.tx_pin_cfg.base = PORTC,&lt;BR /&gt;.tx_pin_cfg.pinPortIdx = 7U,&lt;BR /&gt;.tx_pin_cfg.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,&lt;BR /&gt;.tx_pin_cfg.driveSelect = PORT_LOW_DRIVE_STRENGTH,&lt;BR /&gt;.tx_pin_cfg.passiveFilter = false,&lt;BR /&gt;.tx_pin_cfg.mux = PORT_MUX_ALT2,&lt;BR /&gt;.tx_pin_cfg.pinLock = false,&lt;BR /&gt;.tx_pin_cfg.intConfig = PORT_DMA_INT_DISABLED,&lt;BR /&gt;.tx_pin_cfg.clearIntFlag = false,&lt;BR /&gt;.tx_pin_cfg.gpioBase = NULL,&lt;BR /&gt;.tx_pin_cfg.digitalFilter = false,&lt;BR /&gt;/* Rx pin configuration data */&lt;BR /&gt;.rx_pin_cfg.base = PORTC,&lt;BR /&gt;.rx_pin_cfg.pinPortIdx = 6U,&lt;BR /&gt;.rx_pin_cfg.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,&lt;BR /&gt;.rx_pin_cfg.driveSelect = PORT_LOW_DRIVE_STRENGTH,&lt;BR /&gt;.rx_pin_cfg.passiveFilter = false,&lt;BR /&gt;.rx_pin_cfg.mux = PORT_MUX_ALT2,&lt;BR /&gt;.rx_pin_cfg.pinLock = false,&lt;BR /&gt;.rx_pin_cfg.intConfig = PORT_DMA_INT_DISABLED,&lt;BR /&gt;.rx_pin_cfg.clearIntFlag = false,&lt;BR /&gt;.rx_pin_cfg.gpioBase = NULL,&lt;BR /&gt;.rx_pin_cfg.digitalFilter = false,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I alse have semihost enabled in project properties, and I'm using no IO newlib_nano, since I'm using a custom print code - not libc printf.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While debugging, however, I'm not getting anything in semihost console.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What am I missing here? What UART parameters (BAUD, nbits, parity, flow control) shouln I use?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 03:17:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319413#M7709</guid>
      <dc:creator>Joao_Roscoe</dc:creator>
      <dc:date>2021-08-06T03:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using semihosting with custom printf</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319701#M7711</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The Semihosting console requires STD C library with I/O support - the output data aren't related to any UART port - it is GDB server/client feature.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jiri&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 12:24:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319701#M7711</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2021-08-06T12:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using semihosting with custom printf</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319727#M7712</link>
      <description>&lt;P&gt;Nice. I'll give it a try ASAP.&lt;/P&gt;&lt;P&gt;And what about the serial parameters?&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 13:38:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319727#M7712</guid>
      <dc:creator>Joao_Roscoe</dc:creator>
      <dc:date>2021-08-06T13:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using semihosting with custom printf</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319907#M7715</link>
      <description>&lt;P&gt;Well, it turns out I was mixing up two completely different concepts: S32K144EVB does allow routing UART1 through OpenSDA - but that's not semihosting. When using semihosting, a real serial port of the MCU under debugging is not involved, and libc will talk directly to OpenSDA.&lt;/P&gt;&lt;P&gt;In fact, I've just 'found' a virtual COM in my debug PC, hooked a terminal emulator to it and bingo, it's working.&lt;/P&gt;&lt;P&gt;I imagine that this post could possible be useful for someone in teh future.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 02:12:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Using-semihosting-with-custom-printf/m-p/1319907#M7715</guid>
      <dc:creator>Joao_Roscoe</dc:creator>
      <dc:date>2021-08-07T02:12:00Z</dc:date>
    </item>
  </channel>
</rss>

