Skip to content

Way to open existing Arduino project without creating sample file #1228

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

Closed
robamu opened this issue Oct 13, 2020 · 15 comments · Fixed by #1229
Closed

Way to open existing Arduino project without creating sample file #1228

robamu opened this issue Oct 13, 2020 · 15 comments · Fixed by #1229

Comments

@robamu
Copy link
Contributor

robamu commented Oct 13, 2020

Hi,

Thanks for creating this great plugin. I have a small improvement suggestion.
Maybe I did not see the option, but is there a way to open an "exisiting" project and ommit the generation of sample files?
I had an existing project inside a folder, I created a project inside that folder. Then I deleted the sample files (a .cpp file with setup, loop was already existing) and everything worked just fine. I think it would be nice if there is an option to just not add any sample files. What do you think about this?

Also, another small question: What is the purpose of the sloeber.ino.cpp file created? It seems to mimic the primary .ino file a little bit and when I deleted it, the code still compiled without issues.

Kind Regards
Robin

@jantje
Copy link
Member

jantje commented Oct 13, 2020

If the sketch name is the [foldername.ino] and you select default ino project no files should be created.

@robamu
Copy link
Contributor Author

robamu commented Oct 13, 2020

Ah okay, thanks for the tip.
I think an explicit option still would be nice.

@jantje
Copy link
Member

jantje commented Oct 14, 2020

Feel free to implement one.

@robamu
Copy link
Contributor Author

robamu commented Oct 14, 2020

Got following error when trying to build the SDK on Windows 10. Do you have an idea what might cause this?

C:\Users\Robin\NoSyncDokumente\arduino-eclipse-plugin>mvn clean verify -PSDK,latest -DskipTests=true
[INFO] Scanning for projects...
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[WARNING] No explicit target runtime environment configuration. Build is platform dependent.
[ERROR] Internal error: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-12' -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-12'
...

Maybe I will have more luck on Ubuntu.
Running mvn clean verify -Pwin64 -DskipTests=true worked so maybe it's some OS problem..

@jantje
Copy link
Member

jantje commented Oct 14, 2020

It looks like it tries to build with java 12 and it doesn't find one
Note that I havn't build the sdk the last couple of months so it may have been an issue before you applied changes

@jantje
Copy link
Member

jantje commented Oct 14, 2020

FYI the SDK is to build a development environment for sloeber
Sloeber is the development environment for arduino boards

@jantje
Copy link
Member

jantje commented Oct 14, 2020

SDk builds fine here. Did you use maven 3.6.3?

@robamu
Copy link
Contributor Author

robamu commented Oct 14, 2020

Yes, I installed the newest version 3.6.3. I also installed the newest Java SE Devleopment Kit now.

If I understand correctly (please correct me if I am wrong :-) ) , I can test my code by following the steps in the README in the section Developing (Improving) the Plugin, which include building the SDK.

@jantje
Copy link
Member

jantje commented Oct 14, 2020

I have looked at the changes you have and I don't see any relation to sloeber sdk so I don't think the fact that the sdk build fails on your system is relevant.

@jantje
Copy link
Member

jantje commented Nov 21, 2020

@rmspacefish are you still working on this?

@robamu
Copy link
Contributor Author

robamu commented Nov 22, 2020

Hi, I haven't had a chance to look at it again. Can you give a hint on how to "load" the changes after making them?

Kind Regards
Robin

@jantje
Copy link
Member

jantje commented Nov 22, 2020

Can you give a hint on how to "load" the changes after making them?

I'm not sure what you mean here. I assume you want to debug them or get them in some production environment.
Debug->simply debug the product in your eclipse environment where you made the changes
spread out 1->do the maven build (as described here https://github.com/Sloeber/arduino-eclipse-plugin) and put the update site on a server (This will cause conflicts conflict with the sloeber update site so this is not a sustainable solution)
spread out 2-> Do the maven build and spread the product

@robamu
Copy link
Contributor Author

robamu commented Nov 22, 2020

I would like to test whether the new feature (was quite small after all) works. So instead of the default installed Sloeber Plugin, I would just like to use the version of the plugin with my changes. Can this be done by debugging it?

@jantje
Copy link
Member

jantje commented Nov 22, 2020

Can this be done by debugging it?

yes off course. That is what debugging is for. You can even step through the code to validate that things do what you intended them to do.

@robamu
Copy link
Contributor Author

robamu commented Nov 22, 2020

Alright, I will try to test it today or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants