Skip to content

Commit 941ffff

Browse files
author
jantje
committed
#1267 starting testing boards
I put all txt processing in a seperate package I put vars in a key value list and add the key value list then to the build environment variables This is prep work for making a variable provider Cleaned up lots of redundant code Moved more "workarounds" to the workaround class so sloeber.txt files are nearly 100% ready to be simply read and ready
1 parent ee0383b commit 941ffff

27 files changed

+1833
-1711
lines changed

io.sloeber.core/META-INF/MANIFEST.MF

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ Export-Package: cc.arduino.packages;x-internal:=true,
4242
io.sloeber.core.templates;x-internal:=true,
4343
io.sloeber.core.toolchain;x-internal:=true,
4444
io.sloeber.core.tools;x-friends:="io.sloeber.tests",
45-
io.sloeber.core.tools.uploaders;x-internal:=true
45+
io.sloeber.core.tools.uploaders;x-internal:=true,
46+
io.sloeber.core.txt;x-friends:="io.sloeber.tests"
4647
Automatic-Module-Name: io.sloeber.core

io.sloeber.core/config/pre_processing_platform_default.txt

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#this file is processed without the adding of A to enable referencing non arduino set variables
22
A.software=ARDUINO
3-
A.recipe.objcopy.hex.pattern={A.recipe.objcopy.bin.pattern}
3+
A.recipe.objcopy.hex.pattern=${A.recipe.objcopy.bin.pattern}
44
A.archive_file=arduino.ar
5-
A.archive_file_path={A.build.path}/{A.archive_file}
6-
JANTJE.alt_size_command="{A.compiler.path}{A.compiler.size.cmd}" --format=avr --mcu={A.build.mcu} "{A.build.path}/{A.build.project_name}.elf"
5+
A.archive_file_path=${A.build.path}/${A.archive_file}
6+
JANTJE.alt_size_command="${A.compiler.path}${A.compiler.size.cmd}" --format=avr --mcu=${A.build.mcu} "${A.build.path}/${A.build.project_name}.elf"
77
A.runtime.ide.version=10812
8-
A.build.system.path={A.referenced.core.path}{DirectoryDelimiter}system
9-
A.serial.port={JANTJE.com_port}
10-
A.build.project_name={ProjName}
11-
A.packages={eclipse_home}{DirectoryDelimiter}arduinoPlugin{DirectoryDelimiter}packages
8+
A.build.system.path=${A.referenced.core.path}${DirectoryDelimiter}system
9+
A.serial.port=${JANTJE.com_port}
10+
A.build.project_name=${ProjName}
11+
A.packages=${eclipse_home}${DirectoryDelimiter}arduinoPlugin${DirectoryDelimiter}packages
12+
A.build.path=${ProjDirPath}${DirectoryDelimiter}${ConfigName}
1213

1314

1415

@@ -18,16 +19,16 @@ A.upload.protocol=stk500v1
1819

1920

2021
#for esp8266 network upload
21-
A.tools.esp8266OTA={A.tools.esptool.network_cmd}
22-
A.tools.esp8266OTA.upload.pattern={A.tools.esptool.upload.network_pattern}
22+
A.tools.esp8266OTA=${A.tools.esptool.network_cmd}
23+
A.tools.esp8266OTA.upload.pattern=${A.tools.esptool.upload.network_pattern}
2324
A.esp8266.network.upload.tool=esp8266OTA
24-
A.tools.esptool.network.PASSWORD={A.network.auth}
25+
A.tools.esptool.network.PASSWORD=${A.network.auth}
2526

2627
#for yun shield to work
2728
A.tools.avrdude_remote.upload.verbose=-v
2829

2930
#for due
30-
A.serial.port.file={A.serial.port}
31+
A.serial.port.file=${A.serial.port}
3132

3233
#to turn warnings on/off
3334
A.compiler.warning_flags=-w

io.sloeber.core/src/io/sloeber/core/Activator.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void start(BundleContext context) throws Exception {
7979

8080
// add required properties for Arduino serial port on linux, if not
8181
// defined
82-
if (Const.isLinux && System.getProperty(ENV_KEY_GNU_SERIAL_PORTS) == null) {
82+
if (Common.isLinux && System.getProperty(ENV_KEY_GNU_SERIAL_PORTS) == null) {
8383
System.setProperty(ENV_KEY_GNU_SERIAL_PORTS, ENV_VALUE_GNU_SERIAL_PORTS_LINUX);
8484
}
8585

@@ -170,7 +170,7 @@ private static void testKnownIssues() {
170170
*/
171171
private static boolean isInstallPathToLong() {
172172
IPath installPath = ConfigurationPreferences.getInstallationPath();
173-
if (Const.isWindows) {
173+
if (Common.isWindows) {
174174
return installPath.toString().length() > 40;
175175
}
176176
return false;
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package io.sloeber.core;
22

3+
34
import java.io.File;
45
import java.util.Map;
56

67
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
78

89
import io.sloeber.core.api.BoardDescriptor;
9-
import io.sloeber.core.tools.TxtFile;
10+
import io.sloeber.core.txt.BoardTxtFile;
1011

1112
/**
1213
* This class exists solely for the purpose of having access to the
@@ -16,20 +17,18 @@
1617
*
1718
*/
1819
public class InternalBoardDescriptor extends BoardDescriptor {
19-
private ICConfigurationDescription mConfdesc = null;
20+
2021

2122
public InternalBoardDescriptor(ICConfigurationDescription confdesc) {
2223
super(confdesc);
23-
this.mConfdesc = confdesc;
24-
2524
}
2625

2726
public InternalBoardDescriptor(File boardsFile, String boardID, Map<String, String> options) {
2827
super(boardsFile, boardID, options);
2928

3029
}
3130

32-
public InternalBoardDescriptor(TxtFile txtFile, String boardID) {
31+
public InternalBoardDescriptor(BoardTxtFile txtFile, String boardID) {
3332
super(txtFile, boardID);
3433

3534
}
@@ -38,13 +37,8 @@ public InternalBoardDescriptor(BoardDescriptor sourceBoardDescriptor) {
3837
super(sourceBoardDescriptor);
3938
}
4039

41-
public TxtFile getTxtFile() {
40+
public BoardTxtFile getTxtFile() {
4241
return this.myTxtFile;
4342
}
4443

45-
@Override
46-
public void saveConfiguration() {
47-
saveConfiguration(this.mConfdesc, null);
48-
}
49-
5044
}

0 commit comments

Comments
 (0)