# HG changeset patch # User edouard # Date 1260820714 -3600 # Node ID 96f84395154faf489829520e481ac7e39e5a1f88 # Parent 564a4a9862b16b6269f9a2ed4166213b58d402bd Enhancements for 'None' target : produce pre-linked object, remove some windows CRLF problems, fixed pedantic compiler warnings diff -r 564a4a9862b1 -r 96f84395154f configure --- a/configure Wed Dec 09 15:46:35 2009 +0100 +++ b/configure Mon Dec 14 20:58:34 2009 +0100 @@ -555,7 +555,7 @@ SUB_PREFIX=/usr/local echo "Not cross-compiling. Will install in $SUB_PREFIX"; else - SUB_PREFIX=/usr/`$CC -dumpmachine` + SUB_PREFIX=/usr/`$CC -dumpmachine | tr -d '\r\n'` echo "This is a cross-compiler. Will install in $SUB_PREFIX"; fi fi diff -r 564a4a9862b1 -r 96f84395154f include/none/applicfg.h --- a/include/none/applicfg.h Wed Dec 09 15:46:35 2009 +0100 +++ b/include/none/applicfg.h Mon Dec 14 20:58:34 2009 +0100 @@ -23,6 +23,7 @@ #ifndef __APPLICFG_NONE__ #define __APPLICFG_NONE__ +#include #include /* Define the architecture : little_endian or big_endian @@ -45,7 +46,7 @@ */ /* Integers */ -#define INTEGER8 signed char +#define INTEGER8 char #define INTEGER16 short #define INTEGER24 int #define INTEGER32 int diff -r 564a4a9862b1 -r 96f84395154f include/none/canfestival.h --- a/include/none/canfestival.h Wed Dec 09 15:46:35 2009 +0100 +++ b/include/none/canfestival.h Mon Dec 14 20:58:34 2009 +0100 @@ -6,12 +6,22 @@ #include "data.h" #include "timers_driver.h" +typedef void* LIB_HANDLE; /** @defgroup userapi User API */ /** @defgroup can CAN management * @ingroup userapi */ +/** + * @ingroup can + * @brief Load CAN driver interface. + * @param *driver_name The location of the library to load + * @return + * - handle of the CAN driver interface is returned upon success. + * - NULL is returned if the CAN driver interface can't be loaded. + */ +#define LoadCanDriver(driver_name) 1 /** * @brief Send a CAN message diff -r 564a4a9862b1 -r 96f84395154f objdictgen/gen_cfile.py --- a/objdictgen/gen_cfile.py Wed Dec 09 15:46:35 2009 +0100 +++ b/objdictgen/gen_cfile.py Mon Dec 14 20:58:34 2009 +0100 @@ -65,12 +65,12 @@ size = max(size, len(item)) if values[1] != "": size = max(size, int(values[1])) - typeinfos = ("UNS8", size, "visible_string", False) + typeinfos = ("INTEGER8", size, "visible_string", False) elif values[0] == "DOMAIN": size = 0 for item in items: size = max(size, len(item)) - typeinfos = ("UNS8", size, "domain", False) + typeinfos = ("INTEGER8", size, "domain", False) elif values[0] == "BOOLEAN": typeinfos = ("UNS8", None, "boolean", False) else: diff -r 564a4a9862b1 -r 96f84395154f src/Makefile.in --- a/src/Makefile.in Wed Dec 09 15:46:35 2009 +0100 +++ b/src/Makefile.in Mon Dec 14 20:58:34 2009 +0100 @@ -21,12 +21,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -#ifneq ($(KERNELRELEASE),) +ifneq ($(KERNELRELEASE),) # Kbuild part of Makefile obj-m := canfestival.o canfestival-objs := $(OBJS) -#else +else # Normal Makefile CC = SUB_CC PROG_CFLAGS = SUB_PROG_CFLAGS @@ -77,7 +77,7 @@ canfestival: @echo " " @echo "*********************************************" - @echo "**Building [libcanfestival.o]" + @echo "**Building [canfestival.o]" @echo "*********************************************" $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules @@ -96,7 +96,11 @@ else CFLAGS = SUB_OPT_CFLAGS +ifeq ($(TARGET),none) +canfestival: libcanfestival.o +else canfestival: libcanfestival.a +endif libcanfestival.a: $(OBJS) @echo " " @@ -106,6 +110,13 @@ $(BINUTILS_PREFIX)ar rc $@ $(OBJS) $(BINUTILS_PREFIX)ranlib $@ +libcanfestival.o: $(OBJS) + @echo " " + @echo "*********************************************" + @echo "**Prelink [libcanfestival.o]" + @echo "*********************************************" + $(BINUTILS_PREFIX)ld -r $(OBJS) -o $@ + $(TARGET)_%o: %c @echo " " @echo "*********************************************" @@ -124,9 +135,9 @@ rm -rf $(PREFIX)/include/canfestival clean: - rm -f $(OBJS) libcanfestival.a + rm -f $(OBJS) libcanfestival.a libcanfestival.o endif mrproper: clean -#endif +endif diff -r 564a4a9862b1 -r 96f84395154f src/pdo.c --- a/src/pdo.c Wed Dec 09 15:46:35 2009 +0100 +++ b/src/pdo.c Mon Dec 14 20:58:34 2009 +0100 @@ -527,7 +527,7 @@ { MSG_ERR (0x3907, " Couldn't build TPDO number : ", pdoNum); - return; + return 0; } /*Compare new and old PDO */ @@ -538,7 +538,7 @@ ) { /* No changes -> go to next pdo */ - return; + return 0; } else { @@ -578,6 +578,7 @@ sendPdo(d, pdoNum, &pdo); } + return 1; } void