# HG changeset patch # User Christian Taedcke # Date 1324557960 -3600 # Node ID e5c5101c4f0b0a368c21e914adc98b6885fe456f # Parent 352c42b20441c7ec77638d524cb8d78ac91a83de FIXED: - The AVR example now compiles in linux. - adapted AVR code to current default branch. diff -r 352c42b20441 -r e5c5101c4f0b 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 352c42b20441 -r e5c5101c4f0b 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 352c42b20441 -r e5c5101c4f0b 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 352c42b20441 -r e5c5101c4f0b 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 352c42b20441 -r e5c5101c4f0b 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) */