<?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>i.MX Processors中的主题 Re: RT1021 SWO Trace problems</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1401709#M186009</link>
    <description>&lt;P&gt;Did anyone at NXP have a chance to look at this please?&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 12:17:28 GMT</pubDate>
    <dc:creator>rshipman</dc:creator>
    <dc:date>2022-01-19T12:17:28Z</dc:date>
    <item>
      <title>RT1021 SWO Trace problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1396155#M185527</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to get SWO Trace working in MCUXpresso, but without success.&lt;/P&gt;&lt;P&gt;Whatever I try, the 'Change' button in the SWO Configuration section of the Configuration tab remains greyed out (as do the other settings).&lt;/P&gt;&lt;P&gt;I am able to debug ok with MCUXpresso. I.e. I can download software to the target board and run it, and break/start/stop/step etc as you would expect.&lt;/P&gt;&lt;P&gt;Our target board uses an RT1021 and has the following connections:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SWDIO: Pin 111, GPIO_AD_B0_00, routed as JTAG_TMS, connected to pin 2 of the 10-pin jtag connector.&lt;/LI&gt;&lt;LI&gt;SWCLK: Pin 110, GPIO_AD_B0_01, routed as JTAG_TCK, connected to pin 4 of the 10-pin jtag connector.&lt;/LI&gt;&lt;LI&gt;SWO: Pin 97, GPIO_AD_B0_11, routed as ARM_TRACE_SWO, connected to pin 6 of the 10-pin jtag connector.&lt;/LI&gt;&lt;LI&gt;(FYI: The remaining jtag pins are as follows: 1 = +3V3; 3,5,9 = GND; 7,8 = n/c)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am using the NXP LPCXpresso LPC-Link 2 (Rev B) connected via the 10-pin J7 connector to our target board.&lt;/P&gt;&lt;P&gt;Here is a list of some of the documents and web pages that I have gleaned information from:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MCUXpresso IDE SWO Trace Guide, Rev. 11.4.1&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/Blogs/SWO-with-NXP-i-MX-RT1064-EVK-Board/ba-p/1131057" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Blogs/SWO-with-NXP-i-MX-RT1064-EVK-Board/ba-p/1131057&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://community.nxp.com/t5/MCUXpresso-General-Knowledge/How-To-Use-SWO-Trace-on-MCUXpresso-IDE/ta-p/1125902" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/MCUXpresso-General-Knowledge/How-To-Use-SWO-Trace-on-MCUXpresso-IDE/ta-p/1125902&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;At least one person has got this working on a target board using the RT1021, although they do not use the LPC-Link2:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://hackaday.io/project/166109-mice47/log/165272-debugging-the-imxrt1021-with-swo" target="_blank" rel="noopener"&gt;https://hackaday.io/project/166109-mice47/log/165272-debugging-the-imxrt1021-with-swo&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is what I have done so far:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Copied retarget_itm.c into my source tree.&lt;/LI&gt;&lt;LI&gt;Changed the library to 'NewLibNano (no host)' so that it links (setting was 'NewLibNano (semihost)').&lt;BR /&gt;See project properties | C/C++ Build | Settings | Tool Settings tab | MCU C++ Linker | Managed Linker Script | Library field.)&lt;/LI&gt;&lt;LI&gt;Modify the SDK manifest:&lt;UL&gt;&lt;LI&gt;Archive: C:\Users\Ronnie Shipman\mcuxpresso\02\SDKPackages\SDK_2_10_0_EVK-MIMXRT1020.zip&lt;/LI&gt;&lt;LI&gt;File: EVK-MIMXRT1020_manifest_v3_8.xml&lt;/LI&gt;&lt;LI&gt;Line: &amp;lt;params id="internal.has_swo.release.MIMXRT1021xxxxx" name="internal.has_swo" value="true"/&amp;gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;After the call to BOARD_BootClockRUN() I have added the line:&lt;UL&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; CLOCK_EnableClock(kCLOCK_Trace);&lt;/LI&gt;&lt;LI&gt;FYI: In BOARD_BootClockRUN are the lines:&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; /* Disable TRACE clock gate. */&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; CLOCK_DisableClock(kCLOCK_Trace);&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; /* Set TRACE_PODF. */&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; CLOCK_SetDiv(kCLOCK_TraceDiv, 2);&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; /* Set Trace clock source. */&lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &amp;nbsp; CLOCK_SetMux(kCLOCK_TraceMux, 2);&lt;/LI&gt;&lt;LI&gt;This should give us a 132 MHz clock although I'm not sure how to measure that is actually being generated.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I have confirmed the connectivity between RT1021 pin 97 and pin 6 of the jtag connector.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So my questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What have I missed - is the above all I need to do to get SWO Trace to work?&lt;/LI&gt;&lt;LI&gt;Are the 3 SWD signals all that I need to get SWO Trace to work in MCUXpresso?&lt;/LI&gt;&lt;LI&gt;Or do we need 2-wire or 4-wire SWD? I believe the RT1021 only supports 1-wire.&lt;/LI&gt;&lt;LI&gt;Do we actually need SWO for the profiler and interrupt history?&lt;/LI&gt;&lt;LI&gt;Will this work with the LPC-Link2? In the document (MCUXpresso IDE SWO Trace Guide, Rev. 11.4.1) is this note: "Note: SWO cannot be used with other CMSIS-DAP based probes or with LPC-Link2 debug probes using the non default Non Bridged (NB) or Serial (ser) firmware. Non LinkServer probes may also provide SWO trace capabilities via other software – check the vendors' websites for more details." What does this mean?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Many thanks and regards,&lt;/P&gt;&lt;P&gt;Ronnie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 13:48:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1396155#M185527</guid>
      <dc:creator>rshipman</dc:creator>
      <dc:date>2022-01-17T13:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: RT1021 SWO Trace problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1401709#M186009</link>
      <description>&lt;P&gt;Did anyone at NXP have a chance to look at this please?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 12:17:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1401709#M186009</guid>
      <dc:creator>rshipman</dc:creator>
      <dc:date>2022-01-19T12:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: RT1021 SWO Trace problems</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1404662#M186276</link>
      <description>&lt;P&gt;I have reposted this here:&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1404649" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1404649&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 16:00:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RT1021-SWO-Trace-problems/m-p/1404662#M186276</guid>
      <dc:creator>rshipman</dc:creator>
      <dc:date>2022-01-25T16:00:22Z</dc:date>
    </item>
  </channel>
</rss>

