-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Feature: adding preliminary beacon support for class B development. - Solved warnings with 64b integer printf when compiling on x86_64. - Updated build system for easier deployment on various hardware. - Changed threads organization in the forwarder programs. - Removed duplicate protocol documentation.
- Loading branch information
Sylvain Miermont
committed
Mar 28, 2014
1 parent
9b2bd33
commit e435e9b
Showing
63 changed files
with
5,065 additions
and
681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
### Environment constants | ||
|
||
LGW_PATH := ../../lora_gateway/libloragw | ||
CROSS_COMPILE := | ||
export | ||
|
||
### general build targets | ||
|
||
all: | ||
$(MAKE) all -e -C basic_pkt_fwd | ||
$(MAKE) all -e -C gps_pkt_fwd | ||
$(MAKE) all -e -C beacon_pkt_fwd | ||
$(MAKE) all -e -C util_ack | ||
$(MAKE) all -e -C util_sink | ||
$(MAKE) all -e -C util_tx_test | ||
|
||
clean: | ||
$(MAKE) clean -e -C basic_pkt_fwd | ||
$(MAKE) clean -e -C gps_pkt_fwd | ||
$(MAKE) clean -e -C beacon_pkt_fwd | ||
$(MAKE) clean -e -C util_ack | ||
$(MAKE) clean -e -C util_sink | ||
$(MAKE) clean -e -C util_tx_test | ||
|
||
### EOF |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,95 @@ | ||
### Application-specific constants | ||
|
||
APP_NAME=basic_pkt_fwd | ||
APP_NAME := basic_pkt_fwd | ||
|
||
### constant symbols | ||
CROSS_COMPILE= | ||
CC=gcc | ||
CFLAGS=-O2 -Wall -Wextra -Iinc | ||
C99FLAGS=-O2 -Wall -Wextra -std=c99 -Iinc | ||
FLAG_AUX= | ||
### Environment constants | ||
|
||
### constants for Lora Gateway HAL library | ||
LGW_PATH := ../../lora_gateway/libloragw | ||
CROSS_COMPILE := | ||
|
||
LGW_PATH=../../lora_gateway/libloragw | ||
LGW_INC=-I$(LGW_PATH)/inc | ||
#LGW_LNK=-lloragw -lrt -lpthread | ||
LGW_LNK=-lloragw -lrt -lpthread -lmpsse | ||
# add libmpsse or not, depending on what option you compiled the libloragw with | ||
### External constant definitions | ||
# must get library build option to know if mpsse must be linked or not | ||
|
||
### general build targets | ||
include $(LGW_PATH)/library.cfg | ||
RELEASE_VERSION := `cat ../VERSION` | ||
|
||
all: $(APP_NAME) | ||
### Constant symbols | ||
|
||
CC := $(CROSS_COMPILE)gcc | ||
AR := $(CROSS_COMPILE)ar | ||
|
||
CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. | ||
VFLAG := -D VERSION_STRING="\"$(RELEASE_VERSION)\"" | ||
|
||
### Constants for Lora concentrator HAL library | ||
# List the library sub-modules that are used by the application | ||
|
||
LGW_INC = | ||
ifneq ($(wildcard $(LGW_PATH)/inc/config.h),) | ||
# only for HAL version 1.3 and beyond | ||
LGW_INC += $(LGW_PATH)/inc/config.h | ||
endif | ||
LGW_INC += $(LGW_PATH)/inc/loragw_hal.h | ||
|
||
### Linking options | ||
|
||
ifeq ($(CFG_SPI),native) | ||
LIBS := -lloragw -lrt -lpthread | ||
else ifeq ($(CFG_SPI),ftdi) | ||
LIBS := -lloragw -lrt -lpthread -lmpsse | ||
else | ||
# keep compatibility with SX1301 HAL version 1.2.x and bellow | ||
ifeq ($(LGW_PHY),native) | ||
LIBS := -lloragw -lrt -lpthread | ||
else ifeq ($(LGW_PHY),ftdi) | ||
LIBS := -lloragw -lrt -lpthread -lmpsse | ||
else | ||
$(error [error] Can't find configuration for SPI phy) | ||
endif | ||
endif | ||
|
||
### General build targets | ||
|
||
all: $(APP_NAME) global_conf.json | ||
|
||
clean: | ||
rm -f obj/*.o | ||
rm -f $(APP_NAME) | ||
find . -name global_conf.json -exec rm -i {} \; | ||
|
||
### Sub-modules compilation | ||
|
||
obj/base64.o: src/base64.c inc/base64.h | ||
$(CC) -c $(CFLAGS) $< -o $@ | ||
|
||
obj/parson.o: src/parson.c inc/parson.h | ||
$(CC) -c $(CFLAGS) $< -o $@ | ||
|
||
### sub-modules compilation | ||
### Select the proper configuration JSON for the program | ||
|
||
obj/base64.o: src/base64.c | ||
$(CROSS_COMPILE)$(CC) -c $(CFLAGS) -o obj/base64.o $(LGW_INC) src/base64.c $(FLAG_AUX) | ||
ifeq ($(CFG_BAND),eu868) | ||
global_conf.json: cfg/global_conf.eu868.json | ||
cp $< $@ | ||
else ifeq ($(CFG_BAND),us915) | ||
global_conf.json: cfg/global_conf.us915.json | ||
cp $< $@ | ||
else ifeq ($(CFG_BAND),cn470) | ||
global_conf.json: cfg/global_conf.cn470.json | ||
cp $< $@ | ||
else ifeq ($(CFG_BAND),eu433) | ||
global_conf.json: cfg/global_conf.eu433.json | ||
cp $< $@ | ||
else | ||
global_conf.json: cfg/global_conf.empty.json | ||
cp $< $@ | ||
endif | ||
|
||
obj/parson.o: src/parson.c | ||
$(CROSS_COMPILE)$(CC) -c $(CFLAGS) -o obj/parson.o $(LGW_INC) src/parson.c $(FLAG_AUX) | ||
### Main program compilation and assembly | ||
|
||
### main program compilation and assembly | ||
obj/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) inc/parson.h inc/base64.h | ||
$(CC) -c $(CFLAGS) $(VFLAG) -I$(LGW_PATH)/inc $< -o $@ | ||
|
||
obj/$(APP_NAME).o: src/$(APP_NAME).c | ||
$(CROSS_COMPILE)$(CC) -c $(C99FLAGS) -o obj/$(APP_NAME).o $(LGW_INC) src/$(APP_NAME).c $(FLAG_AUX) | ||
$(APP_NAME): obj/$(APP_NAME).o $(LGW_PATH)/libloragw.a obj/parson.o obj/base64.o | ||
$(CC) -L$(LGW_PATH) $< obj/parson.o obj/base64.o -o $@ $(LIBS) | ||
|
||
$(APP_NAME): $(LGW_PATH)/libloragw.a obj/$(APP_NAME).o obj/parson.o obj/base64.o | ||
$(CROSS_COMPILE)$(CC) -o $(APP_NAME) obj/$(APP_NAME).o obj/parson.o obj/base64.o -L$(LGW_PATH) $(LGW_LNK) | ||
### EOF |
Binary file not shown.
Oops, something went wrong.