diff --git a/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java b/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java index c66e48b8f..413354b16 100644 --- a/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java +++ b/tools/cooja/java/se/sics/cooja/contikimote/ContikiMoteType.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ContikiMoteType.java,v 1.18 2007/09/10 13:26:54 fros4943 Exp $ + * $Id: ContikiMoteType.java,v 1.19 2007/09/10 14:05:34 fros4943 Exp $ */ package se.sics.cooja.contikimote; @@ -55,7 +55,7 @@ import se.sics.cooja.dialogs.MessageList; *
* All core communication with the Contiki mote should be via this class. When a * mote type is created it allocates a CoreComm to be used with this type, and - * loads a map file. The map file is used to map variable names to addresses. + * loads the variable and segments addresses. *
* When a new mote type is created an initialization function is run on the
* Contiki system in order to create the initial memory. When a new mote is
@@ -188,10 +188,7 @@ public class ContikiMoteType implements MoteType {
}
/**
- * Creates a new Contiki mote type. This type uses two external files: a map
- * file for parsing relative addresses of Contiki variables (identifier +
- * ".map") and a library file with an actual compiled Contiki system
- * (identifier + ".library")
+ * Creates a new Contiki mote type.
*
* @param identifier
* Unique identifier for this mote type
@@ -244,10 +241,6 @@ public class ContikiMoteType implements MoteType {
throw new MoteTypeCreationException("Could not delete output file: "
+ depFile);
}
- if (mapFile.exists()) {
- throw new MoteTypeCreationException("Could not delete output file: "
- + mapFile);
- }
// Generate Contiki main source file
try {
@@ -266,7 +259,7 @@ public class ContikiMoteType implements MoteType {
hasSystemSymbols, commStack, taskOutput
.getInputStream(MessageList.NORMAL), taskOutput
.getInputStream(MessageList.ERROR));
- if (!libFile.exists() || !depFile.exists() || !mapFile.exists()) {
+ if (!libFile.exists() || !depFile.exists()) {
compilationSucceded = false;
}
@@ -292,8 +285,9 @@ public class ContikiMoteType implements MoteType {
* configuration files, and the libraries must be recompiled.
*
* This method allocates a core communicator, loads the Contiki library file,
- * loads and parses the map file, creates a variable name to address mapping
- * of the Contiki system and finally creates the Contiki mote initial memory.
+ * loads and parses library addresses, creates a variable name to address
+ * mapping of the Contiki system and finally creates the Contiki mote initial
+ * memory.
*
* @param identifier
* Mote type identifier
@@ -317,33 +311,62 @@ public class ContikiMoteType implements MoteType {
+ libFile);
}
- // Check that map file exists
- if (!mapFile.exists()) {
- throw new MoteTypeCreationException("Map file could not be found: "
- + mapFile);
- }
-
// Allocate core communicator class
libraryClassName = CoreComm.getAvailableClassName();
myCoreComm = CoreComm.createCoreComm(libraryClassName, libFile);
- // Try load map file
- Vector