Merged some canfestival-3-ica Fixes.
--- a/configure Thu Dec 15 14:51:20 2011 +0100
+++ b/configure Sat Jan 21 18:49:54 2012 +0100
@@ -415,7 +415,17 @@
if [ "$SUB_CAN_DRIVER" = "vscom" ]; then
- SUB_CAN_DLL_CFLAGS=$SUB_CAN_DLL_CFLAGS\ -lvs_can_api
+ if [ "$SUB_OS_NAME" = "Linux" ]; then
+ if [ "$SUB_ARCH_NAME" = "x86" ]; then
+ SUB_CAN_DLL_CFLAGS=$SUB_CAN_DLL_CFLAGS\ -LLinux\ -lvs_can_api
+ elif [ "$SUB_ARCH_NAME" = "x86_64" ]; then
+ SUB_CAN_DLL_CFLAGS=$SUB_CAN_DLL_CFLAGS\ -L\'Linux\ x86-64\'\ -lvs_can_api_x86-64
+ else
+ echo "!!! ERROR !!! Please adapt the configure script for your SUB_ARCH_NAME" $SUB_ARCH_NAME
+ fi
+ else
+ echo "!!! ERROR !!! Please adapt the configure script for your SUB_OS_NAME" $SUB_OS_NAME
+ fi
fi
if [ "$SUB_CAN_DRIVER" = "anagate_win32" ]; then
@@ -553,7 +563,7 @@
if [ "$SUB_ARCH_NAME" = "x86_64" -a "$CC" = "gcc" ]; then
# Only if we are on x86_64 and using gcc
# For shared library generation, it needs this
- SUB_PROG_CFLAGS=-fPIC
+ SUB_PROG_CFLAGS+=\ -fPIC
fi
if [ "$BINUTILS_PREFIX" = "" ]; then
--- a/drivers/can_vscom/Makefile.in Thu Dec 15 14:51:20 2011 +0100
+++ b/drivers/can_vscom/Makefile.in Sat Jan 21 18:49:54 2012 +0100
@@ -31,7 +31,7 @@
CAN_DRIVER = SUB_CAN_DRIVER
TIMERS_DRIVER = SUB_TIMERS_DRIVER
ENABLE_DLL_DRIVERS=SUB_ENABLE_DLL_DRIVERS
-CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS -L.
+CAN_DLL_CFLAGS=SUB_CAN_DLL_CFLAGS
VSCAN_API_FILENAME=VSCAN_API_latest.zip
# define target specific environment
@@ -68,8 +68,7 @@
vs_can_api.h:
wget http://www.vscom.de/download/multiio/linux/driver/${VSCAN_API_FILENAME}
@if which unzip &> /dev/null; then \
- unzip ${VSCAN_API_FILENAME}; \
- chmod +x vs_can_api.dll; \
+ unzip -o ${VSCAN_API_FILENAME}; \
else \
echo "No unzip found. Please decompress ${VSCAN_API_FILENAME} manually"; \
exit 1; \
@@ -86,7 +85,7 @@
install: libcanfestival_$(CAN_DRIVER).so
mkdir -p $(PREFIX)/lib/
cp $< $(PREFIX)/lib/
-
+
uninstall:
rm -f $(TARGET_SOFILES)
--- a/examples/AVR/Slave/Makefile Thu Dec 15 14:51:20 2011 +0100
+++ b/examples/AVR/Slave/Makefile Sat Jan 21 18:49:54 2012 +0100
@@ -6,7 +6,7 @@
PROJECT = SlaveAVR
MCU = at90can128
TARGET = AVR
-CC = avr-gcc.exe
+CC = avr-gcc
SRC = ../../../src
DRV = ../../../drivers/AVR
@@ -35,7 +35,7 @@
HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings
## Include Directories
-INCLUDES = -I../../../include -I../../../include/AVR
+INCLUDES = -I../../../include/AVR -I../../../include
## Objects that must be built in order to link
OBJECTS = $(DRV)/can_AVR.o\
--- a/examples/AVR/Slave/ds401.h Thu Dec 15 14:51:20 2011 +0100
+++ b/examples/AVR/Slave/ds401.h Sat Jan 21 18:49:54 2012 +0100
@@ -28,7 +28,7 @@
// Includes for the Canfestival
#include "canfestival.h"
#include "timer.h"
-#include "objdict.h"
+#include "ObjDict.h"
unsigned char digital_input_handler(CO_Data* d, unsigned char *newInput, unsigned char size);
--- a/examples/AVR/Slave/main.c Thu Dec 15 14:51:20 2011 +0100
+++ b/examples/AVR/Slave/main.c Sat Jan 21 18:49:54 2012 +0100
@@ -32,10 +32,9 @@
#include "hardware.h"
#include "canfestival.h"
#include "can_AVR.h"
-#include "objdict.h"
+#include "ObjDict.h"
#include "ds401.h"
-
unsigned char timer_interrupt = 0; // Set if timer interrupt eclapsed
unsigned char inputs;
--- a/include/AVR/config.h Thu Dec 15 14:51:20 2011 +0100
+++ b/include/AVR/config.h Sat Jan 21 18:49:54 2012 +0100
@@ -24,17 +24,18 @@
#ifndef _CONFIG_H_
#define _CONFIG_H_
+
#ifdef __IAR_SYSTEMS_ICC__
#include <ioavr.h>
#include <intrinsics.h>
#include "iar.h"
#else // GCC
#include <inttypes.h>
-#include <avr\io.h>
-#include <avr\interrupt.h>
+#include <avr/io.h>
+#include <avr/interrupt.h>
#include <avr/pgmspace.h>
-#include <avr\sleep.h>
-#include <avr\wdt.h>
+#include <avr/sleep.h>
+#include <avr/wdt.h>
#endif // GCC
//#define WD_SLEEP
@@ -48,6 +49,7 @@
// Needed defines by Canfestival lib
#define MAX_CAN_BUS_ID 1
#define SDO_MAX_LENGTH_TRANSFERT 32
+#define SDO_BLOCK_SIZE 16
#define SDO_MAX_SIMULTANEOUS_TRANSFERTS 1
#define NMT_MAX_NODE_ID 128
#define SDO_TIMEOUT_MS 3000U
--- a/include/def.h Thu Dec 15 14:51:20 2011 +0100
+++ b/include/def.h Sat Jan 21 18:49:54 2012 +0100
@@ -24,7 +24,7 @@
#ifndef __def_h__
#define __def_h__
-#include "config.h"
+#include <config.h>
/** definitions used for object dictionary access. ie SDO Abort codes . (See DS 301 v.4.02 p.48)
*/