summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-11 23:01:52 +0800
committerruki <[email protected]>2025-12-12 09:00:43 +0800
commit7b7db07e2cada2ca610a352297aadce993596947 (patch)
tree6fc9f34c73e7cc568d6f73aa213b64432ce3952f
parentc8d424baeb7b93e2a1e900b271bcc09144fdce94 (diff)
fix error
-rw-r--r--xmake/modules/cli/binutils/bin2c.lua7
-rw-r--r--xmake/modules/cli/binutils/bin2obj.lua7
2 files changed, 14 insertions, 0 deletions
diff --git a/xmake/modules/cli/binutils/bin2c.lua b/xmake/modules/cli/binutils/bin2c.lua
index f2b03acdf..423d4f3eb 100644
--- a/xmake/modules/cli/binutils/bin2c.lua
+++ b/xmake/modules/cli/binutils/bin2c.lua
@@ -37,6 +37,13 @@ function main(...)
, ""
, "Usage: xmake l cli.binutils.bin2c [options]")
+ -- check arguments
+ if not opt.binarypath or not opt.outputpath then
+ cprint("${bright}Usage: $${clear}xmake l cli.binutils.bin2c [options]")
+ option.show_options(options, "bin2c")
+ return
+ end
+
-- do bin2c
bin2c.main(opt.binarypath, opt.outputpath, opt)
end
diff --git a/xmake/modules/cli/binutils/bin2obj.lua b/xmake/modules/cli/binutils/bin2obj.lua
index 33eb0511e..9024d4b24 100644
--- a/xmake/modules/cli/binutils/bin2obj.lua
+++ b/xmake/modules/cli/binutils/bin2obj.lua
@@ -42,6 +42,13 @@ function main(...)
, ""
, "Usage: xmake l cli.binutils.bin2obj [options]")
+ -- check arguments
+ if not opt.binarypath or not opt.outputpath then
+ cprint("${bright}Usage: $${clear}xmake l cli.binutils.bin2obj [options]")
+ option.show_options(options, "bin2obj")
+ return
+ end
+
-- do bin2obj
bin2obj.main(opt.binarypath, opt.outputpath, opt)
end