too dead
This commit is contained in:
parent
2d527931cb
commit
bda7183b9c
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>1.8</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/path2iar.iml" filepath="$PROJECT_DIR$/path2iar.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,70 +0,0 @@
|
|||
package com.rusefi;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* (c) Andrey Belomutskiy
|
||||
* 3/30/2017.
|
||||
*/
|
||||
public class Path2IAR {
|
||||
private static final String EOL = "\n";
|
||||
private static final String RELATIVE = "..\\..\\firmware/ChibiOS/os";
|
||||
private static String includes = "";
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String result = process(" ", new File(RELATIVE));
|
||||
|
||||
|
||||
System.out.println("Result:" + EOL + EOL + EOL + EOL + EOL + EOL);
|
||||
System.out.println(result.length());
|
||||
|
||||
new FileOutputStream("group.txt", false).write(result.getBytes());
|
||||
|
||||
System.out.println("Headers:" + EOL + EOL + EOL + EOL + EOL + EOL);
|
||||
System.out.println(includes);
|
||||
}
|
||||
|
||||
private static String process(String offset, File folder) {
|
||||
System.out.println("Folder " + folder);
|
||||
if (!folder.isDirectory())
|
||||
throw new IllegalStateException("Not a directory: " + folder);
|
||||
|
||||
|
||||
includes += "<state>$PROJ_DIR$\\..\\ChibiOS\\os" + folder.getPath().substring(RELATIVE.length()) + "</state>" + EOL;
|
||||
|
||||
|
||||
String group = offset + "<group>\n" +
|
||||
offset + " <name>" + folder.getName() + "</name>\n";
|
||||
|
||||
|
||||
for (String fileName : folder.list()) {
|
||||
File file = new File(folder.getPath() + File.separator + fileName);
|
||||
System.out.println(file);
|
||||
|
||||
if (file.isDirectory()) {
|
||||
group += process(offset + " ", file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!fileName.endsWith(".cpp") && !fileName.endsWith(".c") && !fileName.endsWith("h"))
|
||||
continue;
|
||||
|
||||
|
||||
String name = file.getPath().substring(RELATIVE.length());
|
||||
|
||||
group += offset + "<file>\n" +
|
||||
offset + " <name>$PROJ_DIR$\\..\\ChibiOS\\os" + name + "</name>\n" +
|
||||
offset + "</file>\n";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return group + offset + "</group>" + EOL;
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue