From 574400e8e7e4ce90abb49e479087b112aff3ec45 Mon Sep 17 00:00:00 2001 From: HEYAHONG <2229388563@qq.com> Date: Mon, 27 Jul 2026 13:40:02 +0800 Subject: [PATCH] =?UTF-8?q?[tools/target/keil.py]=20=E5=BA=93=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=BA=94=E5=BD=93=E4=BB=8ELIBS=E9=81=8D=E5=8E=86?= =?UTF-8?q?=E8=80=8C=E9=9D=9E=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/targets/keil.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/targets/keil.py b/tools/targets/keil.py index 452f273dffd..ff46a87d1a7 100644 --- a/tools/targets/keil.py +++ b/tools/targets/keil.py @@ -276,13 +276,14 @@ def MDK45Project(env, tree, target, script): # get each group's LIBS flags if 'LIBS' in group and group['LIBS']: - for item in group['LIBPATH']: - full_path = os.path.join(item, group['name'] + '.lib') - if os.path.isfile(full_path): # has this library - if group_tree != None: - MDK4AddLibToGroup(ProjectFiles, group_tree, group['name'], full_path, project_path) - else: - group_tree = MDK4AddGroupForFN(ProjectFiles, groups, group['name'], full_path, project_path) + for libpath in group['LIBPATH']: + for libname in group["LIBS"]: + full_path = os.path.join(libpath, libname + '.lib') + if os.path.isfile(full_path): # has this library + if group_tree != None: + MDK4AddLibToGroup(ProjectFiles, group_tree, group['name'], full_path, project_path) + else: + group_tree = MDK4AddGroupForFN(ProjectFiles, groups, group['name'], full_path, project_path) # write include path, definitions and link flags IncludePath = tree.find('Targets/Target/TargetOption/TargetArmAds/Cads/VariousControls/IncludePath')