|
1 | 1 | import os
|
2 | 2 | import subprocess
|
3 |
| -import re |
4 | 3 |
|
5 | 4 | PREFIX = "arm-none-eabi-"
|
6 | 5 | BUILDER = "DEV"
|
@@ -124,36 +123,13 @@ with open("obj/cert.h", "w") as f:
|
124 | 123 | f.write("\n".join(cert) + "\n")
|
125 | 124 |
|
126 | 125 | includes = [
|
127 |
| - "/usr/lib/gcc/arm-none-eabi/9.2.1/include", |
128 | 126 | "inc/STM32F4xx_HAL_Driver/Inc/Legacy",
|
129 | 127 | "inc/STM32F4xx_HAL_Driver/Inc",
|
130 | 128 | "inc",
|
131 | 129 | '..',
|
132 | 130 | '.'
|
133 | 131 | ]
|
134 | 132 |
|
135 |
| -def exist_scan(node, env, path): |
136 |
| - include_re = re.compile(r'^#include\s+(\S+)$', re.M) |
137 |
| - exist_files = [] |
138 |
| - |
139 |
| - contents = node.get_text_contents() |
140 |
| - include_dirs = include_re.findall(contents) |
141 |
| - cpppaths = env["CPPPATH"] |
142 |
| - |
143 |
| - for file in include_dirs: |
144 |
| - file = file.strip('"<>"') |
145 |
| - for cpppath in cpppaths: |
146 |
| - cpppath = Dir(cpppath).relpath |
147 |
| - p = os.path.join(cpppath, file) |
148 |
| - if os.path.isfile(p): |
149 |
| - exist_files.append(File(p)) |
150 |
| - return exist_files |
151 |
| -my_exist_scan = Scanner(name="EXIST_SCANNER",function=exist_scan) |
152 |
| -file_extensions = ['.c', '.h', '.cc', '.cpp'] |
153 |
| -for e in file_extensions: |
154 |
| - SourceFileScanner.add_scanner(e,my_exist_scan) |
155 |
| - |
156 |
| - |
157 | 133 | for project_name in build_projects:
|
158 | 134 | project = build_projects[project_name]
|
159 | 135 | linkerscript_fn = File(project["LINKER_SCRIPT"]).srcnode().relpath
|
|
0 commit comments