This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone,
While debugging in ccs v6.0, I checked the "Halt the target before any debugger access" checkbox located in "target -> Auto Run and Launch options", so that I can visualize the graph data during run time.
But how can I enable this option ("Halt the target before any debugger access" ) in GUI Composer Runtime v6.0?
At present, I can't see any value on my graph in GUI Composer Runtime stand alone application, but its working perfectly fine in ccs v6.0.
I followed the following tutorial:
http://processors.wiki.ti.com/index.php/GUI_Composer/Logging_Graph_Data
Thanks in advance!
You can find this setting in the appInitScript.js file for your application.
Patrick
Hi Patrick,
Thanks for your quick and valuable response. It helped me a lot. I want to display the changes in the value of a variable used in a target program continuously over a graph.
To solve my problem, I am adding following line in appInitScript.js:
if (!session.target.isHalted())
{
// This command halts the target on initialization
session.target.halt();
}
And I have added one Start Button in my GUI app which starts running the program by calling the following function declared in my dsScript.js:
function start(){
if(!$active_context_name) {
throw "An active Debug Session is required for myStepOver()";
}
var debugServer = ScriptingEnvironment.instance().getServer('DebugServer.1');
var session = debugServer.openSession($active_context_name);
var i;
for( i = 0; ; ++i) // Infinite loop
{
// Halts on every Step
session.target.sourceStep.over();
if (!session.target.isHalted())
{
session.target.halt();
}
}
}
Its working correctly, but taking too much time because it halts on each step. I want it to halt only when that variable value changes, so that it can display the changes on graph.
Is that possible?
Thanks,
Dhruv
You do not need the loop. Simply call session.target.runAsynch(), the same call as in the appInitScript.js file.
In dsScript.js, i replaced the loop with this:
if (!session.target.isHalted())
{
session.target.halt();
}
session.target.runAsynch();
Now it shows me following error on pressing the start button:
sun.org.mozilla.javascript.internal.EvaluationException:syntax error(#19)
do you know which line is causing the exception? isHalt()? or halt() or runAsynch().
"runAsynch()" is causing the exception because even after removing the halt, the same error persist!
Maybe this has to due with the target code. Can you try to execute the same command in the scripting console in eclipse and see if there is any error?
Hi Patrick,
I tried it in code compose studio. It doesn't show any error.
Also, I have one more question, please answer if possible :
If I give a device that has a target program pre-loaded to my customer. Will it be possible for him to run it without using JTAG on GUI Composer runtime?
I don't want him to use the JTAG for running the GUI application. I want him to use just a serial cable.
In following link, it has been written that "It is also important to ensure that your device has your target program pre-loaded and device is in a running state as GUI Composer Runtime will not load program or put it in a running state. It will simply open a COM port specified and attempt a data exchange. "
http://processors.wiki.ti.com/index.php/ProgramModelUart_GuiComposer
I am not sure what might have cause the dss script exception.
To use uart transport for GUI Composer, you will need to provide a monitor on your target to communicate with the host, as in the link from your previous post.
HI Patrick,
I actually didn't understand that tutorial completely like what functions need to be implemented in order to provide monitor on my target etc. I tried to run that project but it gives an error. I even posted my query based on it in the forum:
http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/344585/1205466.aspx#1205466
So, I tried to follow the another approach as listed in this tutorial: http://processors.wiki.ti.com/index.php/Streaming_GuiComposer
I made a simple application which displays transmitted bytes in a text box. It is working fine if I don't provide a com port for UART communication in .ccxml file. But on providing com port it gives me an error:
" ComPort: Trouble Reading Memory Block at 0x1100 on Page 0 of Length 0x2: **Error**: Serial Communication failed at port: COM18, baud rate:115200! To use serial monitor, please ensure the following prerequisites are satisfied: 1. Make sure the cable is plugged into both the target and the host on the right COM port. 2. Make sure a compatible target side serial monitor is loaded and running on the target device."
I think it is because I am not providing monitor on target side, I guess. I even don't know whether in this approach, a com port will be needed or not because it is no where said in the tutorial.
Content of app.js:
require(["dojo/ready"], function(ready){
ready(function(){
});
});
//This function receives all bytes sent by the target program once the COM port is opened
function onStreamInPropertyChanged( propertyName, newValue, oldValue) {
var w = dijit.byId("widget_textbox1");
var v = w.get("value");
w.set("value", v + "," +newValue);
}
Any suggestion would be helpful because am stuck now and don't know what should I implement. If you could tell me what is the best thing to do so that JTAG won't be required by the end user, it'll be really helpful.
Thanks in advance!
Dhruv
Hi patrick,
Just want you to clear one doubt of mine that whether this approach: http://processors.wiki.ti.com/index.php/Streaming_GuiComposer
requires JTAG? If not, then do it also require a monitor on my target to use UART transport for GUI composer?
Thanks
-Dhruv
Please continue uart discussion with your other thread.
http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/344585.aspx