CVS: jtag/funclets makefile, 1.8, 1.9 progFlash.S, 1.9, 1.10
Chris Liechti <[email protected]> Wed, 15 Nov 2006 12:28:52 -0800
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/jtag/funclets
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26811/jtag/funclets
Modified Files:
makefile progFlash.S
Log Message:
- F20xx support (spy-bi-wire capable devices, use 4 wire JTAG mode)
- separate segment A lock handling (F2xx) so that the flash funclet + data fits again in 128 bytes
- debug messages and internal cleanups
- more updates for MSP430X arch
Index: makefile
===================================================================
RCS file: /cvsroot/mspgcc/jtag/funclets/makefile,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- makefile 27 Dec 2005 13:37:11 -0000 1.8
+++ makefile 15 Nov 2006 20:28:50 -0000 1.9
@@ -16,6 +16,7 @@
#a list of funclets for the default target "all"
all: eraseFlash.ci eraseFlash.lst \
eraseFlashSegment.ci eraseFlashSegment.lst \
+ lockSegmentA.ci lockSegmentA.lst \
progFlash.ci progFlash.lst \
ramsizeDetect.ci ramsizeDetect.lst \
counter.ci counter.lst \
Index: progFlash.S
===================================================================
RCS file: /cvsroot/mspgcc/jtag/funclets/progFlash.S,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- progFlash.S 22 Apr 2006 21:58:29 -0000 1.9
+++ progFlash.S 15 Nov 2006 20:28:50 -0000 1.10
@@ -9,6 +9,8 @@
Notes:
- The system clock has to be set to: 1.41MHz < MCLK < 2.14MHz
+- F2xx SegmentA must be locked/unlocked before this code is used to write
+ to it.
This program must be linked specialy so that it's placed in the RAM.
(see makefile).
@@ -36,21 +38,6 @@
mov length, r8 ; Length to program.
mov #buffer, r10 ; Buffer to program.
- ; XXX doing it a bit too simple here: unlock SegmentA for any write
- ; to the information memory. at least it's not unlocked for writes
- ; to the main Flash...
- cmp #0x1100, addr ; check for SegmentA in F2xx devices
- jhs .LProg ; not segA -> start erase
- //~ cmp #0x10c0, addr ; check for SegmentA in F2xx devices
- //~ jlo .LAgain ; not segA -> start erase
-
- ; Unlock SegmentA (F2xx)
- bit #LOCKA, &FCTL3 ; Test LOCKA
- jz .Lunlocked ; Already unlocked?
- mov #FWKEY|LOCKA, &FCTL3 ; No, unlock SegmentA
-.Lunlocked:
- ; SegmentA is unlocked
-
.LProg: cmp @R10, 0(r9) ; Value already present?
jeq .LNext ; Yes, so skip and advance to next.
mov #FWKEY|WRT, &FCTL1 ; No, so enable writing to flash.
@@ -66,14 +53,7 @@
jnz .LProg ; Program Length words.
abort:
- ; Lock SegmentA again (F2xx)
- bit #LOCKA, &FCTL3 ; Test LOCKA
- jnz .Llocked ; Already locked?
- mov #FWKEY|LOCKA, &FCTL3 ; No, lock SegmentA
-.Llocked:
- ; SegmentA is locked
-
- mov #FWKEY|LOCK, &FCTL3 ; Clear BUSY, set LOCK bits.
+ mov #FWKEY|LOCK, &FCTL3 ; Set LOCK bit.
stop: jmp stop ; Wait here until detected by driver.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV