You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/07/01 12:18:41 UTC

[incubator-nuttx-apps] branch master updated: import: add hex/raw binary support

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 989d1ae  import: add hex/raw binary support
989d1ae is described below

commit 989d1aef138f697c73283a3b06a9d00ad2020803
Author: chao.an <an...@xiaomi.com>
AuthorDate: Sun Jun 28 15:54:26 2020 +0800

    import: add hex/raw binary support
    
    Generate raw binary file
    
    Change-Id: I3af0d9be3fccec99dc0079f745530aa5028723df
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 import/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/import/Makefile b/import/Makefile
index d2b18ac..763c4cc 100644
--- a/import/Makefile
+++ b/import/Makefile
@@ -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)