Skip to content

Support for Linkit SDK #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 23, 2014
Merged

Support for Linkit SDK #198

merged 4 commits into from
Nov 23, 2014

Conversation

henols
Copy link
Contributor

@henols henols commented Nov 23, 2014

Support for Linkit SDK from Mediatek

http://labs.mediatek.com/

@@ -640,6 +644,8 @@ private static void setTheEnvironmentVariablesAddthePlatformTxt(IContributedEnvi
if (Var.length == 2) {
String Value = MakeEnvironmentString(Var[1].replace("\"{build.path}/syscalls_sam3.c.o\"",
"\"{build.path}/arduino/syscalls_sam3.c.o\""));
Value = MakeEnvironmentString(Var[1].replace("\"{build.path}/syscalls_mtk.c.o\"",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a concern to me as it overwrites the value of Value and as such due will no longer work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't really like it either it's not looking very nice, but it will work.
I can add a test before trying to replace it with a test before replaceing.

Henrik

Work greener, don't print unless you need to!

On Nov 23, 2014 2:02 PM, "jantje" [email protected] wrote:

In
it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java:

@@ -640,6 +644,8 @@ private static void setTheEnvironmentVariablesAddthePlatformTxt(IContributedEnvi
if (Var.length == 2) {
String Value = MakeEnvironmentString(Var[1].replace(""{build.path}/syscalls_sam3.c.o"",
""{build.path}/arduino/syscalls_sam3.c.o""));

  •       Value = MakeEnvironmentString(Var[1].replace("\"{build.path}/syscalls_mtk.c.o\"",
    

This is a concern to me as it overwrites the value of Value and as such
due will no longer work.


Reply to this email directly or view it on GitHub
https://github.com/jantje/arduino-eclipse-plugin/pull/198/files#r20764224
.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original replace is only needed for the due. As the original replace is no longer in the environment variable I can't understand how due would still work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's matching on different things syscalls_sam3 and
syscalls_mtk and therefore it will not conflict. But if I add an if
statement it will look more clear.

Work greener, don't print unless you need to!

On Nov 23, 2014 3:14 PM, "jantje" [email protected] wrote:

In
it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java:

@@ -640,6 +644,8 @@ private static void setTheEnvironmentVariablesAddthePlatformTxt(IContributedEnvi
if (Var.length == 2) {
String Value = MakeEnvironmentString(Var[1].replace(""{build.path}/syscalls_sam3.c.o"",
""{build.path}/arduino/syscalls_sam3.c.o""));

  •       Value = MakeEnvironmentString(Var[1].replace("\"{build.path}/syscalls_mtk.c.o\"",
    

The original replace is only needed for the due. As the original replace
is no longer in the environment variable I can't understand how due would
still work.


Reply to this email directly or view it on GitHub
https://github.com/jantje/arduino-eclipse-plugin/pull/198/files#r20764675
.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my concern is about
Value = A_function(Var[1]);
Value = Another_function(Var[1]);
Making the first line redundant.
I think replacing your new line with
Value = MakeEnvironmentString(Value.replace(""{build.path}/syscalls_mtk.c.o"",.....
will do the trick

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh sorry I didn't see that I will fix it asp.

Work greener, don't print unless you need to!

On Nov 23, 2014 3:34 PM, "jantje" [email protected] wrote:

In
it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java:

@@ -640,6 +644,8 @@ private static void setTheEnvironmentVariablesAddthePlatformTxt(IContributedEnvi
if (Var.length == 2) {
String Value = MakeEnvironmentString(Var[1].replace(""{build.path}/syscalls_sam3.c.o"",
""{build.path}/arduino/syscalls_sam3.c.o""));

  •       Value = MakeEnvironmentString(Var[1].replace("\"{build.path}/syscalls_mtk.c.o\"",
    

my concern is about
Value = A_function(Var[1]);
Value = Another_function(Var[1]);
Making the first line redundant.
I think replacing your new line with
Value =
MakeEnvironmentString(Value.replace(""{build.path}/syscalls_mtk.c.o"",.....
will do the trick


Reply to this email directly or view it on GitHub
https://github.com/jantje/arduino-eclipse-plugin/pull/198/files#r20764846
.

Addes if statments tom make it look abit more readeble.
@henols
Copy link
Contributor Author

henols commented Nov 23, 2014

There are some new new code in there now, have a look.

jantje added a commit that referenced this pull request Nov 23, 2014
@jantje jantje merged commit aa1ad5b into Sloeber:master Nov 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants