<?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 Passing variables across TCL Scripts in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Passing-variables-across-TCL-Scripts/m-p/184580#M4385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are working on an Embedded system designed with a MC56F8335 as the core processor. The software for the system is built using the Metrowerks CodeWarrior IDE (Version - 5.6.1.1658). The need of the project is to automate the testing of this software through scripts. We have referred to CodeWarrior™Development Tools IDE 5.5/5.7 Automation Guide for the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actions and Observations:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.TCL Test Scripts are written, executed and are found to be working as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. A call and execution of one Test Script from another is also tested and found working. Example – when a Test Script 1.TCL is being executed with a Script to call and execute Test Script 2.TCL, it does the necessary action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clarifications:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is it possible to pass the value of variable from the calling Script to the Script being called? With reference to the examples below, is it possible to PASS and use the values of X1,X2 evaluated in 1.TCL in Script 2.TCL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the content of calling Test Script - 1.TCL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while {$i 5} {;#Set the breakpoint at the entry point of the MCONTROL_ManageHallMode() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;puts "Iteration number $i"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp MCONTROL_ManageHallMode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;go&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Get the current value of MotorState.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set X1 [evaluate MotorState]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Let the code execute by clearing the MCONTROL_ManageHallMode() function entrypoint breakpoint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Set the breakpoint at the end of MCONTROL_ManageHallMode() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp MCONTROL_ManageHallMode off&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp BACKGROUND.c 156 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;go&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Verify the value of MotorState at the end of the MCONTROL_ManageHallMode() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set X2 [evaluate MotorState]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;source "D:/Prathibha/Projects/Motor Controller/BLMC/WIP/V&amp;amp;V/2.tcl"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the content of called Test Script - 2.TCL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Clear all the break points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp all off&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#set the while loop index&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set i 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Open a log file to log the test report&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log S "D:/Prathibha/Projects/Motor Controller/BLMC/WIP/V&amp;amp;V/Test 2/whiletest.Log"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while {$i 5} {;#This is to test the comment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;puts "\n Value of i is $i";set i [expr $i + 1]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Close the result file,kill the session and quit the IDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log off S&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking forward to your quick response and support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Prathibha&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2009 18:18:33 GMT</pubDate>
    <dc:creator>Prathibha</dc:creator>
    <dc:date>2009-05-26T18:18:33Z</dc:date>
    <item>
      <title>Passing variables across TCL Scripts</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Passing-variables-across-TCL-Scripts/m-p/184580#M4385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We are working on an Embedded system designed with a MC56F8335 as the core processor. The software for the system is built using the Metrowerks CodeWarrior IDE (Version - 5.6.1.1658). The need of the project is to automate the testing of this software through scripts. We have referred to CodeWarrior™Development Tools IDE 5.5/5.7 Automation Guide for the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actions and Observations:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1.TCL Test Scripts are written, executed and are found to be working as expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. A call and execution of one Test Script from another is also tested and found working. Example – when a Test Script 1.TCL is being executed with a Script to call and execute Test Script 2.TCL, it does the necessary action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clarifications:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is it possible to pass the value of variable from the calling Script to the Script being called? With reference to the examples below, is it possible to PASS and use the values of X1,X2 evaluated in 1.TCL in Script 2.TCL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the content of calling Test Script - 1.TCL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while {$i 5} {;#Set the breakpoint at the entry point of the MCONTROL_ManageHallMode() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;puts "Iteration number $i"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp MCONTROL_ManageHallMode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;go&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Get the current value of MotorState.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set X1 [evaluate MotorState]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Let the code execute by clearing the MCONTROL_ManageHallMode() function entrypoint breakpoint.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Set the breakpoint at the end of MCONTROL_ManageHallMode() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp MCONTROL_ManageHallMode off&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp BACKGROUND.c 156 6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;go&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Verify the value of MotorState at the end of the MCONTROL_ManageHallMode() function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set X2 [evaluate MotorState]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;source "D:/Prathibha/Projects/Motor Controller/BLMC/WIP/V&amp;amp;V/2.tcl"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the content of called Test Script - 2.TCL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Clear all the break points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bp all off&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#set the while loop index&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set i 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Open a log file to log the test report&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log S "D:/Prathibha/Projects/Motor Controller/BLMC/WIP/V&amp;amp;V/Test 2/whiletest.Log"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while {$i 5} {;#This is to test the comment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;puts "\n Value of i is $i";set i [expr $i + 1]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;;#Close the result file,kill the session and quit the IDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;log off S&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking forward to your quick response and support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Prathibha&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 18:18:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Passing-variables-across-TCL-Scripts/m-p/184580#M4385</guid>
      <dc:creator>Prathibha</dc:creator>
      <dc:date>2009-05-26T18:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Passing variables across TCL Scripts</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Passing-variables-across-TCL-Scripts/m-p/184581#M4386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a TCL generic question.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Did you check the TCL web site: &lt;A href="http://www.tcl.tk/" rel="nofollow" target="_blank"&gt;http://www.tcl.tk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There are on-line manuals and tutorial for TCL up there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 16:40:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Passing-variables-across-TCL-Scripts/m-p/184581#M4386</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2009-06-16T16:40:21Z</dc:date>
    </item>
  </channel>
</rss>

