Skip to content

Conversation

@achimmihca
Copy link

Hello,
I want to use the Arduino plugin together with some other tools, in which I chain launch configurations (more specifically I want to perform a launch shortcut on an ino file as part of another launch).

Therefore I added a launch configuration, launch configuration tab group and launch shortcut (for .ino files) to your project. The changes I made do not affect other parts of the plugin. It provides an alternative for the user to launch a project. To use the changes I made, one has to change the Arduino perspective so that the "Run as" and "Debug as" buttons become visible.

The launch configuration that I implemented only references the project that shall be launched and delegates the launch to your implementation.

At the moment, the Arduino plugin has a toolbar button to launch the selected project, which works great. However, launch configurations are the way how Eclipse intended to run a project. Furthermore an Arduino launch configuration can also be part of launch groups, which are available as part of the CDT. This is a way to chain launches.

In future work, the launch configuration may be extended to configure the Arduino board and port. This would be useful if someone wants to deviate from the settings in the project properties.
I did not take a look at the current implementation, but it might make sense to connect the serial monitor and stuff with a launch as well. This way one could have multiple Arduino projects launched at the same time and switch the monitor between these.

Regards

Andreas Stange

Andreas Stange added 2 commits February 19, 2016 11:13
@jantje
Copy link
Member

jantje commented Feb 19, 2016

I will merge this pull request but I'm going to wait until after I released V3.
I understand that this brings additional ease for you but does it also bring something to the "normal" eclipse users?
I ask because I know launch configurations in eclipse and I use them for debugging the plugin (and Arduino sketches) but I do not really see a benefit for "normal" use nor do I see what you have added next to what there is by default.

I assume that what you call launch is what is called "upload" in arduino world. With that in mind your last paragraph is very confusing to me:

In future work, the launch configuration may be extended to configure the Arduino board and port. This would be useful if someone wants to deviate from the settings in the project properties.

A different arduino board may mean a different toolchain/core/library/define.So deviating from the project properties at that level makes no sense to me. Moreover the plugin supports multiple configurations, so if I would want this I would have multiple configs and select the proper config.
The com port is a different thing though.

I did not take a look at the current implementation, but it might make sense to connect the serial monitor and stuff with a launch as well. This way one could have multiple Arduino projects launched at the same time and switch the monitor between these.

You can instantiate the serial monitor only once. The serial monitor supports up to 6 (if I remember correctly) serial connections at the same time. Each connection has its own color that can be changes in the preferences (standard eclipse way) The benefit for this is: when debugging communication between boards you get (kind of like) a time view between the boards.
Switching between serial monitors makes no sense to me.
You probably don't know but:

  1. if you select multiple projects and press the upload button. all projects will be uploaded to their respective boards. If you have build before upload active the projects will be build before upload.
  2. in V3 (that is currently the nightly) when you have multiple projects selected and press the open serial monitor button; a attempt will be made to connect to the serial port based on the port in the Arduino properties and the baud rate in the source code.

After having been thinking and writing my current thinking is as follows:
The baud rate and the serial port should be (in the eclipse view) part of the launch configuration. Having the project rebuild due to a com port change is a long lasting complaint which is a consequence of this "misfit".
From this point of view the baud rate (for the serial connection) and the port name should be part of the launch configuration. However:
The baud rate is extracted from the source code (which I majorly prefer).
There is a n (launch configuration) to 1 (project) relationship which (in theory) is correct but in most cases end users only have a 1 to 1 relationship.

To take it even further. If the plugin could recognize the board that is connected to a com port there is no need to configure the com port -if only one board of each type is connected-.

Again: I'm going to accept your pull request after V3 release.
I use launch configurations when debugging arduino code.
But right now ; I'm not seeing the benefit of what you are doing/planning.
So it might be a good idea to hold your horses. If you can't I'll create a branch :-)

@achimmihca
Copy link
Author

I understand that this brings additional ease for you but does it also bring something to the "normal" eclipse users?

After reading your comment I have to say: No it does not bring additional easy for most users. Only if they are used to do "Right Click > Run as > Java Application" they may find it more familiar.

However, I need it because the other plugins I use work with launch configurations / launch shortcuts.

I will merge this pull request but I'm going to wait until after I released V3.

Fair enough. Thanks

@jantje
Copy link
Member

jantje commented Feb 20, 2016

Txs for the feedback.
FYI I hope to release V3 this month.
Jantje

@jantje
Copy link
Member

jantje commented Feb 29, 2016

FYI the release of V3 is waiting for #321 which we are looking for the root cause.
Maybe your light can speed up things?

@jantje
Copy link
Member

jantje commented Apr 1, 2016

@wimjongman
There is a merge conflict and I think it is only in core/manifest but I fail to fix this.
Can you have a look?

Conflicts:
	it.baeyens.arduino.core/META-INF/MANIFEST.MF
@achimmihca
Copy link
Author

Hello and congrats on the release! Must have been a lot of work. Thank you very much :).

I added two dependencies to the MANIFEST file: org.apache.commons.lang, org.eclipse.debug.ui
Seems like this created a merge conflict. To solve the conflict, I did the following:

  1. Keep your version of the MANIFEST file (from upstream/master).
  2. Add aforesaid dependencies under Require-Bundle in the MANIFEST.

Afterwards I did not have any errors. Yay^^

@jantje jantje merged commit 0595866 into Sloeber:master Apr 1, 2016
@jantje
Copy link
Member

jantje commented Apr 1, 2016

txs. The merge works now.
Yes the release turned out to take longer then expected. But when I made my video on how to upgrade the workspaces I was surprised on how much smoother V3 works compared to V2.4. So I (and I'm sure I can say we) are very proud with our toddler

Bye the way. For ESP there is a change when opening the com port (related to DTR pin) which should conceptually be handled by the launch handler. So this may get some better integration some day.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants