change comment style
This commit is contained in:
parent
98271c9f56
commit
c0f75b21b0
50
Makefile
50
Makefile
@ -1,11 +1,11 @@
|
|||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# CONFIGURE
|
# CONFIGURE
|
||||||
# - SDK_PATH : path to SDK directory
|
# - SDK_PATH : path to SDK directory
|
||||||
#
|
#
|
||||||
# - SD_NAME : e.g s132, s140
|
# - SD_NAME : e.g s132, s140
|
||||||
# - SD_VERSION : SoftDevice version e.g 6.0.0
|
# - SD_VERSION : SoftDevice version e.g 6.0.0
|
||||||
# - SD_HEX : to bootloader hex binary
|
# - SD_HEX : to bootloader hex binary
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
SDK_PATH = lib/sdk/components
|
SDK_PATH = lib/sdk/components
|
||||||
SDK11_PATH = lib/sdk11/components
|
SDK11_PATH = lib/sdk11/components
|
||||||
@ -31,9 +31,9 @@ OUT_FILE = $(BOARD)_bootloader-$(GIT_VERSION)
|
|||||||
# merged file = compiled + sd
|
# merged file = compiled + sd
|
||||||
MERGED_FILE = $(OUT_FILE)_$(SD_NAME)_$(SD_VERSION)
|
MERGED_FILE = $(OUT_FILE)_$(SD_NAME)_$(SD_VERSION)
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# Tool configure
|
# Tool configure
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Toolchain commands
|
# Toolchain commands
|
||||||
# Should be added to your PATH
|
# Should be added to your PATH
|
||||||
@ -88,9 +88,9 @@ else
|
|||||||
$(error Sub Variant $(MCU_SUB_VARIANT) is unknown)
|
$(error Sub Variant $(MCU_SUB_VARIANT) is unknown)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# SOURCE FILES
|
# SOURCE FILES
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# all files in src
|
# all files in src
|
||||||
C_SRC += $(wildcard src/*.c)
|
C_SRC += $(wildcard src/*.c)
|
||||||
@ -110,11 +110,9 @@ C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/bootloader_util.c
|
|||||||
C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/dfu_transport_serial.c
|
C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/dfu_transport_serial.c
|
||||||
C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/dfu_transport_ble.c
|
C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/dfu_transport_ble.c
|
||||||
C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/dfu_single_bank.c
|
C_SRC += $(SDK11_PATH)/libraries/bootloader_dfu/dfu_single_bank.c
|
||||||
|
|
||||||
C_SRC += $(SDK11_PATH)/drivers_nrf/pstorage/pstorage_raw.c
|
|
||||||
|
|
||||||
C_SRC += $(SDK11_PATH)/ble/ble_services/ble_dfu/ble_dfu.c
|
C_SRC += $(SDK11_PATH)/ble/ble_services/ble_dfu/ble_dfu.c
|
||||||
C_SRC += $(SDK11_PATH)/ble/ble_services/ble_dis/ble_dis.c
|
C_SRC += $(SDK11_PATH)/ble/ble_services/ble_dis/ble_dis.c
|
||||||
|
C_SRC += $(SDK11_PATH)/drivers_nrf/pstorage/pstorage_raw.c
|
||||||
|
|
||||||
# Latest SDK files: peripheral drivers
|
# Latest SDK files: peripheral drivers
|
||||||
C_SRC += $(SDK_PATH)/libraries/timer/app_timer.c
|
C_SRC += $(SDK_PATH)/libraries/timer/app_timer.c
|
||||||
@ -155,14 +153,14 @@ C_SRC += $(TUSB_PATH)/tusb.c
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# Assembly Files
|
# Assembly Files
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
ASM_SRC = $(NRFX_PATH)/mdk/gcc_startup_$(MCU_SUB_VARIANT).S
|
ASM_SRC = $(NRFX_PATH)/mdk/gcc_startup_$(MCU_SUB_VARIANT).S
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# INCLUDE PATH
|
# INCLUDE PATH
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# src
|
# src
|
||||||
IPATH += src
|
IPATH += src
|
||||||
@ -202,10 +200,9 @@ IPATH += $(SD_API_PATH)/include/nrf52
|
|||||||
|
|
||||||
INC_PATHS = $(addprefix -I,$(IPATH))
|
INC_PATHS = $(addprefix -I,$(IPATH))
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# Compiler Flags
|
# Compiler Flags
|
||||||
# - Additional compiler flags
|
#------------------------------------------------------------------------------
|
||||||
#******************************************************************************
|
|
||||||
|
|
||||||
# Debugging/Optimization
|
# Debugging/Optimization
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
@ -252,10 +249,9 @@ _VER = $(subst ., ,$(word 1, $(subst -, ,$(GIT_VERSION))))
|
|||||||
CFLAGS += -DMK_BOOTLOADER_VERSION='($(word 1,$(_VER)) << 16) + ($(word 2,$(_VER)) << 8) + $(word 3,$(_VER))'
|
CFLAGS += -DMK_BOOTLOADER_VERSION='($(word 1,$(_VER)) << 16) + ($(word 2,$(_VER)) << 8) + $(word 3,$(_VER))'
|
||||||
|
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# Linker Flags
|
# Linker Flags
|
||||||
#
|
#------------------------------------------------------------------------------
|
||||||
#******************************************************************************
|
|
||||||
|
|
||||||
LDFLAGS += \
|
LDFLAGS += \
|
||||||
$(CFLAGS) \
|
$(CFLAGS) \
|
||||||
@ -265,10 +261,9 @@ LDFLAGS += \
|
|||||||
|
|
||||||
LIBS += -lm -lc
|
LIBS += -lm -lc
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# Assembler flags
|
# Assembler flags
|
||||||
#
|
#------------------------------------------------------------------------------
|
||||||
#******************************************************************************
|
|
||||||
ASFLAGS += $(CFLAGS)
|
ASFLAGS += $(CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
@ -288,9 +283,9 @@ vpath %.S $(ASM_PATHS)
|
|||||||
|
|
||||||
OBJECTS = $(C_OBJECTS) $(ASM_OBJECTS)
|
OBJECTS = $(C_OBJECTS) $(ASM_OBJECTS)
|
||||||
|
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
# BUILD TARGETS
|
# BUILD TARGETS
|
||||||
#******************************************************************************
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Verbose mode (V=). 0: default, 1: print out CFLAG, LDFLAG 2: print all compile command
|
# Verbose mode (V=). 0: default, 1: print out CFLAG, LDFLAG 2: print all compile command
|
||||||
ifeq ("$(V)","1")
|
ifeq ("$(V)","1")
|
||||||
@ -307,7 +302,7 @@ endif
|
|||||||
# default target to build
|
# default target to build
|
||||||
all: $(BUILD)/$(OUT_FILE)-nosd.out size
|
all: $(BUILD)/$(OUT_FILE)-nosd.out size
|
||||||
|
|
||||||
#******************* Flash target *******************
|
#------------------- Flash target -------------------
|
||||||
|
|
||||||
check_defined = \
|
check_defined = \
|
||||||
$(strip $(foreach 1,$1, \
|
$(strip $(foreach 1,$1, \
|
||||||
@ -340,7 +335,7 @@ gdbflash: $(BUILD)/$(MERGED_FILE).hex
|
|||||||
gdb: $(BUILD)/$(OUT_FILE)-nosd.out
|
gdb: $(BUILD)/$(OUT_FILE)-nosd.out
|
||||||
$(GDB_BMP) $<
|
$(GDB_BMP) $<
|
||||||
|
|
||||||
#******************* Compile rules *******************
|
#------------------- Compile rules -------------------
|
||||||
|
|
||||||
## Create build directories
|
## Create build directories
|
||||||
$(BUILD):
|
$(BUILD):
|
||||||
@ -369,8 +364,7 @@ size: $(BUILD)/$(OUT_FILE)-nosd.out
|
|||||||
@$(SIZE) $<
|
@$(SIZE) $<
|
||||||
-@echo ''
|
-@echo ''
|
||||||
|
|
||||||
|
#------------------- Binary generator -------------------
|
||||||
#******************* Binary generator *******************
|
|
||||||
.phony: genhex genpkg
|
.phony: genhex genpkg
|
||||||
|
|
||||||
## Create binary .hex file from the .out file
|
## Create binary .hex file from the .out file
|
||||||
|
Loading…
Reference in New Issue
Block a user