Skip to content
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

per-board generic option in config file boards.txt for disabling control of dtr+rts ... #4102

Merged
merged 1 commit into from
Jul 18, 2017

Conversation

d-a-v
Copy link
Contributor

@d-a-v d-a-v commented Nov 6, 2015

...from IDE, allowing board specific use of these lines for example for reset or programming mode. Currently used by esp8266/Arduino.

credits go to esp8266/Arduino#22 and esp8266/Arduino@0dabb25 from where this patch originates.

…rol of dtr+rts from IDE, allowing board specific use of these lines for example for reset or programming mode. Currently used by esp8266/Arduino.
@ozayturay
Copy link

This patch is really needed for some boards, especially ESP8266.

@NicoHood
Copy link
Contributor

NicoHood commented Nov 7, 2015

Is this somehow related?
#3386

@d-a-v
Copy link
Contributor Author

d-a-v commented Nov 7, 2015

It seems that #3386 relies on the general preference file. This leaves the configuration of the ports to the user.
On the other hand, this #4102 pull-request configures dtr+rts in a per-board basis in the board configuration file (generally not supposed to be read/modified by the user).
Thus the user needs not know what is happening, it will just work if the correct board / model is selected.

@igrr
Copy link

igrr commented Nov 11, 2015

Would be really useful for the esp8266 core.

@ffissore ffissore self-assigned this Nov 12, 2015
@tablatronix
Copy link

👍

@probonopd
Copy link
Contributor

👍

1 similar comment
@MrMartin92
Copy link

👍

@bjpirt
Copy link

bjpirt commented Jan 13, 2016

It would be great if this could make its way in to the core as it's really useful for the increasingly popular ESP8266 platform. Is there any reason why it isn't being merged in? It's backwards compatible and just adds an extra config option for boards.txt which makes it more flexible

@lmihalkovic
Copy link

IMHO this is a narrow path to go down... instead of hardcoding overrides one at a time, there should a convention that boards can override ANY pre-existing property by following a naming pattern. E.g. Anything like

override.xxxx.yyyy.zzzz=abc

could be applied blindly in the config to replace xxx.yyyy.zzzz=abc. The point is that it is voluntary (presence of a prefix does not happen by accident) and generic (core ide does not need to be modified anytime a board needs something). The presence of a known prefix offers the additional benefit of being able to show something in the ide (i am working on some ide support for config settings in my fork and the core ide might want to do the same)

@d-a-v
Copy link
Contributor Author

d-a-v commented Jan 13, 2016

Do these settings (serial.disable.RTS, serial.disableDTR) exist elsewhere in the IDE configuration so they could be overridden with such a facility you describe ?

@lmihalkovic
Copy link

Sorry for my lack of clarity, the override part is related to the couple of lines in the patch that make direct reference to the values comming from bord pref. What i was offering for consideration is that the usage of these values should be done without direct reference to where they come from, but instead after a general merge overrides step.
The heuristic would be

values = PrefDta.values()
values.merge(board.getValues("override")  // THIS IS WHERE override.xxxxxx get read and plastered-on
values.merge("override", board.getPrefs()) // is probably a better alternative

// and then where needed
Bool whatEver=VALUES.getBoolean("serial.disableDTS")  // no longer a direct ref to PrefData

This ensures that THE prefdata does not get contaminated by the boards, and give a chance to all boards to modify anything they want. VALUES get recomputed on each board switching in the ide.

An alternate design (making things transparent to existing code that directly references PrefData - probably what I will do) is to modify PrefData such that it contains 2 stores (basically local and parent, where parent can be another instance, allowing the scheme to be made cleanly tiered). I did exactly that already for the themes to support DARK with minimum extra work.

@bjpirt
Copy link

bjpirt commented Jan 15, 2016

@lmihalkovic The method you propose sounds nice and flexible and would let extension authors customise things without breaking things for the users.

Can anyone on the Arduino team weigh in with their thoughts on this issue - it would be great to get some kind of solution for the ever-growing number of ESP8266/Arduino users out there!

@lmihalkovic
Copy link

I will be using something along those lines to replace the internals of PreferencesData/PreferencesMap. The idea is to be able to maintain a n-level (likely: defaults/board/variant with the ability to insert new ones) hierarchy without having to spread that knowledge around.

@matthijskooijman
Copy link
Collaborator

I have been pondering a similar scheme as proposed by @lmihalkovic a while ago - the current preferences, board properties and platform properties handling is a bit of a mess which would do well to be cleaned up. I created #4431 for this, so we can keep this issue about specifally adding support for DTR/RTS.

@PetrH
Copy link

PetrH commented Apr 19, 2016

It's any progress here? I can see that ESP Core implemented this option to board.txt. But still without support from side of IDE is quite useless...

@tablatronix
Copy link

I was just about to ask the same.

@ozayturay
Copy link

Still open so i guess no. :(

@ghost
Copy link

ghost commented Aug 25, 2016

Any progress on this at all, where's it stuck at?

@uSlammer
Copy link

Great patch! Really needed.

@facchinm facchinm added the feature request A request to make an enhancement (not a bug fix) label Apr 18, 2017
@facchinm facchinm added this to the Release 1.8.3 milestone Apr 18, 2017
@cmaglie cmaglie modified the milestones: Release 1.8.3, Next Jul 18, 2017
@cmaglie cmaglie merged commit 125846f into arduino:master Jul 18, 2017
@cmaglie cmaglie modified the milestones: Release 1.8.4, Next Jul 18, 2017
@cmaglie
Copy link
Member

cmaglie commented Jul 18, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

Successfully merging this pull request may close these issues.