Fixed device object compile errors and added IPv6 recipes for blinkt and piface (#841)
This commit is contained in:
+1
-1
@@ -289,7 +289,7 @@ apdu: $(BACNET_LIB_TARGET)
|
||||
|
||||
.PHONY: blinkt
|
||||
blinkt:
|
||||
$(MAKE) -C $@
|
||||
$(MAKE) -B -C $@
|
||||
|
||||
.PHONY: create-object
|
||||
create-object: $(BACNET_LIB_TARGET)
|
||||
|
||||
+12
-2
@@ -5,6 +5,7 @@
|
||||
|
||||
## General Flags
|
||||
TARGET = bacblinkt
|
||||
|
||||
# BACnet objects that are used with this app
|
||||
BACNET_OBJECT_DIR = $(BACNET_SRC_DIR)/bacnet/basic/object
|
||||
SRC = main.c \
|
||||
@@ -22,8 +23,17 @@ CFLAGS += -DMAX_TSM_TRANSACTIONS=1
|
||||
# TARGET_EXT is defined in apps/Makefile as .exe or nothing
|
||||
TARGET_BIN = ${TARGET}$(TARGET_EXT)
|
||||
|
||||
#
|
||||
# Set CROSS_PREFIX to prepend to all compiler tools at once for easier
|
||||
# cross-compilation.
|
||||
CROSS_PREFIX ?=
|
||||
CC = $(CROSS_PREFIX)gcc
|
||||
AR = $(CROSS_PREFIX)ar
|
||||
RANLIB = $(CROSS_PREFIX)ranlib
|
||||
SIZE = $(CROSS_PREFIX)size
|
||||
|
||||
# note: link to pigpio daemon so that our app can run without root
|
||||
# start pigio daemon with the command 'sudo pigpiod'
|
||||
# start pigpio daemon with the command 'sudo pigpiod'
|
||||
LD_PIGPIO = -Wl,-pthread,-lpigpiod_if2
|
||||
LFLAGS += $(LD_PIGPIO)
|
||||
|
||||
@@ -33,7 +43,7 @@ all: ${BACNET_LIB_TARGET} Makefile ${TARGET_BIN}
|
||||
|
||||
${TARGET_BIN}: ${OBJS} Makefile ${BACNET_LIB_TARGET}
|
||||
${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@
|
||||
size $@
|
||||
$(SIZE) $@
|
||||
cp $@ ../../bin
|
||||
|
||||
${BACNET_LIB_TARGET}:
|
||||
|
||||
@@ -40,10 +40,6 @@
|
||||
#include "bacnet/basic/object/color_temperature.h"
|
||||
#endif
|
||||
|
||||
/* local forward (semi-private) and external prototypes */
|
||||
int Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
bool Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
|
||||
/* may be overridden by outside table */
|
||||
static object_functions_t *Object_Table;
|
||||
|
||||
@@ -924,7 +920,7 @@ int Device_Object_List_Element_Encode(
|
||||
* @return True on success or else False if not found.
|
||||
*/
|
||||
bool Device_Valid_Object_Name(
|
||||
BACNET_CHARACTER_STRING *object_name1,
|
||||
const BACNET_CHARACTER_STRING *object_name1,
|
||||
BACNET_OBJECT_TYPE *object_type,
|
||||
uint32_t *object_instance)
|
||||
{
|
||||
|
||||
+14
-2
@@ -13,6 +13,15 @@ SRC = main.c \
|
||||
$(BACNET_OBJECT_DIR)/blo.c \
|
||||
$(BACNET_OBJECT_DIR)/bo.c
|
||||
|
||||
# Set CROSS_PREFIX to prepend to all compiler tools at once for easier
|
||||
# cross-compilation.
|
||||
CROSS_PREFIX ?=
|
||||
CC = $(CROSS_PREFIX)gcc
|
||||
AR = $(CROSS_PREFIX)ar
|
||||
RANLIB = $(CROSS_PREFIX)ranlib
|
||||
SIZE = $(CROSS_PREFIX)size
|
||||
STRIP = $(CROSS_PREFIX)strip
|
||||
|
||||
CFLAGS += -DMAX_TSM_TRANSACTIONS=1
|
||||
CFLAGS += -DMAX_BINARY_INPUTS=4
|
||||
CFLAGS += -DMAX_BINARY_OUTPUTS=8
|
||||
@@ -20,6 +29,9 @@ CFLAGS += -DMAX_BINARY_OUTPUTS=8
|
||||
# TARGET_EXT is defined in apps/Makefile as .exe or nothing
|
||||
TARGET_BIN = ${TARGET}$(TARGET_EXT)
|
||||
|
||||
# relies on the BACnet library
|
||||
BACNET_LIB_DIR = $(realpath ../lib)
|
||||
|
||||
# Source locations
|
||||
PIFACE_INCLUDE = libpifacedigital/src
|
||||
PIFACE_LIB = libpifacedigital
|
||||
@@ -35,8 +47,8 @@ OBJS += ${SRC:.c=.o}
|
||||
all: ${BACNET_LIB_TARGET} Makefile ${TARGET_BIN}
|
||||
|
||||
${TARGET_BIN}: ${OBJS} Makefile ${BACNET_LIB_TARGET}
|
||||
${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@
|
||||
size $@
|
||||
$(CC) ${PFLAGS} ${OBJS} ${LFLAGS} -o $@
|
||||
$(SIZE) $@
|
||||
cp $@ ../../bin
|
||||
|
||||
${BACNET_LIB_TARGET}:
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
if [ ! -d "libmcp23s17" ]
|
||||
then
|
||||
git clone git@github.com:piface/libmcp23s17.git
|
||||
git clone https://github.com/piface/libmcp23s17.git
|
||||
fi
|
||||
|
||||
if [ ! -d "libpifacedigital" ]
|
||||
then
|
||||
git clone git@github.com:piface/libpifacedigital.git
|
||||
git clone https://github.com:piface/libpifacedigital.git
|
||||
fi
|
||||
|
||||
# Build the library
|
||||
|
||||
@@ -33,10 +33,6 @@
|
||||
#include "bacnet/basic/object/netport.h"
|
||||
#endif
|
||||
|
||||
/* local forward (semi-private) and external prototypes */
|
||||
int Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA *rpdata);
|
||||
bool Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data);
|
||||
|
||||
/* may be overridden by outside table */
|
||||
static object_functions_t *Object_Table;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user