diff --git a/Makefile b/Makefile index 8bbeb07..4891da8 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Makefile for mspsim # # Needed stuff in the PATH: -# java, javac (JDK 1.6 or newer) +# java, javac (JDK 1.7 or newer) # # Under MS-DOS/Windows # A GNU compatible Make (for example Cygwin's) @@ -46,7 +46,7 @@ SPACE := ${EMPTY} ${EMPTY} LIBS := ${wildcard lib/*.jar} BUILD := build CLASSPATH=${subst ${SPACE},${SEPARATOR},$(BUILD)/ ${LIBS}} -CCARGS=-deprecation -classpath ".${SEPARATOR}${CLASSPATH}" -d $(BUILD) +CCARGS=-deprecation -Xlint:unchecked -source 1.7 -target 1.7 -classpath ".${SEPARATOR}${CLASSPATH}" -d $(BUILD) JAVAARGS=-classpath "${CLASSPATH}" @@ -196,3 +196,6 @@ $(BUILD)/%.class : %.java $(BUILD) clean: -$(RM) -r $(BUILD) + +distclean: clean + -$(RM) -f $(JARFILE) diff --git a/README.txt b/README.txt index 015c8ba..5483169 100644 --- a/README.txt +++ b/README.txt @@ -7,9 +7,8 @@ some tools for monitoring stack, setting breakpoints, and profiling. * System requirements -You need a recent Java to run MSPSim. Java SE 1.5 or newer is -recommended. The current version of MSPSim also requires make for -compiling. +You need a recent Java to run MSPSim. Java SE 1.7 or newer is recommended. +The current version of MSPSim also requires make or ant for compiling. * Building MSPSim @@ -60,4 +59,4 @@ Run the default example on the Sky node emulator by typing: - currently the emulator runs as if it can use all memory as RAM (e.g. flash writes, etc not supported) - no DMA implementation -- timer system not 100% emulated \ No newline at end of file +- timer system not 100% emulated diff --git a/build.xml b/build.xml index be31c78..4155acb 100644 --- a/build.xml +++ b/build.xml @@ -8,6 +8,8 @@ + + @@ -23,8 +25,11 @@ - + + + + diff --git a/se/sics/mspsim/emulink/EmuLink.java b/se/sics/mspsim/emulink/EmuLink.java index 2dd042f..155af60 100755 --- a/se/sics/mspsim/emulink/EmuLink.java +++ b/se/sics/mspsim/emulink/EmuLink.java @@ -324,9 +324,8 @@ public class EmuLink { } } - public void run() throws IOException { - try { - ServerSocket serverSocket = new ServerSocket(8000); + public void run() { + try (ServerSocket serverSocket = new ServerSocket(8000)) { while(true) { @@ -356,7 +355,7 @@ public class EmuLink { } } - public static void main(String[] args) throws IOException { + public static void main(String[] args) { EmuLink el = new EmuLink(); el.run(); }