<?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>MCUXpresso GeneralのトピックLinkServer automation with python</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2013327#M5550</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I'm using&amp;nbsp;LinkServer v24.9.75 to automate flashing operations for the custom board that I have.&lt;BR /&gt;The microcontroller on this board is IMXRT1176 and it is connected to external hyperflash memory via Hyperbus..&lt;BR /&gt;&lt;BR /&gt;I know there are 2 tools that can be used for flashing:&lt;BR /&gt;&amp;nbsp;- LinkServer&lt;BR /&gt;&amp;nbsp;-&amp;nbsp;crt_emu_cm_redlink&lt;BR /&gt;&lt;BR /&gt;The second one is used by the LinkServer for low-level operations if I'm not mistaken.&lt;BR /&gt;&lt;BR /&gt;The problem I have is that LinkServer seems to have some dependencies built in that require me to put &lt;STRONG&gt;json&lt;/STRONG&gt; config files and flash-loader.cfx files to the location where LinkServer is installed. This is not good for me, I would like to have a possibility to pass an argument with path to the config file to it directly from python.&lt;BR /&gt;&lt;BR /&gt;Take a look here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LinkServer.exe flash C:\Embedded\Target\customBoard\src\NewBoard\MIMXRT1170.json:NewBoard load C:\Embedded\Target\customBoard\src\NewBoard\Debug\example.axf

ERRMSG: Exception: Device query can have at most 2 parts (3 found): ['C', '\Embedded\Target\customBoard\src\NewBoard\MIMXRT1176.json', 'NewBoard']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;The above method does not work. If I skip the path to config file and I use the new one I added within path&amp;nbsp; &lt;STRONG&gt;...\LinkServer_24.9.75\devices&lt;/STRONG&gt; then it works without a problem.&lt;BR /&gt;It is not ideal because it requires me to have this dependency in python scrript that configuration is places in the LinkServer &lt;STRONG&gt;device&lt;/STRONG&gt; directory, as well as to&amp;nbsp;flash&lt;STRONG&gt; directory&lt;/STRONG&gt; for my custom flash-loader.cfx image.&lt;BR /&gt;&lt;BR /&gt;Linkerver flash help says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Usage: LinkServer.exe flash [OPTIONS] DEVICE COMMAND [ARGS]...

  Flash operations

  DEVICE can be:
  - &amp;lt;DEVICE_NAME&amp;gt;:&amp;lt;BOARD&amp;gt; pair, same as `devices --filter` parameter
  - device configuration file with extension `.json`.
          Use `config` command for generating such a file from an existing device&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the above description it seems I'm not using the&amp;nbsp;&lt;STRONG&gt;device configuration file&lt;/STRONG&gt;&amp;nbsp;properly or I misunderstand the meaning of this help text.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" size="5" color="#FF0000"&gt;My question is, can I get rid of these dependencies from LinkServer perspective or should I rely purely on&amp;nbsp;&lt;STRONG&gt;crt_emu_cm_redlink&lt;/STRONG&gt; for flash related operations?&lt;/FONT&gt;&lt;BR /&gt;For&amp;nbsp;&lt;STRONG&gt;crt_emu_cm_redlink&lt;/STRONG&gt; I know I can pass parameters with path to it and it works well.&lt;BR /&gt;&lt;BR /&gt;In the end I just want to run one of the 2 as subprocess and pass parameters to it so it can do the flashing part.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2024 05:50:47 GMT</pubDate>
    <dc:creator>mimlo</dc:creator>
    <dc:date>2024-12-13T05:50:47Z</dc:date>
    <item>
      <title>LinkServer automation with python</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2013327#M5550</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I'm using&amp;nbsp;LinkServer v24.9.75 to automate flashing operations for the custom board that I have.&lt;BR /&gt;The microcontroller on this board is IMXRT1176 and it is connected to external hyperflash memory via Hyperbus..&lt;BR /&gt;&lt;BR /&gt;I know there are 2 tools that can be used for flashing:&lt;BR /&gt;&amp;nbsp;- LinkServer&lt;BR /&gt;&amp;nbsp;-&amp;nbsp;crt_emu_cm_redlink&lt;BR /&gt;&lt;BR /&gt;The second one is used by the LinkServer for low-level operations if I'm not mistaken.&lt;BR /&gt;&lt;BR /&gt;The problem I have is that LinkServer seems to have some dependencies built in that require me to put &lt;STRONG&gt;json&lt;/STRONG&gt; config files and flash-loader.cfx files to the location where LinkServer is installed. This is not good for me, I would like to have a possibility to pass an argument with path to the config file to it directly from python.&lt;BR /&gt;&lt;BR /&gt;Take a look here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LinkServer.exe flash C:\Embedded\Target\customBoard\src\NewBoard\MIMXRT1170.json:NewBoard load C:\Embedded\Target\customBoard\src\NewBoard\Debug\example.axf

ERRMSG: Exception: Device query can have at most 2 parts (3 found): ['C', '\Embedded\Target\customBoard\src\NewBoard\MIMXRT1176.json', 'NewBoard']&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;The above method does not work. If I skip the path to config file and I use the new one I added within path&amp;nbsp; &lt;STRONG&gt;...\LinkServer_24.9.75\devices&lt;/STRONG&gt; then it works without a problem.&lt;BR /&gt;It is not ideal because it requires me to have this dependency in python scrript that configuration is places in the LinkServer &lt;STRONG&gt;device&lt;/STRONG&gt; directory, as well as to&amp;nbsp;flash&lt;STRONG&gt; directory&lt;/STRONG&gt; for my custom flash-loader.cfx image.&lt;BR /&gt;&lt;BR /&gt;Linkerver flash help says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Usage: LinkServer.exe flash [OPTIONS] DEVICE COMMAND [ARGS]...

  Flash operations

  DEVICE can be:
  - &amp;lt;DEVICE_NAME&amp;gt;:&amp;lt;BOARD&amp;gt; pair, same as `devices --filter` parameter
  - device configuration file with extension `.json`.
          Use `config` command for generating such a file from an existing device&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the above description it seems I'm not using the&amp;nbsp;&lt;STRONG&gt;device configuration file&lt;/STRONG&gt;&amp;nbsp;properly or I misunderstand the meaning of this help text.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial black,avant garde" size="5" color="#FF0000"&gt;My question is, can I get rid of these dependencies from LinkServer perspective or should I rely purely on&amp;nbsp;&lt;STRONG&gt;crt_emu_cm_redlink&lt;/STRONG&gt; for flash related operations?&lt;/FONT&gt;&lt;BR /&gt;For&amp;nbsp;&lt;STRONG&gt;crt_emu_cm_redlink&lt;/STRONG&gt; I know I can pass parameters with path to it and it works well.&lt;BR /&gt;&lt;BR /&gt;In the end I just want to run one of the 2 as subprocess and pass parameters to it so it can do the flashing part.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 05:50:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2013327#M5550</guid>
      <dc:creator>mimlo</dc:creator>
      <dc:date>2024-12-13T05:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: LinkServer automation with python</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2014662#M5551</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/220472"&gt;@mimlo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I'm afraid that these dependencies for LinkServer are not removable, as this is how LinkServer was designed. Please use&amp;nbsp;&lt;STRONG&gt;crt_emu_cm_redlink&lt;/STRONG&gt; instead to pass the path as a parameter sucessfully.&lt;/P&gt;
&lt;P&gt;BR,&lt;BR /&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 18:52:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2014662#M5551</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2024-12-16T18:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: LinkServer automation with python</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2123975#M5689</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/220472"&gt;@mimlo&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/186731"&gt;@EdwinHz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;this is an older discussion, but I think it is important to clarify two things (for anyone looking for a similar thing too).&lt;/P&gt;&lt;P&gt;1) I do *not* recommend using&amp;nbsp;crt_emu_cm_redlink. This is more of an internal tool working in the background and should not be called directly. Instead, the LinkServer should be used. Sure, you can use it, but it is not recommended.&lt;/P&gt;&lt;P&gt;2) You can use LinkServer instead, and you can directly specif the JSON file. As already noted, the syntax is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DEVICE can be:
  - &amp;lt;DEVICE_NAME&amp;gt;:&amp;lt;BOARD&amp;gt; pair, same as `devices --filter` parameter
  - device configuration file with extension `.json`.
          Use `config` command for generating such a file from an existing device&lt;/LI-CODE&gt;&lt;P&gt;The point I want to stress is that it is either &amp;lt;DEVICE_NAME&amp;gt;:&amp;lt;BOARD&amp;gt; *or* the path to the JSON file.&lt;/P&gt;&lt;P&gt;Using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LinkServer.exe flash C:\Embedded\Target\customBoard\src\NewBoard\MIMXRT1170.json:NewBoard load C:\Embedded\Target\customBoard\src\NewBoard\Debug\example.axf&lt;/LI-CODE&gt;&lt;P&gt;mixes up the JSON file with the &amp;lt;BOARD&amp;gt;.&lt;/P&gt;&lt;P&gt;So use the following&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LinkServer.exe flash C:\Embedded\Target\customBoard\src\NewBoard\MIMXRT1170.json load C:\Embedded\Target\customBoard\src\NewBoard\Debug\example.axf&lt;/LI-CODE&gt;&lt;P&gt;and it should work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 11:41:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2123975#M5689</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2025-06-26T11:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: LinkServer automation with python</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2124008#M5690</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/17173"&gt;@ErichStyger&lt;/a&gt;,&lt;BR /&gt;Your point is valid and pretty much point on. At the time of writing this post, I was not fully aware of the capabilities of the LinkServer but I'm up to speed now (at least from the flashing standpoint).&lt;BR /&gt;&lt;BR /&gt;Just in case anyone else stumbles upon this post, take a note that in order to use the&lt;/P&gt;&lt;PRE&gt;&amp;lt;DEVICE_NAME&amp;gt;:&amp;lt;BOARD&amp;gt;&lt;/PRE&gt;&lt;P&gt;command notation, you need to have your &lt;STRONG&gt;device_name.json&lt;/STRONG&gt; file (like&amp;nbsp;&lt;STRONG&gt;MIMXRT1170.json&lt;/STRONG&gt; present in the device folder where LinkServer performs a search (For my LinkServer version it's under .&lt;STRONG&gt;LinkServer_25.3.31\devices&lt;/STRONG&gt;).&lt;BR /&gt;&lt;BR /&gt;I decided to go with LinkServer and adopt the device.json file dependency, as it is nearly identical type of dependency that &lt;STRONG&gt;SEGGER JLink&lt;/STRONG&gt; requires when there is custom device to be handled (for JLink, it's a&lt;STRONG&gt; device.xml&lt;/STRONG&gt; file that is required).&lt;BR /&gt;Additionally, one extremely cool thing that I can add to the above is the LinkServer's feature that performs .json file validation in terms of syntax. If you mess it up, it informs you that a given field at a given line is not valid. Very very cool feature that JLink evidently lacks for their .xml device files &lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Michael&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 12:51:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2124008#M5690</guid>
      <dc:creator>mimlo</dc:creator>
      <dc:date>2025-06-26T12:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: LinkServer automation with python</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2124047#M5691</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/220472"&gt;@mimlo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Indeed, JSON imho is much more modern format with better possibilities than XML (which is older too).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jun 2025 13:54:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2124047#M5691</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2025-06-26T13:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: LinkServer automation with python</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2124125#M5692</link>
      <description>json is not my personal favorite as it is quite painful to read (because of many constructs like [], {}, and etc.). However .xml is is way much worse imho &lt;LI-EMOJI id="lia_grinning-face-with-smiling-eyes" title=":grinning_face_with_smiling_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;BR /&gt;&lt;BR /&gt;My personal preference is yml and toml.&lt;BR /&gt;Both are quite modern looking, easy to read, and lightweight to parse by different engines/modules.</description>
      <pubDate>Thu, 26 Jun 2025 15:25:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/LinkServer-automation-with-python/m-p/2124125#M5692</guid>
      <dc:creator>mimlo</dc:creator>
      <dc:date>2025-06-26T15:25:17Z</dc:date>
    </item>
  </channel>
</rss>

