summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoreddylin83 <[email protected]>2019-08-05 18:00:20 +0800
committereddylin83 <[email protected]>2019-08-05 18:00:20 +0800
commit36d6326732a7081e04172dbc69eba503d52691d3 (patch)
treedd531a258e092acb225b11c2a31595285165d8c8 /tools
parent87267b41bca07c9a0d6e87a33b604d23de3acc0d (diff)
add stm32cubeide support
Diffstat (limited to 'tools')
-rw-r--r--tools/eclipse.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/eclipse.py b/tools/eclipse.py
index 316a98b87a..e4c37892e9 100644
--- a/tools/eclipse.py
+++ b/tools/eclipse.py
@@ -138,7 +138,7 @@ def HandleToolOption(tools, env, project, reset):
if tool.get('id').find('c.compile') != 1:
options = tool.findall('option')
for option in options:
- if option.get('id').find('c.compiler.include.paths') != -1:
+ if option.get('id').find('c.compiler.include.paths') != -1 or option.get('id').find('c.compiler.option.includepaths') != -1:
# find all of paths in this project
include_paths = option.findall('listOptionValue')
project_paths = []
@@ -159,7 +159,7 @@ def HandleToolOption(tools, env, project, reset):
for item in cproject_paths:
SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': item})
- if option.get('id').find('c.compiler.defs') != -1:
+ if option.get('id').find('c.compiler.defs') != -1 or option.get('id').find('c.compiler.option.definedsymbols') != -1:
defs = option.findall('listOptionValue')
project_defs = []
for item in defs:
@@ -194,6 +194,13 @@ def HandleToolOption(tools, env, project, reset):
else:
SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': linker_script})
+ # scriptfile in stm32cubeIDE
+ if option.get('id').find('c.linker.option.script') != -1:
+ items = env['LINKFLAGS'].split(' ')
+ if '-T' in items:
+ linker_script = ConverToEclipsePathFormat(items[items.index('-T') + 1]).strip('"')
+ option.set('value',linker_script)
+
if option.get('id').find('c.linker.nostart') != -1:
if env['LINKFLAGS'].find('-nostartfiles') != -1:
option.set('value', 'true')