# HG changeset patch # User Christian Taedcke # Date 1324557960 -3600 # Node ID bb9fe2e2b2e1fb33cb947c0f2cc2b5156f9d39d5 # Parent c1b9455929e64147ee844f8c0c20b38f30eba5f0 FIXED: - The AVR example now compiles in linux. - adapted AVR code to current default branch. diff -r c1b9455929e6 -r bb9fe2e2b2e1 examples/AVR/Slave/Makefile --- 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\ diff -r c1b9455929e6 -r bb9fe2e2b2e1 examples/AVR/Slave/ds401.h --- 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); diff -r c1b9455929e6 -r bb9fe2e2b2e1 examples/AVR/Slave/main.c --- 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; diff -r c1b9455929e6 -r bb9fe2e2b2e1 include/AVR/config.h --- 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 #include #include "iar.h" #else // GCC #include -#include -#include +#include +#include #include -#include -#include +#include +#include #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 diff -r c1b9455929e6 -r bb9fe2e2b2e1 include/def.h --- 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 /** definitions used for object dictionary access. ie SDO Abort codes . (See DS 301 v.4.02 p.48) */