I want to get a sky node execution trace simulating a network using
cooja. Since, at this moment it's ok for me to get a single node trace,
maybe the easiest way it is to use the already "Debug On" option of
mspsim, that just print the disassemble to console. I tried the trace
command of the msp plug-in CLI (command line interface) but throws an
exception. Besides that, I need a trace of millions of instructions.
My idea is to add a new CLI (command line interface) command. Inspired
from the implementation of other commands, I do modified the class
DebugCommands to add a new command "debug" to call cpu.SetDebug(true)
(above the code snippet). I recompiled mspsim and copy the mspsim.jar to
contiki/tools/mspsim, so that the cooja build process will copy this
file to cooja/apps/mspsim/lib directory. However, this small change will
prevent compiling cooja. After many attempts I verified that the mspsim
downloaded using git, will make the cooja halt after a few ms of
simulation. So I tried with the mspsim-source-2009-04-30 version, but
this time a exception is trowed: java.lang.NoSuchMethodError:
se.sics.mspsim.core.MSP430.setTrace(I)V.
I've seen there is also a "TODO" in the classs
se.sics.cooja.mspmote.MspMote.java in cooja/apps/mspsim/MspMote.java
(line: this.myCpu.setTrace(0); /* TODO Enable */), and such a methods
there is not in the mspsim version I get. I imagine mspsim.jar coming
with the contiki-2.5.rc1.zp has this method, but it is not clear how to
"call" this method from cooja or even if it is appropriate for my purposes.
I hope if I get a compatible version of the source code of mspsim and
cooja I will manage to implement and use the proposed modification.
Any clue? I would appreciate also any suggestion about how to get an
execution trace.
Best regards,
Leo
---------------------
DebugCommands.java [snippet]
ch.registerCommand("debug", new BasicCommand("debug, print
execution trace", "<on|off>") {
public int executeCommand(final CommandContext context) {
if ("on".equals(context.getArgument(0)))
cpu.setDebug(true);
else if ("off".equals(context.getArgument(0)))
cpu.setDebug(false);
return 0;
}
});
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Contiki-developers mailing list
Contiki-d...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/contiki-developers
------------------------
Listing.
1.- mspsim from git and contiki from git => compilation error
...
compile:
[javac] Compiling 15 source files to
/home/leo/work/contiki/tools/cooja/apps/mspsim/build
[javac]
/home/leo/work/contiki/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/MspSerial.java:75:
<anonymous se.sics.cooja.mspmote.interfaces.MspSerial$1> is not abstract
and does not override abstract method
dataReceived(se.sics.mspsim.core.USARTSource,int) in
se.sics.mspsim.core.USARTListener
[javac] usart.setUSARTListener(new USARTListener() {
[javac] ^
[javac]
/home/leo/work/contiki/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/interfaces/TR1001Radio.java:73:
se.sics.cooja.mspmote.interfaces.TR1001Radio is not abstract and does
not override abstract method
dataReceived(se.sics.mspsim.core.USARTSource,int) in
se.sics.mspsim.core.USARTListener
[javac] public class TR1001Radio extends Radio implements
USARTListener, CustomDataRadio {
[javac] ^
[javac] 2 errors
2.- mspsim form git and contiki-2.5.rc1 => runtime error
[java] **** Warning - writing to CC2420 when VREG is off!!!
[java] Exception in thread "Thread-3" java.lang.AbstractMethodError
[java] at se.sics.mspsim.core.USART.handleTransmit(USART.java:375)
[java] at se.sics.mspsim.core.USART.access$000(USART.java:44)
[java] at se.sics.mspsim.core.USART$1.execute(USART.java:123)
[java] at
se.sics.mspsim.core.MSP430Core.executeEvents(MSP430Core.java:557)
[java] at
se.sics.mspsim.core.MSP430Core.emulateOP(MSP430Core.java:1574)
[java] at se.sics.mspsim.core.MSP430.stepMicros(MSP430.java:265)
[java] at se.sics.cooja.mspmote.MspMote.execute(MspMote.java:327)
[java] at se.sics.cooja.mspmote.MspMote.execute(MspMote.java:300)
[java] at
se.sics.cooja.motes.AbstractWakeupMote$1.execute(AbstractWakeupMote.java:46)
[java] at se.sics.cooja.Simulation.run(Simulation.java:270)
[java] at java.lang.Thread.run(Thread.java:636)
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
I have updated Contiki with latest version of MSPSim.
MSPSim from git and Contiki from git should now work together.
Best regards,
-- Niclas Finne
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
Do you need an instruction trace? I often use the MSPSim command
'logcalls' to trace function calls.
Best regards,
-- Niclas Finne
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
If I remember right, there is something like I a next tick hook. You
could try using that to dump the PC. This might even work platform
independent.
Cheers
Morty
--
Dipl.-Ing. Moritz 'Morty' Struebe (Wissenschaftlicher Mitarbeiter)
Lehrstuhl für Informatik 4 (Verteilte Systeme und Betriebssysteme)
Friedrich-Alexander-Universität Erlangen-Nürnberg
Martensstr. 1
91058 Erlangen
Tel : +49 9131 85-25419
Fax : +49 9131 85-28732
eMail : str...@informatik.uni-erlangen.de
WWW : http://www4.informatik.uni-erlangen.de/~morty
Hi,
It seems that the DwarfReader class in mspsim doesn't implement the
getExecutableAddresses and getSourceFiles methods.
Does someone, by any chance, already have code for them, or should I get
to it?
Best regards,
Alexandre
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2