From b24866225a6301d3a663f874725e83c012dc25d3 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 26 Dec 2012 17:36:00 +0100 Subject: digital/beacon: add bitcloud stack into common directory digital/zigbit --- ...kefile_All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 digital/zigbit/bitcloud/makefiles/Makefile_All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc (limited to 'digital/zigbit/bitcloud/makefiles/Makefile_All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc') diff --git a/digital/zigbit/bitcloud/makefiles/Makefile_All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc b/digital/zigbit/bitcloud/makefiles/Makefile_All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc new file mode 100644 index 00000000..d1573b08 --- /dev/null +++ b/digital/zigbit/bitcloud/makefiles/Makefile_All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc @@ -0,0 +1,134 @@ +COMPONENTS_PATH = ./../../../../BitCloud/Components +APP_NAME = Peer2Peer +CONFIG_NAME = All_Sec_ZigBit_Atmega1281_Rf230_8Mhz_Gcc +LIST_PATH = $(CONFIG_NAME)/List +EXE_PATH = $(CONFIG_NAME)/Exe +OBJ_PATH = $(CONFIG_NAME)/Obj + +include ./../../../../BitCloud/lib/Makerules_Atmega1281_Gcc + +DEFINES = \ + -DBOARD_MESHBEAN \ + -DATMEGA1281 \ + -DHAL_8MHz \ + -DAT86RF230 \ + -DSTANDARD_SECURITY_MODE \ + -DSTACK_TYPE_ALL + +INCLUDES = \ + -I./../.. \ + -I./../../include \ + -I./../../../../BitCloud/Components/BSP/MESHBEAN/include \ + -I./../../../../BitCloud/lib \ + -I./../../../../BitCloud/Components/HAL/include \ + -I./../../../../BitCloud/Components/BSP \ + -I./../../../../BitCloud/Components/BSP/include \ + -I./../../../../BitCloud/Components/NWK/include \ + -I./../../../../BitCloud/Components/NWK/include/private \ + -I./../../../../BitCloud/Components/ZDO/include \ + -I./../../../../BitCloud/Components/ZDO/include/private \ + -I./../../../../BitCloud/Components/APS/include \ + -I./../../../../BitCloud/Components/APS/include/private \ + -I./../../../../BitCloud/Components/SystemEnvironment/include \ + -I./../../../../BitCloud/Components/ConfigServer/include \ + -I./../../../../BitCloud/Components/ConfigServer/include/private \ + -I./../../../../BitCloud/Components/PersistDataServer/include \ + -I./../../../../BitCloud/Components/PersistDataServer/include/private \ + -I./../../../../BitCloud/Components/Security/TrustCentre/include \ + -I./../../../../BitCloud/Components/Security/ServiceProvider/include \ + -I./../../../../BitCloud/Components/HAL/avr/atmega1281/common/include \ + -I./../../../../BitCloud/Components/HAL/avr/atmega1281/zigBit/include \ + -I./../../../../BitCloud/Components/MAC_PHY/include \ + -I./../../../../BitCloud/Components/MAC_PHY/MAC_ENV/include \ + -I./../../../../BitCloud/Components/MAC_PHY/MAC_HWI/include \ + -I./../../../../BitCloud/Components/MAC_PHY/MAC_HWD_PHY/include \ + -I./../../../../BitCloud/Components/MAC_PHY/MAC_HWD_PHY/RF230/PHY/include \ + -I./../../../../BitCloud/Components/MAC_PHY/MAC_HWD_PHY/RF230/MAC_HWD/include + +LIBS = \ + ./../../../../BitCloud/lib/libHAL_ZigBit_Atmega1281_8Mhz_Gcc.a \ + ./../../../../BitCloud/lib/libBc_All_Sec_Atmega1281_Rf230_Gcc.a \ + ./../../../../BitCloud/lib/WdtInitatmega1281_Gcc.o + +SRCS = \ + ./../../../../BitCloud/Components/PersistDataServer/src/pdsWriteData.c \ + ./../../../../BitCloud/Components/PersistDataServer/src/pdsDataServer.c \ + ./../../../../BitCloud/Components/PersistDataServer/src/pdsCrcService.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/sensors.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/buttons.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/pwrCtrl.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/leds.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/battery.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/lm73.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/tsl2550.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/sliders.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/fakeBSP.c \ + ./../../../../BitCloud/Components/BSP/MESHBEAN/src/bspTaskManager.c \ + ./../../../../BitCloud/Components/ConfigServer/src/csPersistentMem.c \ + ./../../../../BitCloud/Components/ConfigServer/src/csMem.c \ + ./../../../../BitCloud/Components/ConfigServer/src/configServer.c + +PREINCLUDE = MakerulesBc_All_Sec_Atmega1281_Rf230_Gcc.h + +SRCS += $(wildcard ./../../src/*.c) +SRCS += $(wildcard ./../../../common/src/*.c) + +CSRCS = $(filter %.c, $(SRCS)) +OBJS = $(addprefix $(OBJ_PATH)/, $(notdir %/$(subst .c,.o,$(CSRCS)))) + +ASM_FILE_EXT = s + +ifneq (, $(findstring .$(ASM_FILE_EXT), $(SRCS))) + ASRCS = $(filter %.$(ASM_FILE_EXT), $(SRCS)) + OBJS += $(addprefix $(OBJ_PATH)/, $(notdir %$(subst .$(ASM_FILE_EXT),.o,$(ASRCS)))) +endif + +CFLAGS += $(DEFINES) +CFLAGS += $(INCLUDES) +CFLAGS += -include $(PREINCLUDE) +CFLAGS += -g + +ASFLAGS = $(INCLUDES) +ASFLAGS += $(filter -mmcu%,$(CFLAGS)) + +LD = $(CC) +LINKER_FLAGS = -Wl,-Map=$(LIST_PATH)/$(APP_NAME).map -Wl,--gc-sections +LINKER_FLAGS += -Wl,--script=./../../linkerScr/atmega1281.ld +LINKER_FLAGS += $(filter -mmcu%,$(CFLAGS)) + +.PHONY: all directories clean size root_files + +all: directories $(EXE_PATH)/$(APP_NAME).elf $(EXE_PATH)/$(APP_NAME).hex $(EXE_PATH)/$(APP_NAME).srec $(EXE_PATH)/$(APP_NAME).bin root_files size + +$(OBJ_PATH)/%.o: $(SRCS) + $(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -o $@ + + +$(EXE_PATH)/$(APP_NAME).elf: $(OBJS) + $(LD) $(LINKER_FLAGS) $(OBJS) -Wl,-\( $(LIBS) -Wl,-\) -o $@ + +$(EXE_PATH)/$(APP_NAME).srec: $(EXE_PATH)/$(APP_NAME).elf + $(OBJCOPY) -O srec --srec-len 128 $^ $@ + +$(EXE_PATH)/$(APP_NAME).hex: $(EXE_PATH)/$(APP_NAME).elf + $(OBJCOPY) -O ihex -R .eeprom $^ $@ + +$(EXE_PATH)/$(APP_NAME).bin: $(EXE_PATH)/$(APP_NAME).elf + $(OBJCOPY) -O binary --strip-debug --strip-unneeded -R .eeprom $^ $@ + +root_files: + cp -f $(EXE_PATH)/*.* ./../../ + +clean: + rm -rf $(CONFIG_NAME) ./../../$(APP_NAME).elf ./../../$(APP_NAME).hex ./../../$(APP_NAME).srec ./../../$(APP_NAME).bin + +directories: + @mkdir -p $(LIST_PATH) + @mkdir -p $(EXE_PATH) + @mkdir -p $(OBJ_PATH) + +size: $(EXE_PATH)/$(APP_NAME).elf + @echo + @$(SIZE) -td $(EXE_PATH)/$(APP_NAME).elf + +# eof Makefile -- cgit v1.2.3