<?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 Post build commands on win10 in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849040#M4190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to perform static stack analysis as post-build step as &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;‌ describes&amp;nbsp;&lt;A href="https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/"&gt;here&lt;/A&gt;. Since I am having issues using the "find -name*.o" trick I wrote a python script that looks in the &lt;STRONG&gt;Debug&lt;/STRONG&gt; folder, strips the *.o file obtained from the assembly startup file (hardcoded in this moment) ad creates a batch file that launches the perl avstack script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an env variable that contains the path to my python script(called MYSCRIPT). As Post-build step I provide:&amp;nbsp;&lt;/P&gt;&lt;P&gt;python ${MYSCRIPT}\recursiveWalktest.py&lt;/P&gt;&lt;P&gt;and everything works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I concatenate the bat command&amp;nbsp;using the &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; or &lt;STRONG&gt;&amp;amp;&amp;amp;&lt;/STRONG&gt; or even &lt;STRONG&gt;;&lt;/STRONG&gt; , everything fails BAD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;python ${MYSCRIPT}\recursiveWalktest.py &amp;amp; ${CWD}\DoStackAnalysis.bat&lt;/P&gt;&lt;P&gt;/bin/sh: C:UsersUser1[omissis]Project_TemplateDebugDoStackAnalysis.bat: command not found&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hint on this point would be gladly appreciated.&lt;/P&gt;&lt;P&gt;Script attached for everyone's sake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R:&lt;/P&gt;&lt;P&gt;L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: probably the backslash near "Outputfiles" would be better as a slah.&lt;/P&gt;&lt;P&gt;Edit2: the&amp;nbsp;previous python script worked fine only with my project, the updated one fits well on the examples from the NXP's SDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to merge The two bat files just for having a single bat file to run as post-build file.&lt;/P&gt;&lt;P&gt;I am assuming that there is configuration called "&lt;STRONG&gt;Debug&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;Placing avstack.pl in the Debug directory of the project allows to run the complete batch script as post build.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enabling fstack usage in misc:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74343iC66B073B1C50610C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and adding the path as post build script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74393iC179739F8697F8BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The generated bat file (DoStackAnalysis.bat) can be launched from the folder.&lt;/P&gt;&lt;P&gt;And here comes the issue in my following post BTW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2018 08:20:04 GMT</pubDate>
    <dc:creator>Catosh</dc:creator>
    <dc:date>2018-10-11T08:20:04Z</dc:date>
    <item>
      <title>Post build commands on win10</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849040#M4190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to perform static stack analysis as post-build step as &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;‌ describes&amp;nbsp;&lt;A href="https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/"&gt;here&lt;/A&gt;. Since I am having issues using the "find -name*.o" trick I wrote a python script that looks in the &lt;STRONG&gt;Debug&lt;/STRONG&gt; folder, strips the *.o file obtained from the assembly startup file (hardcoded in this moment) ad creates a batch file that launches the perl avstack script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an env variable that contains the path to my python script(called MYSCRIPT). As Post-build step I provide:&amp;nbsp;&lt;/P&gt;&lt;P&gt;python ${MYSCRIPT}\recursiveWalktest.py&lt;/P&gt;&lt;P&gt;and everything works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I concatenate the bat command&amp;nbsp;using the &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; or &lt;STRONG&gt;&amp;amp;&amp;amp;&lt;/STRONG&gt; or even &lt;STRONG&gt;;&lt;/STRONG&gt; , everything fails BAD.&amp;nbsp;&lt;/P&gt;&lt;P&gt;python ${MYSCRIPT}\recursiveWalktest.py &amp;amp; ${CWD}\DoStackAnalysis.bat&lt;/P&gt;&lt;P&gt;/bin/sh: C:UsersUser1[omissis]Project_TemplateDebugDoStackAnalysis.bat: command not found&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hint on this point would be gladly appreciated.&lt;/P&gt;&lt;P&gt;Script attached for everyone's sake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R:&lt;/P&gt;&lt;P&gt;L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: probably the backslash near "Outputfiles" would be better as a slah.&lt;/P&gt;&lt;P&gt;Edit2: the&amp;nbsp;previous python script worked fine only with my project, the updated one fits well on the examples from the NXP's SDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to merge The two bat files just for having a single bat file to run as post-build file.&lt;/P&gt;&lt;P&gt;I am assuming that there is configuration called "&lt;STRONG&gt;Debug&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;Placing avstack.pl in the Debug directory of the project allows to run the complete batch script as post build.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enabling fstack usage in misc:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74343iC66B073B1C50610C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and adding the path as post build script:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/74393iC179739F8697F8BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The generated bat file (DoStackAnalysis.bat) can be launched from the folder.&lt;/P&gt;&lt;P&gt;And here comes the issue in my following post BTW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 08:20:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849040#M4190</guid>
      <dc:creator>Catosh</dc:creator>
      <dc:date>2018-10-11T08:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Post build commands on win10</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849041#M4191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some addition here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround I had to provide two bat files inside a bat file (not exactly what I&amp;nbsp;&amp;nbsp;was aiming for, but at least is working).&lt;/P&gt;&lt;P&gt;The "awful" thing is that right now the result of the analysis is different if I launch on the bat file or as a postbuild script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks very strange to me, nevertheless because the post-build scenario provides a maximum height of 1 for EVERY function in the source, the bat launched from windows instead returns bigger heights like 13, 14 and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I guess the one with bigger Height size is the correct script, but why there is such a difference?&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luca.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 12:40:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849041#M4191</guid>
      <dc:creator>Catosh</dc:creator>
      <dc:date>2018-10-11T12:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Post build commands on win10</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849042#M4192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After some test i was able to identify where the issue is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Design studio invokes perl.exe from &lt;BR /&gt;&lt;EM&gt;C:\NXP\S32DS_ARM_v2018.R1\utils\msys32\usr\bin\&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;perl.exe -v&amp;nbsp;gives:&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; This is perl 5, version 22, subversion 1 (v5.22.1) built for i686-msys-thread-multi-64int&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whereas the bat file launched from windows invokes perl.exe from&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C:\Perl64\bin\&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;perl.exe -v&amp;nbsp;gives:&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;This is perl 5, version 24, subversion 3 (v5.24.3) built for MSWin32-x64-multi-thread&lt;BR /&gt;(with 1 registered patch, see perl -V for more detail)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can confirm that avstak.pl provides different results.&amp;nbsp;&lt;BR /&gt;WHY this happens, is out of my area of expertise at the moment. adding the path of OS perl to the BAT file solves partially the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hint is really appreciated BTW.&lt;/P&gt;&lt;P&gt;B.R.&lt;/P&gt;&lt;P&gt;L.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2018 15:58:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Post-build-commands-on-win10/m-p/849042#M4192</guid>
      <dc:creator>Catosh</dc:creator>
      <dc:date>2018-10-15T15:58:23Z</dc:date>
    </item>
  </channel>
</rss>

