CVS: jtag/funclets counter.S,NONE,1.1 makefile,1.6,1.7
Chris Liechti <[email protected]>
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/jtag/funclets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17021/jtag/funclets
Modified Files:
makefile
Added Files:
counter.S
Log Message:
- add the ability to run funclets for a given time
- new function MSP430_FuncletWait, internal API changes for executeCode
- add a counter funclet (can be used to determine DCO frequency)
- update msp430-jtag with the new feature
--- NEW FILE: counter.S ---
/* This implements a simple 32 bit up counter. It can be used to measure
the frequency of the DCO clock.
The funclet won't stop itself. The idea is that the host runs this funclet for
example for 100ms and then reads the registers R14:R15. The clock
frequency can then be aproximated:
f(dco) = (R14:R15*4)/(0.1s) [Hz]
Usage:
msp430-jtag --result=rall --timeout=0.1 --funclet counter.a43
This programm must be linked specialy so that it's placed in the RAM.
(see makefile).
The first six bytes and its contents are mandatory. Also must the funclet
end with a "jmp $" instruction.
chris <[email protected]>
*/
#include <io.h>
.text
start: .word start ; target address to download in MSP430
.word main ; staring address of code
.word stop ; end address, where the "jmp $" is located
main: clr R14
clr R15
.Lloop: inc R14 ; 1 ]
adc R15 ; 1 ]> 4 clocks/loop
jmp .Lloop ; 2 ]
nop ; PC points past the last instruction for
; a short time, ensure that it is not the
; stop address, and the funclet is stopped
; by accident
stop: jmp stop ; end of program, detected by library
Index: makefile
===================================================================
RCS file: /cvsroot/mspgcc/jtag/funclets/makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- makefile 23 Dec 2005 02:33:55 -0000 1.6
+++ makefile 27 Dec 2005 01:12:11 -0000 1.7
@@ -18,6 +18,7 @@
eraseFlashSegment.ci eraseFlashSegment.lst \
progFlash.ci progFlash.lst \
ramsizeDetect.ci ramsizeDetect.lst \
+ counter.ci counter.lst \
#~ regtest.a43 blinking.a43
#pattern rule for funclets
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click