Skip to content

Specify target board / settings in .ino code / comments. #5308

Closed
@JamesNewton

Description

@JamesNewton

As the IDE is used for more and more boards / devices, it becomes increasingly confusing for new users to select the correct device in the Tools / Boards menu... and increasingly annoying for me to have to reset it all the time as I bounce from one project to another. Personally, this is really bad when working on ESP-8266 projects as there are soooo many settings under tools.

It would be really nice to have some way to include that information IN the source code... in the main .ino file. Just open the .ino, and the IDE automatically selects the correct device, port, programmer, CPU speed, etc...

One way of doing it would be with simple comments in a specific format at the start of the file which would trigger an "offer" from the ide to copy those settings. This would allow the settings to double as documentation, and preserve the standard C/C++ functionality. e.g. it wouldn't make the file unique to this IDE.

for example:

// Tools / Board: Generic ESP8266 Module
// Tools / CPU Frequency: 160 MHz
// Tools / Port: COM32

etc...

Which should result in a dialog that offers to set those settings. You can always cancel it... If you approve, it should set the board FIRST, then set the next line, then the next, and so on. If the board isn't available, the IDE can direct you to the board library manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DuplicateAnother item already exists for this topicfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions