Added FreeBSD support.

Made the Sky mote type use PATH_MAKE for the build procedure.
This commit is contained in:
nvt-se 2009-08-27 12:25:11 +00:00
parent b71faae330
commit b8e268e598
3 changed files with 53 additions and 3 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: SkyCompileDialog.java,v 1.3 2009/04/20 16:04:46 joxe Exp $
* $Id: SkyCompileDialog.java,v 1.4 2009/08/27 12:25:12 nvt-se Exp $
*/
package se.sics.cooja.mspmote;
@ -34,6 +34,7 @@ import java.awt.Container;
import java.io.File;
import org.apache.log4j.Logger;
import se.sics.cooja.GUI;
import se.sics.cooja.MoteInterface;
import se.sics.cooja.MoteType;
import se.sics.cooja.Simulation;
@ -86,7 +87,7 @@ public class SkyCompileDialog extends AbstractCompileDialog {
/* TODO Split into String[] */
return
/*"make clean TARGET=sky\n" + */
"make " + getExpectedFirmwareFile(source).getName() + " TARGET=sky";
GUI.getExternalToolsSetting("PATH_MAKE") + " " + getExpectedFirmwareFile(source).getName() + " TARGET=sky";
}
public File getExpectedFirmwareFile(File source) {

View file

@ -0,0 +1,42 @@
PATH_CONTIKI = ../../..
PATH_COOJA_CORE_RELATIVE = /platform/cooja
PATH_MAKE = gmake
PATH_LINKER = ld
PATH_AR = ar
PATH_SHELL = sh
PATH_C_COMPILER = gcc
PATH_OBJDUMP=objdump
OBJDUMP_ARGS=-h
CMD_GREP_PROCESSES = grep "^PROCESS_THREAD[ ]*([^,]*,[^,]*,[^)]*)" -o -H
REGEXP_PARSE_PROCESSES = ([^/]*.c):PROCESS_THREAD[ ]*\\(([^,]*),[^,]*,[^)]*\\)
CMD_GREP_INTERFACES = grep "^SIM_INTERFACE([^,]*," -o -d skip -D skip -H -r
REGEXP_PARSE_INTERFACES = ([^/]*.c):SIM_INTERFACE\\(([^,]*),
CMD_GREP_SENSORS = grep "^SENSORS_SENSOR([^,]*," -o -d skip -D skip -H -r
REGEXP_PARSE_SENSORS = ([^/]*.c):SENSORS_SENSOR\\(([^,]*),
COMPILER_ARGS = -I'$(JAVA_HOME)/include' -I'$(JAVA_HOME)/include/linux' -fno-builtin-printf
LINK_COMMAND_1 = gcc -I'$(JAVA_HOME)/include' -I'$(JAVA_HOME)/include/linux' -shared -Wl,-Map=$(MAPFILE) -o $(LIBFILE)
LINK_COMMAND_2 =
AR_COMMAND_1 = ar rcf $(ARFILE)
AR_COMMAND_2 =
CONTIKI_STANDARD_PROCESSES = sensors_process;etimer_process
CONTIKI_MAIN_TEMPLATE_FILENAME = contiki_template.c
CORECOMM_TEMPLATE_FILENAME = corecomm_template.java
PATH_JAVAC = javac
DEFAULT_PROJECTDIRS = ../apps/mrm;../apps/mspsim;../apps/avrora
PARSE_WITH_COMMAND=false
PARSE_COMMAND=nm -a $(LIBFILE)
MAPFILE_DATA_START = ^.data[ \t]*0x([0-9A-Fa-f]*)[ \t]*0x[0-9A-Fa-f]*[ \t]*$
MAPFILE_DATA_SIZE = ^.data[ \t]*0x[0-9A-Fa-f]*[ \t]*0x([0-9A-Fa-f]*)[ \t]*$
MAPFILE_BSS_START = ^.bss[ \t]*0x([0-9A-Fa-f]*)[ \t]*0x[0-9A-Fa-f]*[ \t]*$
MAPFILE_BSS_SIZE = ^.bss[ \t]*0x[0-9A-Fa-f]*[ \t]*0x([0-9A-Fa-f]*)[ \t]*$
MAPFILE_VAR_NAME = ^[ \t]*(0x[0-9A-Fa-f]*)[ \t]*([^ ]*)[ \t]*$
MAPFILE_VAR_ADDRESS_1 = ^[ \t]*0x([0-9A-Fa-f]*)[ \t]*
MAPFILE_VAR_ADDRESS_2 = [ \t]*$
MAPFILE_VAR_SIZE_1 = ^
MAPFILE_VAR_SIZE_2 = [ \t]*(0x[0-9A-Fa-f]*)[ \t]*[^ ]*[ \t]*$
COMMAND_VAR_NAME_ADDRESS = ^([0-9A-Fa-f][0-9A-Fa-f]*)[ \t][^Tt][ \t]([^ ._][^ ]*)
COMMAND_DATA_START = ^([0-9A-Fa-f]*)[ \t]d[ \t].data$
COMMAND_DATA_END = ^([0-9A-Fa-f]*)[ \t]A[ \t]_edata$
COMMAND_BSS_START = ^([0-9A-Fa-f]*)[ \t]A[ \t]__bss_start$
COMMAND_BSS_END = ^([0-9A-Fa-f]*)[ \t]A[ \t]_end$

View file

@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: GUI.java,v 1.142 2009/07/03 13:37:40 fros4943 Exp $
* $Id: GUI.java,v 1.143 2009/08/27 12:25:12 nvt-se Exp $
*/
package se.sics.cooja;
@ -156,6 +156,11 @@ public class GUI extends Observable {
*/
public static final String EXTERNAL_TOOLS_MACOSX_SETTINGS_FILENAME = "/external_tools_macosx.config";
/**
* External tools default FreeBSD settings filename.
*/
public static final String EXTERNAL_TOOLS_FREEBSD_SETTINGS_FILENAME = "/external_tools_freebsd.config";
/**
* External tools default Linux/Unix settings filename.
*/
@ -2620,6 +2625,8 @@ public class GUI extends Observable {
filename = GUI.EXTERNAL_TOOLS_WIN32_SETTINGS_FILENAME;
} else if (osName.startsWith("mac os x")) {
filename = GUI.EXTERNAL_TOOLS_MACOSX_SETTINGS_FILENAME;
} else if (osName.startsWith("freebsd")) {
filename = GUI.EXTERNAL_TOOLS_FREEBSD_SETTINGS_FILENAME;
} else if (osName.startsWith("linux")) {
filename = GUI.EXTERNAL_TOOLS_LINUX_SETTINGS_FILENAME;
if (osArch.startsWith("amd64")) {