mirror of
https://github.com/stargieg/bacnet-stack
synced 2025-10-26 23:35:52 +08:00
[r3059] Fixed ports for Atmega8, Atmega168, and Xmega to compile.
Author: skarg@r3059
This commit is contained in:
@@ -16,6 +16,7 @@ SIZE = avr-size
|
||||
# Source locations
|
||||
BACNET_CORE = ../../src
|
||||
BACNET_INCLUDE = ../../include
|
||||
BACNET_OBJECT_INCLUDE = ../../demo/object
|
||||
BACNET_DEMO = ../../demo
|
||||
|
||||
# local files for this project
|
||||
@@ -27,7 +28,7 @@ CSRC = apdu.c \
|
||||
timer.c
|
||||
|
||||
# common demo files needed
|
||||
DEMOSRC =
|
||||
DEMOSRC = \
|
||||
$(BACNET_DEMO)/handler/h_rp.c \
|
||||
$(BACNET_DEMO)/handler/txbuf.c \
|
||||
$(BACNET_DEMO)/handler/h_npdu.c \
|
||||
@@ -73,7 +74,7 @@ CORESRC = \
|
||||
# $(BACNET_CORE)/address.c \
|
||||
|
||||
## Include Directories
|
||||
INCLUDES = -I. -I$(BACNET_INCLUDE)
|
||||
INCLUDES = -I. -I$(BACNET_INCLUDE) -I$(BACNET_OBJECT_INCLUDE)
|
||||
|
||||
# Source to Object conversion
|
||||
COBJ = $(CSRC:.c=.o)
|
||||
|
||||
@@ -31,20 +31,19 @@
|
||||
#endif
|
||||
|
||||
#if defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ASM__)
|
||||
#include <iom168.h>
|
||||
#define WATCHDOG_INIT() {BIT_CLEAR(MCUSR, WDRF); WDTCSR = 0;}
|
||||
#include <iom168.h>
|
||||
#define WATCHDOG_INIT() {BIT_CLEAR(MCUSR, WDRF); WDTCSR = 0;}
|
||||
#else
|
||||
#if !defined(__AVR_ATmega168__)
|
||||
#error Firmware is configured for ATmega168 only (-mmcu=atmega168)
|
||||
|
||||
#if defined(__AVR_ATmega168__)
|
||||
#define WATCHDOG_INIT() {BIT_CLEAR(MCUSR, WDRF); WDTCSR = 0;}
|
||||
#else
|
||||
#define WATCHDOG_INIT() {BIT_CLEAR(MCUCSR, WDRF); WDTCR = 0;}
|
||||
#if !defined(__AVR_ATmega168__)
|
||||
#error Firmware is configured for ATmega168 only (-mmcu=atmega168)
|
||||
#endif
|
||||
#if defined(__AVR_ATmega168__)
|
||||
#define WATCHDOG_INIT() {BIT_CLEAR(MCUSR, WDRF); WDTCSR = 0;}
|
||||
#else
|
||||
#define WATCHDOG_INIT() {BIT_CLEAR(MCUCSR, WDRF); WDTCR = 0;}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#include "iar2gcc.h"
|
||||
#include "avr035.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user