Skip to content

Commit 6207d25

Browse files
committed
missing makefile.
1 parent ce06faf commit 6207d25

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ports/xt804/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ INC += $(addprefix -I,$(PLATFORM_INCDIR))
110110
LIBDIRS += $(PLATFORM_LIBDIR)
111111

112112
CC_DEFAULT_OPTIONS = $(TargetCCOption) -DGCC_COMPILE=1 -ffunction-sections -fdata-sections
113+
AS_DEFAULT_OPTIONS = $(TargetCCOption) -Wa,--gdwarf2
113114
LD_MAP_OPTION = -Wl,--ckmap=$(BUILD)/firmware.map
114115
LD_LIB_OPTION = -Wl,--start-group -Wl,--end-group
115116
LD_DEFAULT_OPTIONS = $(ExtraLinkOption) $(LD_MAP_OPTION) $(TargetLDOption) -nostartfiles -Wl,--gc-sections -T"$(SDKPath)/ld/$(TargetBoard)/gcc_csky.ld" $(LD_LIB_OPTION)
@@ -118,6 +119,7 @@ DFU = $(TOP)/tools/dfu.py
118119
PYDFU = $(TOP)/tools/pydfu.py
119120

120121
CFLAGS = $(INC) $(CC_DEFAULT_OPTIONS) $(COPT) $(CFLAGS_MOD)
122+
SFLAGS = $(addprefix -I,$(PLATFORM_ASMINC)) $(AS_DEFAULT_OPTIONS)
121123
LDFLAGS = $(LD_DEFAULT_OPTIONS)
122124
else
123125
LD = gcc
@@ -287,6 +289,10 @@ $(BUILD)/firmware.dfu: $(BUILD)/firmware.elf
287289
@ls --color=auto -Ugo $(BUILD)/firmware.elf $(BUILD)/firmware.bin
288290
@./tools/postbuild.sh firmware $(SDKPath) $(BUILD) $(zip) $(sign) $(encrypt)
289291

292+
dist: $(BUILD)/firmware.dfu
293+
$(Q)make -p dist
294+
copy $(BUILD)/*.fls dist/
295+
290296
deploy: $(BUILD)/firmware.dfu
291297
$(ECHO) "Writing $< to the board"
292298
$(Q)$(PYTHON) $(PYDFU) -u $<
@@ -306,3 +312,7 @@ test: $(BUILD)/firmware.elf
306312

307313

308314
include $(TOP)/py/mkrules.mk
315+
316+
$(BUILD)/%.o: %.S
317+
$(ECHO) "ASM $<"
318+
$(Q)$(CC) $(SFLAGS) -c -o $@ $<

0 commit comments

Comments
 (0)