FIXED: - The AVR example now compiles in linux.
authorChristian Taedcke <hacking@taedcke.com>
Thu, 22 Dec 2011 13:46:00 +0100
changeset 675 e5c5101c4f0b
parent 674 352c42b20441
child 676 11e95dd60ffc
FIXED: - The AVR example now compiles in linux.
- adapted AVR code to current default branch.
examples/AVR/Slave/Makefile
examples/AVR/Slave/ds401.h
examples/AVR/Slave/main.c
include/AVR/config.h
include/def.h
--- a/examples/AVR/Slave/Makefile	Thu Dec 22 11:43:08 2011 +0100
+++ b/examples/AVR/Slave/Makefile	Thu Dec 22 13:46:00 2011 +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 22 11:43:08 2011 +0100
+++ b/examples/AVR/Slave/ds401.h	Thu Dec 22 13:46:00 2011 +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 22 11:43:08 2011 +0100
+++ b/examples/AVR/Slave/main.c	Thu Dec 22 13:46:00 2011 +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 22 11:43:08 2011 +0100
+++ b/include/AVR/config.h	Thu Dec 22 13:46:00 2011 +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 22 11:43:08 2011 +0100
+++ b/include/def.h	Thu Dec 22 13:46:00 2011 +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)
  */