11# #########################################################################################################################
2- # File automatically-generated by tool: [projectgenerator] version: [2.30.0] date: [Sat Sep 29 11:39:00 CEST 2018]
2+ # File automatically-generated by tool: [projectgenerator] version: [2.30.0] date: [Mon Oct 15 23:30:01 CEST 2018]
33# #########################################################################################################################
44
55# ------------------------------------------------
1313# #####################################
1414# target
1515# #####################################
16- TARGET = JtagProgrammer
16+ TARGET = RemoteProgrammer
1717
1818
1919# #####################################
@@ -160,12 +160,55 @@ Src/ethernetif.c \
160160Src/stm32f4xx_it.c \
161161Src/stm32f4xx_hal_msp.c \
162162Src/communication/dbgu.c \
163- Src/communication/term_io.c
163+ Src/communication/term_io.c \
164+ Src/communication/wakaama_client/wakaama.c
164165
165166# ASM sources
166167ASM_SOURCES = \
167168startup_stm32f429xx.s
168169
170+ # ######################################
171+ # Wakaama
172+ # #####################################
173+
174+ WAKAAMA_SOURCES = \
175+ Middlewares/Third_Party/wakaama/liblwm2m.c \
176+ Middlewares/Third_Party/wakaama/wakaama_utils.c \
177+ Middlewares/Third_Party/wakaama/uri.c \
178+ Middlewares/Third_Party/wakaama/objects.c \
179+ Middlewares/Third_Party/wakaama/tlv.c \
180+ Middlewares/Third_Party/wakaama/data.c \
181+ Middlewares/Third_Party/wakaama/wakaama_list.c \
182+ Middlewares/Third_Party/wakaama/packet.c \
183+ Middlewares/Third_Party/wakaama/transaction.c \
184+ Middlewares/Third_Party/wakaama/registration.c \
185+ Middlewares/Third_Party/wakaama/bootstrap.c \
186+ Middlewares/Third_Party/wakaama/management.c \
187+ Middlewares/Third_Party/wakaama/observe.c \
188+ Middlewares/Third_Party/wakaama/json.c \
189+ Middlewares/Third_Party/wakaama/discover.c \
190+ Middlewares/Third_Party/wakaama/block1.c \
191+ Middlewares/Third_Party/wakaama/er-coap-13/er-coap-13.c
192+
193+ WAKAAMA_CUSTOM = \
194+ Src/communication/wakaama_client/platform/platform.c \
195+ Src/communication/wakaama_client/connection.c \
196+ Src/communication/wakaama_client/objects/object_device.c \
197+ Src/communication/wakaama_client/objects/object_security.c \
198+ Src/communication/wakaama_client/objects/object_server.c \
199+ Src/communication/wakaama_client/objects/test_object.c
200+
201+
202+ WAKAAMA_INC = \
203+ -IMiddlewares/Third_Party/wakaama \
204+ -IMiddlewares/Third_Party/wakaama/er-coap-13 \
205+
206+
207+ WAKAAMA_SYMBOL = -DLWM2M_LITTLE_ENDIAN
208+ WAKAAMA_SYMBOL += -DLWM2M_CLIENT_MODE
209+ # WAKAAMA_SYMBOL += -DLWM2M_MEMORY_TRACE
210+ # WAKAAMA_SYMBOL += -DCOAPLOG # download logs
211+ # WAKAAMA_SYMBOL += -DLWM2M_WITH_LOGS # LOGS
169212
170213# ######################################
171214# binaries
@@ -186,7 +229,7 @@ SZ = $(PREFIX)size
186229endif
187230HEX = $(CP ) -O ihex
188231BIN = $(CP ) -O binary -S
189-
232+
190233# ######################################
191234# CFLAGS
192235# ######################################
@@ -204,7 +247,7 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
204247
205248# macros for gcc
206249# AS defines
207- AS_DEFS =
250+ AS_DEFS =
208251
209252# C defines
210253C_DEFS = \
@@ -240,13 +283,19 @@ C_INCLUDES = \
240283-IMiddlewares/Third_Party/LwIP/src/include/posix/sys \
241284-IMiddlewares/Third_Party/LwIP/system/arch \
242285-IDrivers/CMSIS/Include \
243- -IInc/communication
286+ -IInc/communication \
287+ -IInc/communication/wakaama_client \
288+ -IInc/communication/wakaama_client/objects \
289+ -Iconfig
244290
291+ C_INCLUDES += $(WAKAAMA_INC )
292+
293+ C_SOURCES += $(WAKAAMA_SOURCES ) $(WAKAAMA_CUSTOM )
245294
246295# compile gcc flags
247296ASFLAGS = $(MCU ) $(AS_DEFS ) $(AS_INCLUDES ) $(OPT ) -Wall -fdata-sections -ffunction-sections
248297
249- CFLAGS = $(MCU ) $(C_DEFS ) $(C_INCLUDES ) $(OPT ) -Wall -fdata-sections -ffunction-sections
298+ CFLAGS = $(MCU ) $(C_DEFS ) $(C_INCLUDES ) $(OPT ) $( WAKAAMA_SYMBOL ) -Wall -fdata-sections -ffunction-sections
250299
251300ifeq ($(DEBUG ) , 1)
252301CFLAGS += -g -gdwarf-2
@@ -264,8 +313,8 @@ CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)"
264313LDSCRIPT = STM32F429ZITx_FLASH.ld
265314
266315# libraries
267- LIBS = -lc -lm -lnosys
268- LIBDIR =
316+ LIBS = -lc -lm -lnosys
317+ LIBDIR =
269318LDFLAGS = $(MCU ) -specs=nano.specs -T$(LDSCRIPT ) $(LIBDIR ) $(LIBS ) -Wl,-Map=$(BUILD_DIR ) /$(TARGET ) .map,--cref -Wl,--gc-sections
270319
271320# default action: build all
@@ -282,7 +331,7 @@ vpath %.c $(sort $(dir $(C_SOURCES)))
282331OBJECTS += $(addprefix $(BUILD_DIR ) /,$(notdir $(ASM_SOURCES:.s=.o ) ) )
283332vpath % .s $(sort $(dir $(ASM_SOURCES ) ) )
284333
285- $(BUILD_DIR ) /% .o : % .c Makefile | $(BUILD_DIR )
334+ $(BUILD_DIR ) /% .o : % .c Makefile | $(BUILD_DIR )
286335 $(CC ) -c $(CFLAGS ) -Wa,-a,-ad,-alms=$(BUILD_DIR ) /$(notdir $(<:.c=.lst ) ) $< -o $@
287336
288337$(BUILD_DIR ) /% .o : % .s Makefile | $(BUILD_DIR )
@@ -294,19 +343,19 @@ $(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) Makefile
294343
295344$(BUILD_DIR ) /% .hex : $(BUILD_DIR ) /% .elf | $(BUILD_DIR )
296345 $(HEX ) $< $@
297-
346+
298347$(BUILD_DIR ) /% .bin : $(BUILD_DIR ) /% .elf | $(BUILD_DIR )
299- $(BIN ) $< $@
300-
348+ $(BIN ) $< $@
349+
301350$(BUILD_DIR ) :
302- mkdir $@
351+ mkdir $@
303352
304353# ######################################
305354# clean up
306355# ######################################
307356clean :
308357 -rm -fR $(BUILD_DIR )
309-
358+
310359# ######################################
311360# dependencies
312361# ######################################
0 commit comments