diff --git a/tools/keil.py b/tools/keil.py index f85bb767bf..4cbfb97faf 100644 --- a/tools/keil.py +++ b/tools/keil.py @@ -268,7 +268,7 @@ def MDK45Project(tree, target, script): # write include path, definitions and link flags IncludePath = tree.find('Targets/Target/TargetOption/TargetArmAds/Cads/VariousControls/IncludePath') - IncludePath.text = ';'.join([_make_path_relative(project_path, os.path.normpath(i)) for i in CPPPATH]) + IncludePath.text = ';'.join([_make_path_relative(project_path, os.path.normpath(i)) for i in set(CPPPATH)]) Define = tree.find('Targets/Target/TargetOption/TargetArmAds/Cads/VariousControls/Define') Define.text = ', '.join(set(CPPDEFINES))