You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(21) |
Nov
(12) |
Dec
(41) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(25) |
Feb
(54) |
Mar
(63) |
Apr
(52) |
May
(17) |
Jun
(3) |
Jul
(3) |
Aug
(5) |
Sep
(49) |
Oct
(50) |
Nov
(34) |
Dec
(14) |
2009 |
Jan
(9) |
Feb
(15) |
Mar
(38) |
Apr
(12) |
May
(35) |
Jun
(20) |
Jul
(2) |
Aug
(7) |
Sep
(36) |
Oct
(24) |
Nov
(2) |
Dec
(2) |
2010 |
Jan
(14) |
Feb
(1) |
Mar
(36) |
Apr
(2) |
May
(4) |
Jun
(6) |
Jul
(35) |
Aug
(11) |
Sep
(8) |
Oct
(3) |
Nov
|
Dec
(1) |
2011 |
Jan
(11) |
Feb
(12) |
Mar
(3) |
Apr
(7) |
May
(12) |
Jun
(8) |
Jul
|
Aug
(3) |
Sep
(4) |
Oct
|
Nov
(2) |
Dec
(4) |
2012 |
Jan
(2) |
Feb
(1) |
Mar
(14) |
Apr
(5) |
May
(28) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(21) |
Nov
(4) |
Dec
(1) |
2013 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ni...@us...> - 2008-12-03 13:04:36
|
Revision: 437 http://mspsim.svn.sourceforge.net/mspsim/?rev=437&view=rev Author: nifi Date: 2008-12-03 13:04:33 +0000 (Wed, 03 Dec 2008) Log Message: ----------- updated for newer version of JFreeChart Modified Paths: -------------- mspsim/Makefile Modified: mspsim/Makefile =================================================================== --- mspsim/Makefile 2008-12-03 12:57:58 UTC (rev 436) +++ mspsim/Makefile 2008-12-03 13:04:33 UTC (rev 437) @@ -13,7 +13,6 @@ ############################################################### CC=javac JAVA=java -JAVACC=javacc JAR=jar RM=rm -f CP=cp @@ -95,7 +94,7 @@ @echo >>$@ "Manifest-Version: 1.0" @echo >>$@ "Sealed: true" @echo >>$@ "Main-Class: se.sics.mspsim.Main" - @echo >>$@ "Class-path: lib/jfreechart-1.0.9.jar lib/jcommon-1.0.12.jar" + @echo >>$@ "Class-path: lib/jfreechart-1.0.11.jar lib/jcommon-1.0.14.jar" help: @echo "Usage: make [all,compile,clean,run,runsky,runesb]" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-03 12:57:59
|
Revision: 436 http://mspsim.svn.sourceforge.net/mspsim/?rev=436&view=rev Author: joxe Date: 2008-12-03 12:57:58 +0000 (Wed, 03 Dec 2008) Log Message: ----------- minor fix on USART Modified Paths: -------------- mspsim/se/sics/mspsim/core/USART.java Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-12-03 12:21:08 UTC (rev 435) +++ mspsim/se/sics/mspsim/core/USART.java 2008-12-03 12:57:58 UTC (rev 436) @@ -261,6 +261,7 @@ case UTXBUF: return utxbuf; case URXBUF: + int tmp = urxbuf; // When byte is read - the interruptflag is cleared! // and error status should also be cleared later... if (MSP430Constants.DEBUGGING_LEVEL > 0) { @@ -270,7 +271,7 @@ if (listener != null) { listener.stateChanged(USARTListener.RXFLAG_CLEARED); } - return urxbuf; + return tmp; } return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fro...@us...> - 2008-12-03 12:21:11
|
Revision: 435 http://mspsim.svn.sourceforge.net/mspsim/?rev=435&view=rev Author: fros4943 Date: 2008-12-03 12:21:08 +0000 (Wed, 03 Dec 2008) Log Message: ----------- +empty USART stateChanged() method Modified Paths: -------------- mspsim/se/sics/mspsim/chip/M25P80.java Modified: mspsim/se/sics/mspsim/chip/M25P80.java =================================================================== --- mspsim/se/sics/mspsim/chip/M25P80.java 2008-12-03 12:08:09 UTC (rev 434) +++ mspsim/se/sics/mspsim/chip/M25P80.java 2008-12-03 12:21:08 UTC (rev 435) @@ -94,6 +94,9 @@ this.cpu = cpu; } + public void stateChanged(int state) { + } + public void dataReceived(USART source, int data) { if (chipSelect) { if (DEBUG) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-03 12:08:11
|
Revision: 434 http://mspsim.svn.sourceforge.net/mspsim/?rev=434&view=rev Author: joxe Date: 2008-12-03 12:08:09 +0000 (Wed, 03 Dec 2008) Log Message: ----------- added stateChanged and RXFLAG_CLEARED notification in USART and USARTListener Modified Paths: -------------- mspsim/se/sics/mspsim/chip/CC2420.java mspsim/se/sics/mspsim/chip/FileAT45DB.java mspsim/se/sics/mspsim/chip/FileM25P80.java mspsim/se/sics/mspsim/chip/TR1001.java mspsim/se/sics/mspsim/core/USART.java mspsim/se/sics/mspsim/core/USARTListener.java mspsim/se/sics/mspsim/platform/sky/SkyNode.java mspsim/se/sics/mspsim/platform/sky/TelosNode.java mspsim/se/sics/mspsim/ui/SerialMon.java mspsim/se/sics/mspsim/util/Test.java Modified: mspsim/se/sics/mspsim/chip/CC2420.java =================================================================== --- mspsim/se/sics/mspsim/chip/CC2420.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/chip/CC2420.java 2008-12-03 12:08:09 UTC (rev 434) @@ -1065,5 +1065,10 @@ "\n SPI State: " + state + "\n"; } + + public void stateChanged(int state) { + // TODO Auto-generated method stub + + } } // CC2420 Modified: mspsim/se/sics/mspsim/chip/FileAT45DB.java =================================================================== --- mspsim/se/sics/mspsim/chip/FileAT45DB.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/chip/FileAT45DB.java 2008-12-03 12:08:09 UTC (rev 434) @@ -140,4 +140,9 @@ file.write(b); } + public void stateChanged(int state) { + // TODO Auto-generated method stub + + } + } // FileAT45DB Modified: mspsim/se/sics/mspsim/chip/FileM25P80.java =================================================================== --- mspsim/se/sics/mspsim/chip/FileM25P80.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/chip/FileM25P80.java 2008-12-03 12:08:09 UTC (rev 434) @@ -176,4 +176,8 @@ pos += b.length; } + public void stateChanged(int state) { + // TODO Auto-generated method stub + } + } // FileM25P80 Modified: mspsim/se/sics/mspsim/chip/TR1001.java =================================================================== --- mspsim/se/sics/mspsim/chip/TR1001.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/chip/TR1001.java 2008-12-03 12:08:09 UTC (rev 434) @@ -76,4 +76,7 @@ public void dataReceived(USART source, int data) { } + public void stateChanged(int state) { + } + } Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/core/USART.java 2008-12-03 12:08:09 UTC (rev 434) @@ -267,6 +267,9 @@ System.out.println(getName() + " clearing rx interrupt flag"); } clrBitIFG(urxifg); + if (listener != null) { + listener.stateChanged(USARTListener.RXFLAG_CLEARED); + } return urxbuf; } return 0; Modified: mspsim/se/sics/mspsim/core/USARTListener.java =================================================================== --- mspsim/se/sics/mspsim/core/USARTListener.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/core/USARTListener.java 2008-12-03 12:08:09 UTC (rev 434) @@ -42,5 +42,7 @@ package se.sics.mspsim.core; public interface USARTListener { + public static int RXFLAG_CLEARED = 1; public void dataReceived(USART source, int data); + public void stateChanged(int state); } Modified: mspsim/se/sics/mspsim/platform/sky/SkyNode.java =================================================================== --- mspsim/se/sics/mspsim/platform/sky/SkyNode.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/platform/sky/SkyNode.java 2008-12-03 12:08:09 UTC (rev 434) @@ -106,4 +106,9 @@ node.setupArgs(config); } + public void stateChanged(int state) { + // TODO Auto-generated method stub + + } + } Modified: mspsim/se/sics/mspsim/platform/sky/TelosNode.java =================================================================== --- mspsim/se/sics/mspsim/platform/sky/TelosNode.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/platform/sky/TelosNode.java 2008-12-03 12:08:09 UTC (rev 434) @@ -107,4 +107,9 @@ node.setupArgs(config); } + public void stateChanged(int state) { + // TODO Auto-generated method stub + + } + } Modified: mspsim/se/sics/mspsim/ui/SerialMon.java =================================================================== --- mspsim/se/sics/mspsim/ui/SerialMon.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/ui/SerialMon.java 2008-12-03 12:08:09 UTC (rev 434) @@ -42,11 +42,8 @@ package se.sics.mspsim.ui; import java.awt.BorderLayout; import java.awt.Color; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; -import java.util.ArrayList; import javax.swing.JFrame; import javax.swing.JLabel; @@ -73,30 +70,9 @@ private int rPos = 0; private int bsize = 0; - private ActionListener bufferTimer = new ActionListener() { - public void actionPerformed(ActionEvent evt) { - if (bsize > 0) { - if (usart.isReceiveFlagCleared()) { - usart.byteReceived(buffer[rPos]); - rPos = (rPos + 1) % BUFFER_SIZE; - if (bsize == 20) { - statusLabel.setText(keyBuffer.toString()); - } - bsize--; - } - } else { - timer.stop(); - } - } - }; - - private javax.swing.Timer timer = new javax.swing.Timer(100, bufferTimer); private int lines = 1; private boolean isUpdatePending = false; - private StringBuilder keyBuffer = new StringBuilder(); - - - + private StringBuilder keyBuffer = new StringBuilder(); public SerialMon(USART usart, String name) { this.name = name; @@ -174,9 +150,6 @@ buffer[wPos] = (byte) (c & 0xff); wPos = (wPos + 1) % BUFFER_SIZE; bsize++; - if (!timer.isRunning()) { - timer.start(); - } } if (bsize < BUFFER_SIZE) { @@ -195,4 +168,16 @@ } } + public void stateChanged(int state) { + if (state == USARTListener.RXFLAG_CLEARED && bsize > 0) { + if (usart.isReceiveFlagCleared()) { + usart.byteReceived(buffer[rPos]); + rPos = (rPos + 1) % BUFFER_SIZE; + if (bsize == 20) { + statusLabel.setText(keyBuffer.toString()); + } + bsize--; + } + } + } } Modified: mspsim/se/sics/mspsim/util/Test.java =================================================================== --- mspsim/se/sics/mspsim/util/Test.java 2008-12-03 10:14:56 UTC (rev 433) +++ mspsim/se/sics/mspsim/util/Test.java 2008-12-03 12:08:09 UTC (rev 434) @@ -113,4 +113,9 @@ } } + + public void stateChanged(int state) { + // TODO Auto-generated method stub + + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-03 10:15:31
|
Revision: 433 http://mspsim.svn.sourceforge.net/mspsim/?rev=433&view=rev Author: joxe Date: 2008-12-03 10:14:56 +0000 (Wed, 03 Dec 2008) Log Message: ----------- improved reset of UART Modified Paths: -------------- mspsim/se/sics/mspsim/core/USART.java Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-12-02 18:13:23 UTC (rev 432) +++ mspsim/se/sics/mspsim/core/USART.java 2008-12-03 10:14:56 UTC (rev 433) @@ -145,6 +145,7 @@ public void reset(int type) { nextTXReady = cpu.cycles + 1000; nextTXByte = -1; + clrBitIFG(utxifg | urxifg); cpu.scheduleCycleEvent(txTrigger, nextTXReady); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-02 18:13:27
|
Revision: 432 http://mspsim.svn.sourceforge.net/mspsim/?rev=432&view=rev Author: joxe Date: 2008-12-02 18:13:23 +0000 (Tue, 02 Dec 2008) Log Message: ----------- changed autorun script to start mspsim Modified Paths: -------------- mspsim/scripts/autorun.sc Modified: mspsim/scripts/autorun.sc =================================================================== --- mspsim/scripts/autorun.sc 2008-12-02 18:12:00 UTC (rev 431) +++ mspsim/scripts/autorun.sc 2008-12-02 18:13:23 UTC (rev 432) @@ -3,4 +3,4 @@ #exec rm log.txt #log CC2420 >log.txt #printcalls >log.txt -#start +start This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-12-02 18:12:04
|
Revision: 431 http://mspsim.svn.sourceforge.net/mspsim/?rev=431&view=rev Author: joxe Date: 2008-12-02 18:12:00 +0000 (Tue, 02 Dec 2008) Log Message: ----------- added printout when misaligned word writes/reads are performed Modified Paths: -------------- mspsim/scripts/autorun.sc mspsim/se/sics/mspsim/core/MSP430Constants.java mspsim/se/sics/mspsim/core/MSP430Core.java Modified: mspsim/scripts/autorun.sc =================================================================== --- mspsim/scripts/autorun.sc 2008-11-26 12:07:51 UTC (rev 430) +++ mspsim/scripts/autorun.sc 2008-12-02 18:12:00 UTC (rev 431) @@ -3,4 +3,4 @@ #exec rm log.txt #log CC2420 >log.txt #printcalls >log.txt -start +#start Modified: mspsim/se/sics/mspsim/core/MSP430Constants.java =================================================================== --- mspsim/se/sics/mspsim/core/MSP430Constants.java 2008-11-26 12:07:51 UTC (rev 430) +++ mspsim/se/sics/mspsim/core/MSP430Constants.java 2008-12-02 18:12:00 UTC (rev 431) @@ -105,7 +105,7 @@ }; public static final String[] REGISTER_NAMES = { - "PC", "SP", "SR", "CG1", "CG2" + "PC", "SP", "SR", "CG1", "CG2" }; public static final int PC = 0; Modified: mspsim/se/sics/mspsim/core/MSP430Core.java =================================================================== --- mspsim/se/sics/mspsim/core/MSP430Core.java 2008-11-26 12:07:51 UTC (rev 430) +++ mspsim/se/sics/mspsim/core/MSP430Core.java 2008-12-02 18:12:00 UTC (rev 431) @@ -598,7 +598,11 @@ address &= 0xffff; val = memory[address] & 0xff; if (word) { - val |= (memory[(address + 1) & 0xffff] << 8); + val |= (memory[(address + 1) & 0xffff] << 8); + if ((address & 1) != 0) { + System.out.println("**** Illegal read - misaligned word from: " + + Utils.hex16(address) + " at " + Utils.hex16(reg[PC])); + } } } if (breakPoints[address] != null) { @@ -620,7 +624,11 @@ // TODO: add check for Flash / RAM! memory[dstAddress] = dst & 0xff; if (word) { - memory[dstAddress + 1] = (dst >> 8) & 0xff; + memory[dstAddress + 1] = (dst >> 8) & 0xff; + if ((dstAddress & 1) != 0) { + System.out.println("**** Illegal write - misaligned word to: " + + Utils.hex16(dstAddress) + " at " + Utils.hex16(reg[PC])); + } } } } @@ -785,6 +793,7 @@ cycles++; break; case AM_INDEX: + // TODO: needs to handle if SR is used! dstAddress = readRegisterCG(dstRegister, ad) + memory[pc] + (memory[pc + 1] << 8); @@ -812,12 +821,6 @@ } break; } -// case AM_IND_AUTOINC: -// dstAddress = readRegister(dstRegister); -// writeRegister(dstRegister, dstAddress + (word ? 2 : 1)); -// cycles += 3; -// break; -// } } @@ -1035,6 +1038,7 @@ // PC Could have changed above! pc = readRegister(PC); if (dstRegister == 2) { + /* absolute mode */ dstAddress = memory[pc] + (memory[pc + 1] << 8); } else { // CG here??? @@ -1112,8 +1116,8 @@ sr = readRegister(SR); sr = (sr & ~(CARRY | OVERFLOW)) | (dst >= src ? CARRY : 0); - tmp = dst - src; - + tmp = (dst - src); + if (((src ^ tmp) & b) == 0 && (((src ^ dst) & b) != 0)) { sr |= OVERFLOW; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-26 12:07:55
|
Revision: 430 http://mspsim.svn.sourceforge.net/mspsim/?rev=430&view=rev Author: nifi Date: 2008-11-26 12:07:51 +0000 (Wed, 26 Nov 2008) Log Message: ----------- added timestamp command Modified Paths: -------------- mspsim/se/sics/mspsim/cli/BasicLineCommand.java mspsim/se/sics/mspsim/cli/MiscCommands.java Modified: mspsim/se/sics/mspsim/cli/BasicLineCommand.java =================================================================== --- mspsim/se/sics/mspsim/cli/BasicLineCommand.java 2008-11-25 10:28:06 UTC (rev 429) +++ mspsim/se/sics/mspsim/cli/BasicLineCommand.java 2008-11-26 12:07:51 UTC (rev 430) @@ -50,4 +50,8 @@ public BasicLineCommand(String cmdHelp, String argHelp) { super(cmdHelp, argHelp); } + + public void stopCommand(CommandContext context) { + context.exit(0); + } } Modified: mspsim/se/sics/mspsim/cli/MiscCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-25 10:28:06 UTC (rev 429) +++ mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-26 12:07:51 UTC (rev 430) @@ -42,7 +42,6 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintStream; @@ -91,9 +90,26 @@ out.println(line); } } - public void stopCommand(CommandContext context) { - context.exit(0); + }); + + handler.registerCommand("timestamp", new BasicLineCommand("print lines with timestamp prefixed", "") { + private PrintStream out; + private MSP430 cpu; + long startTime; + + public int executeCommand(CommandContext context) { + cpu = (MSP430) registry.getComponent(MSP430.class); + if (cpu == null) { + context.err.println("could not access the CPU."); + return 1; + } + out = context.out; + startTime = System.currentTimeMillis() - (long)cpu.getTimeMillis(); + return 0; } + public void lineRead(String line) { + out.println(Long.toString(startTime + (long)cpu.getTimeMillis()) + ' ' + line); + } }); // TODO: this should also be "registered" as a "sink". @@ -283,8 +299,6 @@ public void lineRead(String line) { context.executeCommand(command); } - public void stopCommand(CommandContext context) { - } }); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-25 10:28:08
|
Revision: 429 http://mspsim.svn.sourceforge.net/mspsim/?rev=429&view=rev Author: nifi Date: 2008-11-25 10:28:06 +0000 (Tue, 25 Nov 2008) Log Message: ----------- removed Java 1.6 dependency Modified Paths: -------------- mspsim/se/sics/mspsim/platform/esb/ESBGui.java mspsim/se/sics/mspsim/util/ELFDebug.java Modified: mspsim/se/sics/mspsim/platform/esb/ESBGui.java =================================================================== --- mspsim/se/sics/mspsim/platform/esb/ESBGui.java 2008-11-24 10:34:48 UTC (rev 428) +++ mspsim/se/sics/mspsim/platform/esb/ESBGui.java 2008-11-25 10:28:06 UTC (rev 429) @@ -47,6 +47,7 @@ import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.event.MouseMotionAdapter; import java.net.URL; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; @@ -134,8 +135,7 @@ }); - MouseAdapter mouseListener = new MouseAdapter() { - + addMouseMotionListener(new MouseMotionAdapter() { public void mouseMoved(MouseEvent e) { // System.out.println("Mouse moved: " + e.getX() + "," + e.getY()); int x = e.getX(); @@ -143,7 +143,8 @@ node.setPIR(x > 18 && x < 80 && y > 35 && y < 100); node.setVIB(x > 62 && x < 95 && y > 160 && y < 178); } - + }); + addMouseListener(new MouseAdapter() { // For the button sensor on the ESB nodes. public void mousePressed(MouseEvent e) { int x = e.getX(); @@ -175,11 +176,8 @@ resetDown = false; } } + }); - }; - addMouseMotionListener(mouseListener); - addMouseListener(mouseListener); - // Add some windows for listening to serial output MSP430 cpu = node.getCPU(); IOUnit usart = cpu.getIOUnit("USART 1"); Modified: mspsim/se/sics/mspsim/util/ELFDebug.java =================================================================== --- mspsim/se/sics/mspsim/util/ELFDebug.java 2008-11-24 10:34:48 UTC (rev 428) +++ mspsim/se/sics/mspsim/util/ELFDebug.java 2008-11-25 10:28:06 UTC (rev 429) @@ -234,7 +234,7 @@ } else { currentFile = stab.data; - if (currentFile != null && !currentFile.isEmpty()) { + if (currentFile != null && currentFile.length() > 0) { if (currentPath == null) { sourceFiles.add(currentFile); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-24 10:34:54
|
Revision: 428 http://mspsim.svn.sourceforge.net/mspsim/?rev=428&view=rev Author: nifi Date: 2008-11-24 10:34:48 +0000 (Mon, 24 Nov 2008) Log Message: ----------- updated to latest version of JFreeChart Modified Paths: -------------- mspsim/Makefile Added Paths: ----------- mspsim/lib/jcommon-1.0.14.jar mspsim/lib/jfreechart-1.0.11.jar Removed Paths: ------------- mspsim/lib/jcommon-1.0.12.jar mspsim/lib/jfreechart-1.0.9.jar Modified: mspsim/Makefile =================================================================== --- mspsim/Makefile 2008-11-24 09:45:46 UTC (rev 427) +++ mspsim/Makefile 2008-11-24 10:34:48 UTC (rev 428) @@ -46,7 +46,7 @@ # Arguments ############################################################### -CLASSPATH=.$(SEPARATOR)lib/jfreechart-1.0.9.jar$(SEPARATOR)lib/jcommon-1.0.12.jar +CLASSPATH=.$(SEPARATOR)lib/jfreechart-1.0.11.jar$(SEPARATOR)lib/jcommon-1.0.14.jar CCARGS=-deprecation -classpath "${CLASSPATH}" JAVAARGS=-classpath "${CLASSPATH}" @@ -66,10 +66,10 @@ CPUTEST := tests/cputest.firmware -SCRIPTS := ${addprefix scripts/,autorun.sc duty.sc} -BINARY := README.txt license.txt CHANGE_LOG.txt images/*.jpg firmware/*/*.firmware ${SCRIPTS} +SCRIPTS := ${addprefix scripts/,autorun.sc duty.sc} +BINARY := README.txt license.txt CHANGE_LOG.txt images/*.jpg firmware/*/*.firmware ${SCRIPTS} -PACKAGES := ${addprefix se/sics/mspsim/,core platform platform/esb platform/sky . cli ui util chip extutil/highlight extutil/jfreechart} +PACKAGES := se/sics/mspsim ${addprefix se/sics/mspsim/,core platform platform/esb platform/sky cli ui util chip extutil/highlight extutil/jfreechart} SOURCES := ${wildcard *.java $(addsuffix /*.java,$(PACKAGES))} @@ -134,7 +134,7 @@ ############################################################### source: - zip -9 mspsim-source-`date '+%F'`.zip Makefile $(BINARY) *.java $(addsuffix /*.java,$(PACKAGES)) tests/Makefile tests/*.c tests/*.h lib/*.* + zip -9 mspsim-source-`date '+%F'`.zip Makefile $(BINARY) $(addsuffix /*.java,$(PACKAGES)) tests/Makefile tests/*.c tests/*.h lib/*.* ############################################################### Deleted: mspsim/lib/jcommon-1.0.12.jar =================================================================== (Binary files differ) Added: mspsim/lib/jcommon-1.0.14.jar =================================================================== (Binary files differ) Property changes on: mspsim/lib/jcommon-1.0.14.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: mspsim/lib/jfreechart-1.0.11.jar =================================================================== (Binary files differ) Property changes on: mspsim/lib/jfreechart-1.0.11.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: mspsim/lib/jfreechart-1.0.9.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-24 09:45:50
|
Revision: 427 http://mspsim.svn.sourceforge.net/mspsim/?rev=427&view=rev Author: joxe Date: 2008-11-24 09:45:46 +0000 (Mon, 24 Nov 2008) Log Message: ----------- added scripts in Makefile Modified Paths: -------------- mspsim/Makefile Modified: mspsim/Makefile =================================================================== --- mspsim/Makefile 2008-11-24 09:37:25 UTC (rev 426) +++ mspsim/Makefile 2008-11-24 09:45:46 UTC (rev 427) @@ -66,7 +66,8 @@ CPUTEST := tests/cputest.firmware -BINARY := README.txt license.txt CHANGE_LOG.txt images/*.jpg firmware/*/*.firmware +SCRIPTS := ${addprefix scripts/,autorun.sc duty.sc} +BINARY := README.txt license.txt CHANGE_LOG.txt images/*.jpg firmware/*/*.firmware ${SCRIPTS} PACKAGES := ${addprefix se/sics/mspsim/,core platform platform/esb platform/sky . cli ui util chip extutil/highlight extutil/jfreechart} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-24 09:37:39
|
Revision: 426 http://mspsim.svn.sourceforge.net/mspsim/?rev=426&view=rev Author: nifi Date: 2008-11-24 09:37:25 +0000 (Mon, 24 Nov 2008) Log Message: ----------- fixed to warn if script file is not found (source) Modified Paths: -------------- mspsim/se/sics/mspsim/cli/MiscCommands.java Modified: mspsim/se/sics/mspsim/cli/MiscCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-21 23:05:05 UTC (rev 425) +++ mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-24 09:37:25 UTC (rev 426) @@ -40,6 +40,7 @@ */ package se.sics.mspsim.cli; import java.io.BufferedReader; +import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; @@ -174,28 +175,30 @@ handler.registerCommand("source", new BasicCommand("run script", "<filename>") { public int executeCommand(CommandContext context) { - FileInputStream infs = null; - try { - infs = new FileInputStream(context.getArgument(0)); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + File fp = new File(context.getArgument(0)); + if (!fp.canRead()) { + context.err.println("could not find the script file '" + context.getArgument(0) + "'."); + return 1; } - BufferedReader input = new BufferedReader(new InputStreamReader(infs)); - String line = null; try { - while ((line = input.readLine()) != null) { - context.executeCommand(line); + FileInputStream infs = new FileInputStream(fp); + BufferedReader input = new BufferedReader(new InputStreamReader(infs)); + try { + String line; + while ((line = input.readLine()) != null) { + context.executeCommand(line); + } + } finally { + input.close(); } } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + e.printStackTrace(context.err); + return 1; } return 0; } }); - handler.registerCommand("repeat", new BasicAsyncCommand("repeat the specified command line", "[-t delay] [-c count] <command line>") { private MSP430 cpu; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-21 23:05:09
|
Revision: 425 http://mspsim.svn.sourceforge.net/mspsim/?rev=425&view=rev Author: joxe Date: 2008-11-21 23:05:05 +0000 (Fri, 21 Nov 2008) Log Message: ----------- removed bad import Modified Paths: -------------- mspsim/CHANGE_LOG.txt mspsim/se/sics/mspsim/cli/MiscCommands.java Modified: mspsim/CHANGE_LOG.txt =================================================================== --- mspsim/CHANGE_LOG.txt 2008-11-21 17:20:27 UTC (rev 424) +++ mspsim/CHANGE_LOG.txt 2008-11-21 23:05:05 UTC (rev 425) @@ -10,10 +10,11 @@ - improved CC2420 support including correct overflow handling and better handling of VREG_OFF - added logging on/off from CLI and support for loggin CC2420 +- added CLI commands tee and trig. 0.94 Changes: -- fixed so that IOPorts output 1 on pins that are configured as input +- fixed so that IOPorts output 1 on pins that are configured as input (with DIR) - fixed notification of operating modes on the CC2420 for duty cycle calculation, etc. - fixed status register update bug (byte/word problem) @@ -25,7 +26,7 @@ - improved correctness of timer when reconfiguring CPU clock speed (MCLK) - improved interrupt handling in MSP430 core - added CLI command printcalls that prints all function calls -- fixed buffering of serial input in GUI to avoid freezing AWT. +- fixed buffering of serial input in GUI to avoid freezing AWT. 0.93 Changes: @@ -35,7 +36,7 @@ scheduled back in time (causing other subsystems to get delays on their events...) - fixed RadioWrapper for backward compatibility with PacketListener - (for the CC2420). + (for the CC2420). - fixed ADC12 to turn off event scheduling when ADC12 is not on anymore - fixed xmem read/write for cli and added Memory API for flash memory. Modified: mspsim/se/sics/mspsim/cli/MiscCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-21 17:20:27 UTC (rev 424) +++ mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-21 23:05:05 UTC (rev 425) @@ -48,9 +48,6 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.regex.Pattern; - -import com.sun.xml.internal.bind.CycleRecoverable.Context; - import se.sics.mspsim.core.MSP430; import se.sics.mspsim.core.TimeEvent; import se.sics.mspsim.util.ComponentRegistry; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-21 17:20:38
|
Revision: 424 http://mspsim.svn.sourceforge.net/mspsim/?rev=424&view=rev Author: joxe Date: 2008-11-21 17:20:27 +0000 (Fri, 21 Nov 2008) Log Message: ----------- added commands tee and trig Modified Paths: -------------- mspsim/se/sics/mspsim/cli/MiscCommands.java Added Paths: ----------- mspsim/se/sics/mspsim/cli/FileTargetCommand.java Added: mspsim/se/sics/mspsim/cli/FileTargetCommand.java =================================================================== --- mspsim/se/sics/mspsim/cli/FileTargetCommand.java (rev 0) +++ mspsim/se/sics/mspsim/cli/FileTargetCommand.java 2008-11-21 17:20:27 UTC (rev 424) @@ -0,0 +1,42 @@ +package se.sics.mspsim.cli; + +import java.io.IOException; +import java.util.Hashtable; + +public class FileTargetCommand extends BasicLineCommand { + FileTarget ft; + Hashtable<String, FileTarget> fileTargets; + private boolean print; + private CommandContext context; + + public FileTargetCommand(Hashtable<String,FileTarget> fileTargets, + String name, String desc, boolean print) { + super(name, desc); + this.fileTargets = fileTargets; + this.print = print; + } + public int executeCommand(CommandContext context) { + this.context = context; + String fileName = context.getArgument(0); + ft = fileTargets.get(fileName); + if (ft == null) { + try { + ft = new FileTarget(fileName); + fileTargets.put(fileName, ft); + } catch (IOException e) { + e.printStackTrace(); + } + } + return 0; + } + + public void lineRead(String line) { + ft.lineRead(line); + if (print) context.out.println(line); + } + + public void stopCommand(CommandContext context) { + // Should this do anything? + // Probably depending on the ft's config + } +} Modified: mspsim/se/sics/mspsim/cli/MiscCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-11 21:01:20 UTC (rev 423) +++ mspsim/se/sics/mspsim/cli/MiscCommands.java 2008-11-21 17:20:27 UTC (rev 424) @@ -48,6 +48,9 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.regex.Pattern; + +import com.sun.xml.internal.bind.CycleRecoverable.Context; + import se.sics.mspsim.core.MSP430; import se.sics.mspsim.core.TimeEvent; import se.sics.mspsim.util.ComponentRegistry; @@ -97,30 +100,10 @@ // TODO: this should also be "registered" as a "sink". // probably this should be handled using ">" instead! - handler.registerCommand(">", new BasicLineCommand(null, "<filename>") { - FileTarget ft; - public int executeCommand(CommandContext context) { - String fileName = context.getArgument(0); - ft = fileTargets.get(fileName); - if (ft == null) { - try { -// System.out.println("Creating new file target: " + fileName); - ft = new FileTarget(fileName); - fileTargets.put(fileName, ft); - } catch (IOException e) { - e.printStackTrace(); - } - } - return 0; - } - public void lineRead(String line) { - ft.lineRead(line); - } - public void stopCommand(CommandContext context) { - // Should this do anything? - // Probably depending on the ft's config - } - }); + handler.registerCommand(">", new FileTargetCommand(fileTargets, + null, "<filename>", false)); + handler.registerCommand("tee", new FileTargetCommand(fileTargets, + "redirect to file and std-out", "<filename>", true)); handler.registerCommand("fclose", new BasicCommand("close the specified file", "<filename>") { public int executeCommand(CommandContext context) { @@ -174,6 +157,7 @@ handler.registerCommand("quit", new BasicCommand("exit MSPSim", "") { public int executeCommand(CommandContext context) { + /* TODO: flush all files, etc.... */ System.exit(0); return 0; } @@ -214,7 +198,7 @@ } }); - + handler.registerCommand("repeat", new BasicAsyncCommand("repeat the specified command line", "[-t delay] [-c count] <command line>") { private MSP430 cpu; @@ -282,6 +266,27 @@ }); handler.registerCommand("exec", new ExecCommand()); + + handler.registerCommand("trig", new BasicLineCommand("trigg command when input match regexp", "<command>") { + String command = null; + CommandContext context; + public int executeCommand(CommandContext context) { + StringBuilder sb = new StringBuilder(); + for (int i = 0, n = context.getArgumentCount(); i < n; i++) { + if (i > 0) sb.append(' '); + sb.append(context.getArgument(i)); + } + command = sb.toString(); + this.context = context; + return 0; + } + public void lineRead(String line) { + context.executeCommand(command); + } + public void stopCommand(CommandContext context) { + } + }); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-11 21:01:28
|
Revision: 423 http://mspsim.svn.sourceforge.net/mspsim/?rev=423&view=rev Author: joxe Date: 2008-11-11 21:01:20 +0000 (Tue, 11 Nov 2008) Log Message: ----------- updated changelog and version - prepared for release Modified Paths: -------------- mspsim/CHANGE_LOG.txt mspsim/se/sics/mspsim/core/MSP430Constants.java Modified: mspsim/CHANGE_LOG.txt =================================================================== --- mspsim/CHANGE_LOG.txt 2008-11-10 15:01:22 UTC (rev 422) +++ mspsim/CHANGE_LOG.txt 2008-11-11 21:01:20 UTC (rev 423) @@ -1,3 +1,16 @@ +0.95 +- initial GDB stubs implementation (only for memory access) +- CLI command for setting up gdbstubs server (gdbstubs PORT) +- fixed USART timing to be more correct +- added Ant build script +- cleanup of CLI and platforms +- fixed statistics to be more correct +- added SimEvent for notications of start/stop of emulator +- CORE: bugfix in read/write SR - made it impossible to turn of interrupts +- improved CC2420 support including correct overflow handling and better + handling of VREG_OFF +- added logging on/off from CLI and support for loggin CC2420 + 0.94 Changes: - fixed so that IOPorts output 1 on pins that are configured as input Modified: mspsim/se/sics/mspsim/core/MSP430Constants.java =================================================================== --- mspsim/se/sics/mspsim/core/MSP430Constants.java 2008-11-10 15:01:22 UTC (rev 422) +++ mspsim/se/sics/mspsim/core/MSP430Constants.java 2008-11-11 21:01:20 UTC (rev 423) @@ -43,7 +43,7 @@ public interface MSP430Constants { - public static final String VERSION = "0.94"; + public static final String VERSION = "0.95"; public static final int RESET_PUC = 0; public static final int RESET_POR = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-10 15:01:47
|
Revision: 422 http://mspsim.svn.sourceforge.net/mspsim/?rev=422&view=rev Author: nifi Date: 2008-11-10 15:01:22 +0000 (Mon, 10 Nov 2008) Log Message: ----------- search for autorun script at jar file location if not found in current directory Modified Paths: -------------- mspsim/se/sics/mspsim/Main.java mspsim/se/sics/mspsim/platform/GenericNode.java Modified: mspsim/se/sics/mspsim/Main.java =================================================================== --- mspsim/se/sics/mspsim/Main.java 2008-11-10 12:09:05 UTC (rev 421) +++ mspsim/se/sics/mspsim/Main.java 2008-11-10 15:01:22 UTC (rev 422) @@ -86,7 +86,7 @@ } } if (node == null) { - System.err.println("MSPSim does not yet support the platform '" + platform + '\''); + System.err.println("MSPSim does not currently support the platform '" + platform + "'."); System.exit(1); } node.setupArgs(config); Modified: mspsim/se/sics/mspsim/platform/GenericNode.java =================================================================== --- mspsim/se/sics/mspsim/platform/GenericNode.java 2008-11-10 12:09:05 UTC (rev 421) +++ mspsim/se/sics/mspsim/platform/GenericNode.java 2008-11-10 15:01:22 UTC (rev 422) @@ -41,6 +41,7 @@ import java.io.DataInputStream; import java.io.File; import java.io.IOException; +import java.net.URISyntaxException; import java.net.URL; import se.sics.mspsim.cli.CommandHandler; import se.sics.mspsim.cli.DebugCommands; @@ -101,7 +102,20 @@ } /* Ensure auto-run of a start script */ if (config.getProperty("autorun") == null) { - config.setProperty("autorun", "scripts/autorun.sc"); + File fp = new File("scripts/autorun.sc"); + if (fp.exists()) { + config.setProperty("autorun", "scripts/autorun.sc"); + } else { + try { + File dir = new File(GenericNode.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParentFile(); + fp = new File(dir, "scripts/autorun.sc"); + if (fp.exists()) { + config.setProperty("autorun", fp.getAbsolutePath()); + } + } catch (URISyntaxException e) { + // Failed to find auto run script + } + } } int[] memory = cpu.getMemory(); @@ -146,9 +160,10 @@ File fp = new File(script); if (fp.canRead()) { CommandHandler ch = (CommandHandler) registry.getComponent("commandHandler"); + script = script.replace('\\', '/'); System.out.println("Autoloading script: " + script); if (ch != null) { - ch.lineRead("source " + script); + ch.lineRead("source \"" + script + '"'); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fro...@us...> - 2008-11-10 12:09:16
|
Revision: 421 http://mspsim.svn.sourceforge.net/mspsim/?rev=421&view=rev Author: fros4943 Date: 2008-11-10 12:09:05 +0000 (Mon, 10 Nov 2008) Log Message: ----------- made current instruction public. should not be altered from outside msp430core. Modified Paths: -------------- mspsim/se/sics/mspsim/core/MSP430Core.java Modified: mspsim/se/sics/mspsim/core/MSP430Core.java =================================================================== --- mspsim/se/sics/mspsim/core/MSP430Core.java 2008-11-10 10:31:21 UTC (rev 420) +++ mspsim/se/sics/mspsim/core/MSP430Core.java 2008-11-10 12:09:05 UTC (rev 421) @@ -88,7 +88,7 @@ private int interruptMax = -1; // Op/instruction represents the last executed OP / instruction private int op; - int instruction; + public int instruction; int servicedInterrupt = -1; IOUnit servicedInterruptUnit = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-10 10:31:28
|
Revision: 420 http://mspsim.svn.sourceforge.net/mspsim/?rev=420&view=rev Author: nifi Date: 2008-11-10 10:31:21 +0000 (Mon, 10 Nov 2008) Log Message: ----------- removed debug output Modified Paths: -------------- mspsim/se/sics/mspsim/core/USART.java Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-11-10 10:13:43 UTC (rev 419) +++ mspsim/se/sics/mspsim/core/USART.java 2008-11-10 10:31:21 UTC (rev 420) @@ -292,7 +292,7 @@ if (baudRate == 0) baudRate = 1; // Is this correct??? Is it the DCO or smclkFRQ we should have here??? tickPerByte = (8 * cpu.smclkFrq) / baudRate; - if (DEBUG || true) { + if (DEBUG) { System.out.println(getName() + " Ticks per byte: " + tickPerByte); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-10 10:13:48
|
Revision: 419 http://mspsim.svn.sourceforge.net/mspsim/?rev=419&view=rev Author: joxe Date: 2008-11-10 10:13:43 +0000 (Mon, 10 Nov 2008) Log Message: ----------- minor fixes Modified Paths: -------------- mspsim/se/sics/mspsim/cli/ProfilerCommands.java mspsim/se/sics/mspsim/cli/StreamCommandHandler.java mspsim/se/sics/mspsim/core/USART.java mspsim/se/sics/mspsim/platform/GenericNode.java Modified: mspsim/se/sics/mspsim/cli/ProfilerCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/ProfilerCommands.java 2008-11-09 20:05:53 UTC (rev 418) +++ mspsim/se/sics/mspsim/cli/ProfilerCommands.java 2008-11-10 10:13:43 UTC (rev 419) @@ -94,7 +94,7 @@ }); - ch.registerCommand("printcalls", new BasicAsyncCommand("print function calls", "") { + ch.registerCommand("logcalls", new BasicAsyncCommand("log function calls", "") { @Override public int executeCommand(CommandContext context) { Profiler profiler = cpu.getProfiler(); Modified: mspsim/se/sics/mspsim/cli/StreamCommandHandler.java =================================================================== --- mspsim/se/sics/mspsim/cli/StreamCommandHandler.java 2008-11-09 20:05:53 UTC (rev 418) +++ mspsim/se/sics/mspsim/cli/StreamCommandHandler.java 2008-11-10 10:13:43 UTC (rev 419) @@ -54,9 +54,11 @@ private BufferedReader inReader; private boolean workaround = false; private boolean exit; + private String prompt; - public StreamCommandHandler(InputStream in, PrintStream out, PrintStream err) { + public StreamCommandHandler(InputStream in, PrintStream out, PrintStream err, String prompt) { super(out, err); + this.prompt = prompt; this.exit = false; this.inReader = new BufferedReader(new InputStreamReader(in)); registerCommand("workaround", new BasicCommand("activate workaround for Java console input bug", "") { @@ -105,7 +107,7 @@ String lastLine = null; while(!exit) { try { - out.print(">"); + out.print(prompt); out.flush(); String line = readLine(inReader);//.readLine(); // Simple execution of last called command line when not running from terminal with history support Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-11-09 20:05:53 UTC (rev 418) +++ mspsim/se/sics/mspsim/core/USART.java 2008-11-10 10:13:43 UTC (rev 419) @@ -292,7 +292,7 @@ if (baudRate == 0) baudRate = 1; // Is this correct??? Is it the DCO or smclkFRQ we should have here??? tickPerByte = (8 * cpu.smclkFrq) / baudRate; - if (DEBUG) { + if (DEBUG || true) { System.out.println(getName() + " Ticks per byte: " + tickPerByte); } } Modified: mspsim/se/sics/mspsim/platform/GenericNode.java =================================================================== --- mspsim/se/sics/mspsim/platform/GenericNode.java 2008-11-09 20:05:53 UTC (rev 418) +++ mspsim/se/sics/mspsim/platform/GenericNode.java 2008-11-10 10:13:43 UTC (rev 419) @@ -64,6 +64,8 @@ public abstract class GenericNode extends Chip implements Runnable { + private static final String PROMPT = "MSPSim>"; + protected ConfigManager config; protected ComponentRegistry registry = new ComponentRegistry(); @@ -139,10 +141,6 @@ control.setSourceViewer(sourceViewer); } - System.out.println("-----------------------------------------------"); - System.out.println("MSPSim " + MSP430Constants.VERSION + " starting firmware: " + firmwareFile); - System.out.println("-----------------------------------------------"); - String script = config.getProperty("autorun"); if (script != null) { File fp = new File(script); @@ -154,6 +152,11 @@ } } } + System.out.println("-----------------------------------------------"); + System.out.println("MSPSim " + MSP430Constants.VERSION + " starting firmware: " + firmwareFile); + System.out.println("-----------------------------------------------"); + System.out.print(PROMPT); + System.out.flush(); } public void setup(ConfigManager config) throws IOException { @@ -164,7 +167,7 @@ CommandHandler ch = (CommandHandler) registry.getComponent("commandHandler"); if (ch == null) { - ch = new StreamCommandHandler(System.in, System.out, System.err); + ch = new StreamCommandHandler(System.in, System.out, System.err, PROMPT); registry.registerComponent("commandHandler", ch); } stats = new OperatingModeStatistics(cpu); @@ -187,9 +190,7 @@ public void run() { if (!cpu.isRunning()) { - System.out.println("Starting new CPU thread..."); cpu.cpuloop(); - System.out.println("Stopping CPU thread..."); } } public void start() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-09 20:05:58
|
Revision: 418 http://mspsim.svn.sourceforge.net/mspsim/?rev=418&view=rev Author: joxe Date: 2008-11-09 20:05:53 +0000 (Sun, 09 Nov 2008) Log Message: ----------- added CRC class Added Paths: ----------- mspsim/se/sics/mspsim/util/CCITT_CRC.java Added: mspsim/se/sics/mspsim/util/CCITT_CRC.java =================================================================== --- mspsim/se/sics/mspsim/util/CCITT_CRC.java (rev 0) +++ mspsim/se/sics/mspsim/util/CCITT_CRC.java 2008-11-09 20:05:53 UTC (rev 418) @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2008, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of MSPSim. + * + * ----------------------------------------------------------------- + * + * Author : Joakim Eriksson + */ + +package se.sics.mspsim.util; + +/* basic CRC-CCITT code */ +public class CCITT_CRC { + int crc; + + public int getCRC() { + return crc; + } + + public void clr() { + crc = 0xffff; + } + + public int add(int data) { + int newCrc = (crc >> 8) | (crc << 8) & 0xffff; + newCrc ^= data & 0xff; + newCrc ^= (newCrc & 0xff) >> 4; + newCrc ^= (newCrc << 12); + newCrc ^= (newCrc & 0xff) << 5; + crc = newCrc; + return crc; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-09 08:24:20
|
Revision: 417 http://mspsim.svn.sourceforge.net/mspsim/?rev=417&view=rev Author: joxe Date: 2008-11-09 08:24:15 +0000 (Sun, 09 Nov 2008) Log Message: ----------- fixed timing - added USART delay Modified Paths: -------------- mspsim/se/sics/mspsim/core/USART.java Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-11-08 19:45:48 UTC (rev 416) +++ mspsim/se/sics/mspsim/core/USART.java 2008-11-09 08:24:15 UTC (rev 417) @@ -222,16 +222,17 @@ clrBitIFG(utxifg); utctl &= ~UTCTL_TXEMPTY; utxbuf = data; + /* should the interrupt be flagged off here ? - or only the flags */ if (DEBUG) System.out.println(getName() + " flagging off transmit interrupt"); cpu.flagInterrupt(transmitInterrupt, this, false); - // Schedule on cycles here... - nextTXReady = cycles + tickPerByte; + // Schedule on cycles here + // TODO: adding 3 extra cycles here seems to give + // slightly better timing in some test... + nextTXReady = cycles + tickPerByte + 3; nextTXByte = data; cpu.scheduleCycleEvent(txTrigger, nextTXReady); - // We should set the "not-ready" flag here! - // When should the reception interrupt be received!? break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-08 19:45:58
|
Revision: 416 http://mspsim.svn.sourceforge.net/mspsim/?rev=416&view=rev Author: joxe Date: 2008-11-08 19:45:48 +0000 (Sat, 08 Nov 2008) Log Message: ----------- added M and X to GDB-stubs for setting values Modified Paths: -------------- mspsim/se/sics/mspsim/util/GDBStubs.java Modified: mspsim/se/sics/mspsim/util/GDBStubs.java =================================================================== --- mspsim/se/sics/mspsim/util/GDBStubs.java 2008-11-08 14:19:18 UTC (rev 415) +++ mspsim/se/sics/mspsim/util/GDBStubs.java 2008-11-08 19:45:48 UTC (rev 416) @@ -66,6 +66,8 @@ } } + int[] buffer = new int[256]; + int len; public void run() { while (true) { try { @@ -76,17 +78,18 @@ String cmd = ""; boolean readCmd = false; - while (s != null) { - int c = input.read(); - if (c == -1) return; + int c; + while (s != null && ((c = input.read()) != -1)) { System.out.println("GDBStubs: Read " + c + " => " + (char) c); if (c == '#') { readCmd = false; - handleCmd(cmd); + handleCmd(cmd, buffer, len); cmd = ""; + len = 0; } if (readCmd) { cmd += (char) c; + buffer[len++] = (c & 0xff); } if (c == '$') { readCmd = true; @@ -98,7 +101,7 @@ } } - private void handleCmd(String cmd) throws IOException { + private void handleCmd(String cmd, int[] cmdBytes, int cmdLen) throws IOException { System.out.println("cmd: " + cmd); char c = cmd.charAt(0); switch(c) { @@ -122,15 +125,37 @@ sendResponse(OK); break; case 'm': + case 'M': + case 'X': String cmd2 = cmd.substring(1); + String wdata[] = cmd2.split(":"); + int cPos = cmd.indexOf(':'); + if (cPos > 0) { + /* only until length in first part */ + cmd2 = wdata[0]; + } String parts[] = cmd2.split(","); int addr = Integer.decode("0x" + parts[0]); int len = Integer.decode("0x" + parts[1]); String data = ""; - for (int i = 0; i < len; i++) { - data += Utils.hex8(cpu.memory[addr++] & 0xff); + if (c =='m') { + System.out.println("Returning memory from: " + addr + " len = " + len); + /* This might be wrong - which is the correct byte order? */ + for (int i = 0; i < len; i++) { + data += Utils.hex8(cpu.memory[addr++] & 0xff); + } + sendResponse(data); + } else { + System.out.println("Writing to memory at: " + addr + " len = " + len + + " with: " + ((wdata.length > 1) ? wdata[1] : "")); + cPos++; + for (int i = 0; i < len; i++) { + System.out.println("Writing: " + cmdBytes[cPos] + " to " + addr + " cpos=" + cPos); + cpu.write(addr++, cmdBytes[cPos++], false); + } + sendResponse(OK); } - sendResponse(data); + break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-08 14:19:28
|
Revision: 415 http://mspsim.svn.sourceforge.net/mspsim/?rev=415&view=rev Author: joxe Date: 2008-11-08 14:19:18 +0000 (Sat, 08 Nov 2008) Log Message: ----------- added initial GDBStubs support Modified Paths: -------------- mspsim/se/sics/mspsim/cli/DebugCommands.java Added Paths: ----------- mspsim/se/sics/mspsim/util/GDBStubs.java Modified: mspsim/se/sics/mspsim/cli/DebugCommands.java =================================================================== --- mspsim/se/sics/mspsim/cli/DebugCommands.java 2008-11-07 21:50:45 UTC (rev 414) +++ mspsim/se/sics/mspsim/cli/DebugCommands.java 2008-11-08 14:19:18 UTC (rev 415) @@ -48,6 +48,7 @@ import se.sics.mspsim.util.ComponentRegistry; import se.sics.mspsim.util.DebugInfo; import se.sics.mspsim.util.ELF; +import se.sics.mspsim.util.GDBStubs; import se.sics.mspsim.util.MapEntry; import se.sics.mspsim.util.Utils; @@ -378,6 +379,20 @@ return 0; }}); + ch.registerCommand("gdbstubs", new BasicCommand("open up a gdb stubs server for GDB remote debugging", "port") { + private GDBStubs stubs = null; + public int executeCommand(CommandContext context) { + if (stubs != null) { + context.err.println("GDBStubs alread openend"); + } else { + int port = context.getArgumentAsInt(0); + stubs = new GDBStubs(); + stubs.setupServer(cpu, port); + } + return 0; + } + }); + ch.registerCommand("loggable", new BasicCommand("list loggable objects", "") { @Override public int executeCommand(CommandContext context) { Added: mspsim/se/sics/mspsim/util/GDBStubs.java =================================================================== --- mspsim/se/sics/mspsim/util/GDBStubs.java (rev 0) +++ mspsim/se/sics/mspsim/util/GDBStubs.java 2008-11-08 14:19:18 UTC (rev 415) @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2007, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of MSPSim. + * + * $Id: $ + * + * ----------------------------------------------------------------- + * + * GDBStubs + * + * Author : Joakim Eriksson + * Created : 31 mar 2008 + * Updated : $Date:$ + * $Revision:$ + */ +package se.sics.mspsim.util; +import java.io.DataInputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.net.ServerSocket; +import java.net.Socket; + +import se.sics.mspsim.core.MSP430Core; + +public class GDBStubs implements Runnable { + + private final static String OK = "OK"; + + ServerSocket serverSocket; + OutputStream output; + MSP430Core cpu; + + public void setupServer(MSP430Core cpu, int port) { + this.cpu = cpu; + try { + serverSocket = new ServerSocket(port); + System.out.println("GDBStubs open server socket port: " + port); + new Thread(this).start(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + public void run() { + while (true) { + try { + Socket s = serverSocket.accept(); + + DataInputStream input = new DataInputStream(s.getInputStream()); + output = s.getOutputStream(); + + String cmd = ""; + boolean readCmd = false; + while (s != null) { + int c = input.read(); + if (c == -1) return; + System.out.println("GDBStubs: Read " + c + " => " + (char) c); + if (c == '#') { + readCmd = false; + handleCmd(cmd); + cmd = ""; + } + if (readCmd) { + cmd += (char) c; + } + if (c == '$') { + readCmd = true; + } + } + } catch (IOException e) { + e.printStackTrace(); + } + } + } + + private void handleCmd(String cmd) throws IOException { + System.out.println("cmd: " + cmd); + char c = cmd.charAt(0); + switch(c) { + case 'H': + sendResponse(OK); + break; + case 'q': + if ("qC".equals(cmd)) { + sendResponse("QC1"); + } else if ("qOffsets".equals(cmd)) { + sendResponse("Text=000;Data=000;Bss=000;"); + } + break; + case '?': + sendResponse("S01"); + break; + case 'g': + readRegisters(); + break; + case 'k': // kill + sendResponse(OK); + break; + case 'm': + String cmd2 = cmd.substring(1); + String parts[] = cmd2.split(","); + int addr = Integer.decode("0x" + parts[0]); + int len = Integer.decode("0x" + parts[1]); + String data = ""; + for (int i = 0; i < len; i++) { + data += Utils.hex8(cpu.memory[addr++] & 0xff); + } + sendResponse(data); + } + } + + private void readRegisters() throws IOException { + String regs = ""; + for (int i = 0; i < 16; i++) { + regs += Utils.hex8(cpu.reg[i] & 0xff) + Utils.hex8(cpu.reg[i] >> 8); + } + sendResponse(regs); + } + + public void sendResponse(String resp) throws IOException { + output.write('+'); + output.write('$'); + int cs = 0; + if (resp != null) { + for (int i = 0; i < resp.length(); i++) { + output.write((char) resp.charAt(i)); + System.out.print(resp.charAt(i)); + cs += resp.charAt(i); + } + } + output.write('#'); + System.out.print('#'); + int c = (cs & 0xff) >> 4; + if (c < 10) c = c + '0'; + else c = c - 10 + 'a'; + output.write((char)c); + System.out.print((char)c); + c = cs & 15; + if (c < 10) c = c + '0'; + else c = c - 10 + 'a'; + output.write((char)c); + System.out.println((char)c); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-11-07 21:54:41
|
Revision: 414 http://mspsim.svn.sourceforge.net/mspsim/?rev=414&view=rev Author: joxe Date: 2008-11-07 21:50:45 +0000 (Fri, 07 Nov 2008) Log Message: ----------- fixed usart timing - not tested Modified Paths: -------------- mspsim/se/sics/mspsim/core/USART.java Modified: mspsim/se/sics/mspsim/core/USART.java =================================================================== --- mspsim/se/sics/mspsim/core/USART.java 2008-11-06 17:17:39 UTC (rev 413) +++ mspsim/se/sics/mspsim/core/USART.java 2008-11-07 21:50:45 UTC (rev 414) @@ -89,7 +89,8 @@ private int baudRate = 0; private int tickPerByte = 1000; private long nextTXReady = -1; - + private int nextTXByte = -1; + private MSP430Core cpu; private SFR sfr; @@ -138,12 +139,12 @@ memory[IFG1 + 1] = 0x20; } - nextTXReady = cpu.cycles + 1000; - cpu.scheduleCycleEvent(txTrigger, nextTXReady); + reset(0); } public void reset(int type) { nextTXReady = cpu.cycles + 1000; + nextTXByte = -1; cpu.scheduleCycleEvent(txTrigger, nextTXReady); } @@ -217,10 +218,6 @@ case UTXBUF: if (DEBUG) System.out.print(getName() + ": USART_UTXBUF:" + (char) data + " = " + data + "\n"); - if (listener != null) { - listener.dataReceived(this, data); - } - // Interruptflag not set! clrBitIFG(utxifg); utctl &= ~UTCTL_TXEMPTY; @@ -230,6 +227,7 @@ // Schedule on cycles here... nextTXReady = cycles + tickPerByte; + nextTXByte = data; cpu.scheduleCycleEvent(txTrigger, nextTXReady); // We should set the "not-ready" flag here! @@ -310,19 +308,24 @@ } private void handleTransmit(long cycles) { - setBitIFG(utxifg); - utctl |= UTCTL_TXEMPTY; - cpu.flagInterrupt(transmitInterrupt, this, isIEBitsSet(utxifg)); + if (listener != null && nextTXByte != -1) { + listener.dataReceived(this, nextTXByte); + nextTXByte = -1; + } - if (DEBUG) { - if (isIEBitsSet(utxifg)) { - System.out.println(getName() + " flagging on transmit interrupt"); - } - System.out.println(getName() + " Ready to transmit next at: " + cycles); - } - } + setBitIFG(utxifg); + utctl |= UTCTL_TXEMPTY; + cpu.flagInterrupt(transmitInterrupt, this, isIEBitsSet(utxifg)); + if (DEBUG) { + if (isIEBitsSet(utxifg)) { + System.out.println(getName() + " flagging on transmit interrupt"); + } + System.out.println(getName() + " Ready to transmit next at: " + cycles); + } + } + public boolean isReceiveFlagCleared() { return (getIFG() & urxifg) == 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ni...@us...> - 2008-11-06 17:17:48
|
Revision: 413 http://mspsim.svn.sourceforge.net/mspsim/?rev=413&view=rev Author: nifi Date: 2008-11-06 17:17:39 +0000 (Thu, 06 Nov 2008) Log Message: ----------- Ant build script for MSPSim Added Paths: ----------- mspsim/build.xml Added: mspsim/build.xml =================================================================== --- mspsim/build.xml (rev 0) +++ mspsim/build.xml 2008-11-06 17:17:39 UTC (rev 413) @@ -0,0 +1,88 @@ +<project name="MSPSim" default="jar" basedir="."> + <description> + Builds MSPSim + </description> + + <property name="src" location="."/> + <property name="build" location="build"/> + <property name="lib" location="lib"/> + <property name="jarfile" location="mspsim.jar"/> + <property name="javac.debug" value="true"/> + + <path id="classpath"> + <fileset dir="${lib}" includes="**/*.jar"/> + </path> + + <manifestclasspath property="jar.classpath" jarfile="${jarfile}"> + <classpath refid="classpath" /> + </manifestclasspath> + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + </target> + + <target name="compile" depends="init" description="compile the source"> + <javac srcdir="${src}" destdir="${build}" classpathref="classpath" debug="${javac.debug}"/> + </target> + + <target name="jar" depends="compile" description="generate MSPSim jar file" > + <jar jarfile="${jarfile}" basedir="${build}"> + <manifest> + <attribute name="Main-Class" value="se.sics.mspsim.Main"/> + <attribute name="Sealed" value="true"/> + <attribute name="Class-Path" value="${jar.classpath}" /> + </manifest> + <fileset dir="." includes="images/*.jpg"/> + </jar> + </target> + + <target name="runesb" depends="jar" description="run MSPSim with platform ESB"> + <property name="FIRMWAREFILE" value="firmware/esb/sensor-demo.firmware"/> + <java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.esb.ESBNode"> + <arg value="${FIRMWAREFILE}"/> + </java> + </target> + + <target name="runsky" depends="jar" description="run MSPSim with platform Sky"> + <property name="FIRMWAREFILE" value="firmware/sky/blink.firmware"/> + <java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sky.SkyNode"> + <arg value="${FIRMWAREFILE}"/> + </java> + </target> + + <target name="runskyprof" depends="jar" description="run MSPSim with platform Sky for profiling"> + <property name="FIRMWAREFILE" value="firmware/sky/blink.firmware"/> + <java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sky.SkyNode"> + <jvmarg value="-agentlib:yjpagent" /> + <arg value="${FIRMWAREFILE}"/> + </java> + </target> + + <target name="runtelos" depends="jar" description="run MSPSim with platform Telos"> + <property name="FIRMWAREFILE" value="firmware/sky/blink.firmware"/> + <java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.platform.sky.TelosNode"> + <arg value="${FIRMWAREFILE}"/> + </java> + </target> + + <target name="run" depends="runsky"/> + + <target name="cputest" depends="jar" description="run MSPSim CPU test"> + <property name="FIRMWAREFILE" value="tests/cputest.firmware"/> + + <available file="${FIRMWAREFILE}" type="file" property="cputest.firmware"/> + <fail message="Please compile the cputest firmware first." unless="cputest.firmware"/> + + <java fork="true" classpath="${jarfile}" classname="se.sics.mspsim.util.Test"> + <arg value="${FIRMWAREFILE}"/> + </java> + </target> + + <target name="test" depends="cputest"/> + + <target name="clean" description="clean up" > + <delete dir="${build}"/> + </target> + +</project> Property changes on: mspsim/build.xml ___________________________________________________________________ Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |