diff options
| author | DawnManget <[email protected]> | 2022-05-10 11:39:39 +0800 |
|---|---|---|
| committer | DawnManget <[email protected]> | 2022-05-10 11:39:39 +0800 |
| commit | 4deeedb8c21e47cec0ad0b52739552c678a82cfd (patch) | |
| tree | 9aa0b174223f802cc81fba9e9bdd26037ad940e3 | |
| parent | 78c0715c5b79a2fcd94a8c808bffb22e60533c2b (diff) | |
review3: add keil-c51 toolchain & rules
| -rw-r--r-- | xmake/rules/c51/xmake.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xmake/rules/c51/xmake.lua b/xmake/rules/c51/xmake.lua index c274b2333..c9f65af55 100644 --- a/xmake/rules/c51/xmake.lua +++ b/xmake/rules/c51/xmake.lua @@ -11,9 +11,13 @@ rule("c51.static") end end) - after_link(function(target) - import("lib.detect.find_tool") - local oh = assert(find_tool("oh51"), "oh51 not found") - os.iorunv(oh.program, {target:targetfile()}) - cprint("${color.warning} hex file generated %s", target:targetfile() .. ".hex") + after_link(function(target, opt) + import("core.project.depend") + depend.on_changed(function() + import("lib.detect.find_tool") + import("utils.progress") + local oh = assert(find_tool("oh51"), "oh51 not found") + os.iorunv(oh.program, {target:targetfile()}) + progress.show(opt.progress, "${color.build.target}generating.$(mode) %s", target:targetfile() .. ".hex") + end, {files = {target:targetfile()}}) end)
\ No newline at end of file |
