diff options
| author | DawnManget <[email protected]> | 2022-05-10 11:52:42 +0800 |
|---|---|---|
| committer | DawnManget <[email protected]> | 2022-05-10 11:52:42 +0800 |
| commit | fdd33995a73e871d43409cdb541ebf1ec8cc300b (patch) | |
| tree | 35ac9e7b3897063081e6cfe8bd5edd8b08734a3b | |
| parent | 4deeedb8c21e47cec0ad0b52739552c678a82cfd (diff) | |
review4: add keil-c51 toolchain & rules
| -rw-r--r-- | xmake/rules/c51/xmake.lua | 5 | ||||
| -rw-r--r-- | xmake/toolchains/c51/xmake.lua | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/c51/xmake.lua b/xmake/rules/c51/xmake.lua index c9f65af55..44c2d3483 100644 --- a/xmake/rules/c51/xmake.lua +++ b/xmake/rules/c51/xmake.lua @@ -1,3 +1,4 @@ + rule("c51.static") on_load(function (target) -- we disable checking flags for cross toolchain automatically @@ -13,9 +14,9 @@ rule("c51.static") after_link(function(target, opt) import("core.project.depend") + import("lib.detect.find_tool") + import("utils.progress") 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") diff --git a/xmake/toolchains/c51/xmake.lua b/xmake/toolchains/c51/xmake.lua index dc24b02ac..d0af24907 100644 --- a/xmake/toolchains/c51/xmake.lua +++ b/xmake/toolchains/c51/xmake.lua @@ -34,7 +34,6 @@ toolchain("c51") import("lib.detect.find_tool") import("detect.sdks.find_c51") local c51 = find_c51() - if c51 and c51.sdkdir and find_tool("c51") then toolchain:config_set("sdkdir", c51.sdkdir) toolchain:configs_save() |
