summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/system/hex2bin/Makefile8
-rw-r--r--nuttx/binfmt/binfmt_exec.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/apps/system/hex2bin/Makefile b/apps/system/hex2bin/Makefile
index ce50879b1..7b9acbade 100644
--- a/apps/system/hex2bin/Makefile
+++ b/apps/system/hex2bin/Makefile
@@ -40,7 +40,11 @@ include $(APPDIR)/Make.defs
# I2C tool
ASRCS =
-CSRCS = hex2bin.c hex2bin_main.c
+CSRCS = hex2bin.c
+
+ifeq ($(CONFIG_SYSTEM_HEX2BIN_BUILTIN),y)
+CSRCS += hex2bin_main.c
+endif
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
@@ -81,7 +85,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-ifeq ($(CONFIG_SYSTEM_HEX2BIN_BUILTINS),y)
+ifeq ($(CONFIG_SYSTEM_HEX2BIN_BUILTIN),y)
$(BUILTIN_REGISTRY)$(DELIM)hex2bin.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,"hex2bin",$(PRIORITY),$(STACKSIZE),hex2bin_main)
diff --git a/nuttx/binfmt/binfmt_exec.c b/nuttx/binfmt/binfmt_exec.c
index c175de3b9..446df6373 100644
--- a/nuttx/binfmt/binfmt_exec.c
+++ b/nuttx/binfmt/binfmt_exec.c
@@ -80,7 +80,7 @@
* exits.
*
* Input Parameter:
- * filename - Fulll path to the binary to be loaded
+ * filename - Full path to the binary to be loaded
* argv - Argument list
* exports - Table of exported symbols
* nexports - The number of symbols in exports
@@ -112,6 +112,7 @@ int exec(FAR const char *filename, FAR char * const *argv,
/* Load the module into memory */
bin->filename = filename;
+ bin->argv = argv;
bin->exports = exports;
bin->nexports = nexports;
@@ -189,4 +190,3 @@ int exec(FAR const char *filename, FAR char * const *argv,
}
#endif /* CONFIG_BINFMT_DISABLE */
-