added objcopy external tools configuration

changed nm command to sort numerically, and changed regexpressions to accept output from newer gcc versions
added more debugging info under help menu
This commit is contained in:
Fredrik Osterlind 2012-03-09 14:57:21 +01:00
parent 902200f12a
commit e8294e8699
4 changed files with 28 additions and 17 deletions

View file

@ -106,9 +106,9 @@ ifdef SYMBOLS
endif ## SYMBOLS
ifdef REDEF_PRINTF
@echo Redefining printf
-$(foreach OBJ,$^, objcopy --redefine-sym printf=log_printf $(OBJ); )
-$(foreach OBJ,$^, objcopy --redefine-sym puts=log_puts $(OBJ); )
-$(foreach OBJ,$^, objcopy --redefine-sym putchar=log_putchar $(OBJ); )
-$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym printf=log_printf $(OBJ); )
-$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym puts=log_puts $(OBJ); )
-$(foreach OBJ,$^, $(OBJCOPY) --redefine-sym putchar=log_putchar $(OBJ); )
endif ## REDEF_PRINTF
$(LINK_COMMAND_1) $^ $(LINK_COMMAND_2)

View file

@ -6,6 +6,7 @@ PATH_AR=ar
PATH_SHELL = sh
PATH_C_COMPILER = gcc
PATH_OBJDUMP=objdump
PATH_OBJCOPY=objcopy
OBJDUMP_ARGS=-h
CMD_GREP_PROCESSES = grep '^PROCESS_THREAD[ ]*([^,]*,[^,]*,[^)]*)' -o -d skip -D skip -H -r
REGEXP_PARSE_PROCESSES = ([^/]*.c):PROCESS_THREAD[ ]*\\(([^,]*),[^,]*,[^)]*\\)
@ -24,7 +25,7 @@ PATH_JAVAC = javac
DEFAULT_PROJECTDIRS = [CONTIKI_DIR]/tools/cooja/apps/mrm;[CONTIKI_DIR]/tools/cooja/apps/mspsim;[CONTIKI_DIR]/tools/cooja/apps/avrora;[CONTIKI_DIR]/tools/cooja/apps/serial_socket;[CONTIKI_DIR]/tools/cooja/apps/collect-view
PARSE_WITH_COMMAND = true
PARSE_COMMAND=nm -C $(LIBFILE)
PARSE_COMMAND=nm -n -C $(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]*$
@ -35,7 +36,7 @@ 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_start__$
COMMAND_DATA_END = ^([0-9A-Fa-f]*)[ \t]D[ \t]_data_end__$
COMMAND_BSS_START = ^([0-9A-Fa-f]*)[ \t]B[ \t]_bss_start__$
COMMAND_BSS_END = ^([0-9A-Fa-f]*)[ \t]B[ \t]_bss_end__$
COMMAND_DATA_START = ^([0-9A-Fa-f]*)[ \t]D[ \t].*_data_start__$
COMMAND_DATA_END = ^([0-9A-Fa-f]*)[ \t]D[ \t].*_data_end__$
COMMAND_BSS_START = ^([0-9A-Fa-f]*)[ \t]B[ \t].*_bss_start__$
COMMAND_BSS_END = ^([0-9A-Fa-f]*)[ \t]B[ \t].*_bss_end__$

View file

@ -245,6 +245,7 @@ public class GUI extends Observable {
"PATH_LINKER", "LINK_COMMAND_1", "LINK_COMMAND_2",
"PATH_AR", "AR_COMMAND_1", "AR_COMMAND_2",
"PATH_OBJDUMP", "OBJDUMP_ARGS",
"PATH_OBJCOPY",
"PATH_JAVAC",
"CONTIKI_STANDARD_PROCESSES",
@ -929,7 +930,7 @@ public class GUI extends Observable {
menuItem.setToolTipText("Not available in applet version");
}
menuItem = new JMenuItem("Compiler configuration wizard");
menuItem = new JMenuItem("Contiki mote configuration wizard");
menuItem.setActionCommand("configuration wizard");
menuItem.addActionListener(guiEventHandler);
menu.add(menuItem);
@ -940,14 +941,6 @@ public class GUI extends Observable {
menu.add(new JMenuItem(showBufferSettingsAction));
menu.addSeparator();
menuItem = new JMenuItem("Java version: "
+ System.getProperty("java.version") + " ("
+ System.getProperty("java.vendor") + ")");
menuItem.setEnabled(false);
menu.add(menuItem);
/* Help */
menu = new JMenu("Help");
menu.setMnemonic(KeyEvent.VK_H);
@ -957,6 +950,22 @@ public class GUI extends Observable {
menu.add(checkBox);
menuBar.add(menu);
menu.addSeparator();
menuItem = new JMenuItem("Java version: "
+ System.getProperty("java.version") + " ("
+ System.getProperty("java.vendor") + ")");
menuItem.setEnabled(false);
menu.add(menuItem);
menuItem = new JMenuItem("System's \"os.arch\": "
+ System.getProperty("os.arch"));
menuItem.setEnabled(false);
menu.add(menuItem);
menuItem = new JMenuItem("System's \"sun.arch.data.model\": "
+ System.getProperty("sun.arch.data.model"));
menuItem.setEnabled(false);
menu.add(menuItem);
// Mote plugins popup menu (not available via menu bar)
if (menuMotePluginClasses == null) {
menuMotePluginClasses = new Vector<Class<? extends Plugin>>();

View file

@ -495,6 +495,7 @@ public class CompileContiki {
env.add(new String[] { "COOJA_SOURCEDIRS", "" });
env.add(new String[] { "COOJA_SOURCEFILES", "" });
env.add(new String[] { "CC", GUI.getExternalToolsSetting("PATH_C_COMPILER") });
env.add(new String[] { "OBJCOPY", GUI.getExternalToolsSetting("PATH_OBJCOPY") });
env.add(new String[] { "EXTRA_CC_ARGS", ccFlags });
env.add(new String[] { "LD", GUI.getExternalToolsSetting("PATH_LINKER") });
env.add(new String[] { "LINK_COMMAND_1", link1 });