SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on how to get your MSP JTAG programmer up and running.
By qwertyuiop
#106708
Hi,

I'm using a Telos (Rev B) and I have to calculate the execution time of a program that I have to load in the MSP430.
First of all, do I need to load the algorithm or can I calculate the execution time just by reading the .c or .nc files?
Then, how I calculate it without any simulator using only a pen and a paper?
I'm in trouble with that problem.

I really hope you could easily help me,

Thanks a lot.
User avatar
By leon_heller
#106709
I use the CrossWorks simulator. If you don't have one you will have to do it the hard way, by counting cycles using an assembler listing. The compiler you are using should be able to create one.
By qwertyuiop
#106796
Well...ehm...the "hard way" in what consist? I'm not very able with programming so I don't know much.
But another real problem is that the program is written in NesC and in the program I can't find the kind of instructions that they could use to program MSP430 (as MOVE, PUSH, RETI...).
Wich file I have to "read"? .nc? .h?

Sorry for the wast of time,
Thanks in advance,
User avatar
By leon_heller
#106799
You need it to generate a .asm file, or .s. Details should be in the documentation.
By theatrus
#106862
If you end up with a .elf or .bin or similar binary, you can use objdump to recover the listing:

msp430-objdump -d -s [filename] > outfilename