Skip to content

Commit 67c9dfc

Browse files
committed
A bit of cleanup. Delimeter not figured out yet.
1 parent a57f35f commit 67c9dfc

File tree

2 files changed

+29
-36
lines changed

2 files changed

+29
-36
lines changed

app/src/processing/app/debug/Compiler.java

+9-16
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ static private String[] getCommandCompilerS(String avrBasePath,
596596
};
597597

598598
String command = compileFormat.format( Args );
599-
String[] commandArray = command.split(",");
599+
String[] commandArray = command.split("\|");
600600
return commandArray;
601601
}
602602

@@ -655,7 +655,7 @@ private String[] getCommandCompilerC(String avrBasePath,
655655
};
656656

657657
String command = compileFormat.format( Args );
658-
String[] commandArray = command.split(",");
658+
String[] commandArray = command.split("\|");
659659
return commandArray;
660660
}
661661
/*
@@ -714,7 +714,7 @@ static private String[] getCommandCompilerCPP(String avrBasePath,
714714
};
715715

716716
String command = compileFormat.format( Args );
717-
String[] commandArray = command.split(",");
717+
String[] commandArray = command.split("\|");
718718

719719
/*
720720
System.out.println("command:" + command);
@@ -863,7 +863,7 @@ void compileCore (String avrBasePath, String buildPath, String corePath, String
863863
System.out.println("compileCore(...) substitute");
864864

865865
commandString = compileFormat.format( Args );
866-
String[] commandArray = commandString.split(",");
866+
String[] commandArray = commandString.split("\|");
867867
execAsynchronously(commandArray);
868868

869869

@@ -876,13 +876,12 @@ void compileLink(String avrBasePath, String buildPath, String corePath, ArrayLis
876876
{
877877
System.out.println("compileLink: start");
878878
String baseCommandString = configPreferences.get("recipe.c.combine.pattern");
879-
System.out.println("baseCommandstring: " + baseCommandString);
880879
String commandString = "";
881880
MessageFormat compileFormat = new MessageFormat(baseCommandString);
882881
String objectFileList = "";
883882

884883
for (File file : objectFiles) {
885-
objectFileList = objectFileList + file.getAbsolutePath() + ",";
884+
objectFileList = objectFileList + file.getAbsolutePath() + "\|";
886885
}
887886
System.out.println("objectFileList: " + objectFileList);
888887

@@ -901,13 +900,7 @@ void compileLink(String avrBasePath, String buildPath, String corePath, ArrayLis
901900
configPreferences.get("ldscript"),
902901
};
903902
commandString = compileFormat.format( Args );
904-
String[] commandArray = commandString.split(",");
905-
System.out.println("commandString: " + commandString);
906-
for (int ii = 0; ii < commandArray.length; ii++)
907-
{
908-
System.out.println("'" + commandArray[ii] + "'");
909-
}
910-
System.out.println("4. compileLink:prexec");
903+
String[] commandArray = commandString.split("\|");
911904
execAsynchronously(commandArray);
912905
}
913906

@@ -929,7 +922,7 @@ void compileEep (String avrBasePath, String buildPath, ArrayList<String> include
929922
buildPath + File.separator + primaryClassName
930923
};
931924
commandString = compileFormat.format( Args );
932-
String[] commandArray = commandString.split(",");
925+
String[] commandArray = commandString.split("\|");
933926
execAsynchronously(commandArray);
934927
}
935928

@@ -951,7 +944,7 @@ void compileHex (String avrBasePath, String buildPath, ArrayList<String> include
951944
buildPath + File.separator + primaryClassName
952945
};
953946
commandString = compileFormat.format( Args );
954-
String[] commandArray = commandString.split(",");
947+
String[] commandArray = commandString.split("\|");
955948
execAsynchronously(commandArray);
956949
}
957950

@@ -1023,7 +1016,7 @@ private static String preparePaths(ArrayList<String> includePaths) {
10231016
String includes = "";
10241017
for (int i = 0; i < includePaths.size(); i++)
10251018
{
1026-
includes = includes + (" -I" + (String) includePaths.get(i)) + ",";
1019+
includes = includes + (" -I" + (String) includePaths.get(i)) + "\|";
10271020
}
10281021
//logger.debug("Paths prepared: " + includes);
10291022
return includes;

hardware/arduino/platforms.txt

+20-20
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,38 @@
22
##compile c object files
33
##Default.recipe, overide if overide exists, these defauls should remain the same, if you need to change them do it as an overide.
44

5-
#default.recipe.c.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10}
6-
#default.recipe.cpp.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10}
7-
#default.recipe.ar.pattern={0}{1},{2},{3}{4},{5}
8-
#default.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7},{8},-L{9},-lm
9-
#default.recipe.objcopy.eep.pattern={0}{1},{2},{3}.elf,{4}.eep
10-
#default.recipe.objcopy.hex.pattern={0}{1},{2},{3}.elf,{4}.hex
5+
#default.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10}
6+
#default.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10}
7+
#default.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5}
8+
#default.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}|{8}|-L{9}|-lm
9+
#default.recipe.objcopy.eep.pattern={0}{1}|{2}|{3}.elf|{4}.eep
10+
#default.recipe.objcopy.hex.pattern={0}{1}|{2}|{3}.elf|{4}.hex
1111

1212
########avr compile pattern ##########
1313
#avr.recipe.c.o.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-D{7=ARDUINO}={6=Base.REVISION}{7=-I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=OBJECT_NAME}
1414
#object name seems to have build path in it.
15-
avr.recipe.c.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10}
15+
avr.recipe.c.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10}
1616

1717

1818
##compile cc object files
1919
#avr.recipe.cc.o.pattern={0=compiler.path}{1=compiler.cc.cmd}{2=compiler.c.flags}{3=compiler.cpudef}{4=build.mcu}-DF_CPU={5=build.f_cpu}-DARDUINO={6=Base.REVISION}{-7=I/INCLUDE_PATHS} {8=SOURCE_NAME} -o{9=BUILD_PATH}{10=OBJECT_NAME}
20-
avr.recipe.cpp.o.pattern={0}{1},{2},{3}{4},-DF_CPU={5},-D{6}={7},{8},{9},-o,{10}
20+
avr.recipe.cpp.o.pattern={0}{1}|{2}|{3}{4}|-DF_CPU={5}|-D{6}={7}|{8}|{9}|-o|{10}
2121
##create archives
2222
#avr.recipe.ar.pattern={0=compiler.path}{1=compiler.ar.cmd}{2=compiler.ar.flags}{3=BUILD_PATH}{4=CORE_NAME=core.a}{5=BUILD_PATH}{6=OBJECT_NAME}
23-
avr.recipe.ar.pattern={0}{1},{2},{3}{4},{5}
23+
avr.recipe.ar.pattern={0}{1}|{2}|{3}{4}|{5}
2424

25-
##combine gc-sections, archives, and objects
25+
##combine gc-sections| archives, and objects
2626
#avr.recipe.c.combine.pattern={0=compiler.path}{1=compiler.c.cmd}{2=compiler.combine.flags}{3=compiler.cpudef}{4=build.mcu} -o {5=BUILD_PATH}{6=SOURCE_NAME}.elf {7=BUILD_PATH}{8=SOURCE_NAME}.o {9=BUILD_PATH}{10=CORE_NAME=core.a} -L{11=BUILD_PATH} -lm
27-
#avr.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7}{8},{9},-L{10},-lm
28-
avr.recipe.c.combine.pattern={0}{1},{2},{3}{4},-o,{5}{6}.elf,{7},{8},-L{9},-lm
27+
#avr.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}{8}|{9}|-L{10}|-lm
28+
avr.recipe.c.combine.pattern={0}{1}|{2}|{3}{4}|-o|{5}{6}.elf|{7}|{8}|-L{9}|-lm
2929

3030
##create eeprom
3131
#avr.recipe.objcopy.eep.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.eep.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.eep
32-
avr.recipe.objcopy.eep.pattern={0}{1},{2},{3}.elf,{4}.eep
32+
avr.recipe.objcopy.eep.pattern={0}{1}|{2}|{3}.elf|{4}.eep
3333

3434
##create hex
3535
#avr.recipe.objcopy.hex.pattern={0=compiler.path}{1=compiler.objcopy.cmd}{2=compiler.objcopy.elf.flags} {3=BUILD_PATH}{4=SOURCE_NAME}.elf {5=BUILD_PATH}{6=SOURCE_NAME}.hex
36-
avr.recipe.objcopy.hex.pattern={0}{1},{2},{3}.elf,{4}.hex
36+
avr.recipe.objcopy.hex.pattern={0}{1}|{2}|{3}.elf|{4}.hex
3737

3838

3939

@@ -42,17 +42,17 @@ avr.name=Arduino
4242
#avr.compiler.path Official default is correct, only need to change this if you want to overide the initial default
4343
#avr.compiler.path={0}/hardware/tools/avr/bin/
4444
avr.compiler.c.cmd=avr-gcc
45-
avr.compiler.c.flags=,-c,-g,-Os,-w,-ffunction-sections,-fdata-sections
46-
avr.compiler.c.elf.flags=,-Os,-Wl,--gc-sections
45+
avr.compiler.c.flags=|-c|-g|-Os|-w|-ffunction-sections|-fdata-sections
46+
avr.compiler.c.elf.flags=|-Os|-Wl|--gc-sections
4747
avr.compiler.c.elf.cmd=avr-gcc
48-
avr.compiler.S.flags=,-c,-g,-assembler-with-cpp
48+
avr.compiler.S.flags=|-c|-g|-assembler-with-cpp
4949
avr.compiler.cpp.cmd=avr-g++
50-
avr.compiler.cpp.flags=,-c,-g,-Os,-w,-fno-exceptions,-ffunction-sections,-fdata-sections
50+
avr.compiler.cpp.flags=|-c|-g|-Os|-w|-fno-exceptions|-ffunction-sections|-fdata-sections
5151
avr.compiler.ar.cmd=avr-ar
5252
avr.compiler.ar.flags=rcs
5353
avr.compiler.objcopy.cmd=avr-objcopy
54-
avr.compiler.objcopy.eep.flags=,-O,ihex,-j,.eeprom,--set-section-flags=.eeprom=alloc,load,--no-change-warnings,--change-section-lma,.eeprom=0
55-
avr.compiler.elf2hex.flags=,-O,ihex,-R,.eeprom
54+
avr.compiler.objcopy.eep.flags=|-O|ihex|-j|.eeprom|--set-section-flags=.eeprom=alloc|load|--no-change-warnings|--change-section-lma|.eeprom=0
55+
avr.compiler.elf2hex.flags=|-O|ihex|-R|.eeprom
5656
avr.compiler.elf2hex.cmd=avr-objcopy
5757
avr.compiler.ldflags=
5858
avr.compiler.cpudef=-mmcu=

0 commit comments

Comments
 (0)