import: add hex/raw binary support

Generate raw binary file

Change-Id: I3af0d9be3fccec99dc0079f745530aa5028723df
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2020-06-28 15:54:26 +08:00 committed by Xiang Xiao
parent 51388de7a1
commit 989d1aef13

View File

@ -52,6 +52,14 @@ $(APPDIR)$(DELIM)nuttx$(EXEEXT): $(wildcard $(APPDIR)$(DELIM)*$(LIBEXT))
$(Q) $(LD) --entry=__start $(LDFLAGS) -T$(LDSCRIPT) $(LIBPATHS) \
$(LDLIBPATH) -L$(CURDIR)$(DELIM)scripts -o $@ $(HEAD_OBJ) \
$(EXTRA_OBJS) $(LDSTARTGROUP) $^ $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP)
ifeq ($(CONFIG_INTELHEX_BINARY),y)
$(Q) echo "CP: nuttx.hex"
$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex $@ nuttx.hex
endif
ifeq ($(CONFIG_RAW_BINARY),y)
$(Q) echo "CP: nuttx.bin"
$(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $@ nuttx.bin
endif
install: $(APPDIR)$(DELIM)nuttx$(EXEEXT)