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

Assigning a board to a sketch #3228

Closed
Avamander opened this issue May 25, 2015 · 7 comments
Closed

Assigning a board to a sketch #3228

Avamander opened this issue May 25, 2015 · 7 comments
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Milestone

Comments

@Avamander
Copy link
Contributor

Could someone please make it so that Arduino IDE automatically changes the board (and board model) based on the sketch that's opened.

Having three-four different boards + board models, it is kinda tedious to select the board every time I open the sketch so something like "//BOARD=mega" that is added to the sketch and IDE automatically changes the board type would be really nice.

@ffissore ffissore added feature request A request to make an enhancement (not a bug fix) Component: IDE user interface The Arduino IDE's user interface labels May 25, 2015
@dmjlambert
Copy link

I love this idea. During saving of the sketch, if the IDE remembered the board, processor, port, and any other boards.txt menu selections the user made on the Tools menu when working on the sketch, and then re-loaded those selections when opening the sketch, that would be fantastic. I imagine this may be a bit difficult to code since you can have multiple sketches open at one time. The code would have to take into consideration which window is in the foreground and active. Your idea of line in the sketch to indicate the board is kind of an IDE directive and interesting.

@Chris--A
Copy link
Contributor

This is a good idea, but shouldn't be limited to just the board/port/etc

I personally would like a platform.txt style approach for each sketch (optional file). Comments in the code can be removed by unknowing users.

Sometimes I want to test with C++11 instead of C++98 or use some of the many other compiler/linker options, which cannot be changed without hard restarting the IDE.

@ffissore
Copy link
Contributor

Duplicate of arduino/arduino-ide#2438. Wontfix. Arduino Create will provide a similar feature

@ffissore ffissore added the Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature label Sep 17, 2015
@ffissore ffissore added this to the Release 1.6.6 milestone Sep 17, 2015
@ffissore ffissore added the Type: Duplicate Another item already exists for this topic label Sep 17, 2015
@Avamander
Copy link
Contributor Author

Would it be possible that this would be reconsidered at least partially?

@romandubrov
Copy link

Bump!
I'd also like to have per-project settings in Arduino IDE because I'm completely tired with switching between my 4 boards. I like the online idea of Create but I need this feature locally because I store my projects and libs on Bitbucket.
If you guys feel uncomfortable with storing settings in project.ino file - may be you'll like an idea of having separate optional file like project.settings?

@JesseBusman
Copy link

To help anyone with this problem: If you start two arduino processes (by double-clicking your arduino icon twice) instead of two windows (by opening another file from an existing window) you can select different boards in the two different windows. (only if they run under separate procesess!)

It would still be awesome to not need this workaround and have the board selection saved in the .ino :)

@dsyleixa
Copy link

dsyleixa commented May 9, 2020

IMO the most simple way would be to hardcode-config the targeted board type by configuration in Sketch (e.g. #pragma config...) such as
#pragma config board="Nano"
#pragma config board="NODE_MCU 1.0"
#pragma config board="Adafruit Feather ESP32"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface feature request A request to make an enhancement (not a bug fix) Type: Duplicate Another item already exists for this topic Type: Wontfix Arduino has decided that it will not resolve the reported issue or implement the requested feature
Projects
None yet
Development

No branches or pull requests

7 participants