i work on both arduino and esp32. when I work on the esp32, i need a specific partition, so every time i switch back to esp32 i need to reconfigure the partition.
i'm wondering if there is a configuration file i could put in the same directory as the project that the IDE might read the configuration for that project from?
Which version of the Arduino IDE are you using? The previous Tools > Partition Scheme setting should be remembered already. It's stored in the custom_PartitionScheme of preferences.txt. This is global, rather than sketch-specific though.
Arduino IDE 2.0.0 does recognize the sketch.json, but it's not a great experience yet because the GUI itself doesn't know anything about this information, and thus can't set the board according to the metadata. It's simply that Arduino IDE 2.0.0 uses Arduino CLI to compile and upload, so if you don't select any board in the GUI then Arduino CLI uses the settings from sketch.json, just as it would if you ran it from the command line.
This is something that has been requested many times and you can see that Arduino is already making some efforts to support it.
gcjr:
i work on both arduino and esp32. when I work on the esp32, i need a specific partition, so every time i switch back to esp32 i need to reconfigure the partition.
I do not understand what you are wanting/needing. What do you mean by "arduino"?
"arduino" does not specify a processor, any processor can have an Arduino platform
and then you say you "I work on the esp32" but then you say " I switch back to the esp32".
And what do you mean by "partition"?
The combination of all this doesn't make sense to me.
I do Arduino library development on many different processors on more than half a dozen Arduino h/w platforms.
The only thing needed to swap between them is to set the Arduino board type in the IDE.
Can you describe further what you are doing or wanting to do?
pert:
Which version of the Arduino IDE are you using? The previous Tools > Partition Scheme setting should be remembered already. It's stored in the custom_PartitionScheme of preferences.txt. This is global, rather than sketch-specific though.
thanks
not sure it's applicable when I select an Arduino board, so it seems to get reset. So after using an Arduino and going back to esp32, i have to reconfigure the partition. i have memory problems with the standard partition
ok. sounds like it's a work in progress and the current answer is pretty much no. (i/m using arduino ide 1.8.13)
This is not the expected behavior. As I said, the Arduino IDE remembers your last selection and restores that when you select the board again. The only time you might find that it changes is if you're switching back and forth between two different platforms that use the same option menu ID, but with different option IDs. Unfortunately, the options aren't stored in separate name spaces for each boards platform. The menu ID is the root level key in preferences.txt.
I'm not aware of any other boards platforms that use a "PartitionScheme" menu ID, but it's certainly possible. So this is where knowing which other boards you're switching to might be useful. None of the official Arduino boards platforms use a menu ID named "PartitionScheme".
gcjr:
sounds like it's a work in progress and the current answer is pretty much no.
The answer is, with Arduino IDE 1.8.x, no to sketch-specific board settings but yes to global. With Arduino CLI, yes to sketch-specific settings.
gcjr:
when i select Tools->Board i get Arduino AVR Boards and ESP32 Arduino.
when i select ESP32 Arduino, i then need to select ESP32 Dev Module.
Under Tools is Partition Scheme when i select ESP32. it is not there when i select Aduino AVR Boards
It shouldn't be there. It is a esp32 specific board option.
Are you saying that when you go back to the esp32 board that previous option you selected has changed?
bperrybap:
It shouldn't be there. It is a esp32 specific board option.
Are you saying that when you go back to the esp32 board that previous option you selected has changed?
if i previously used the IDE for the esp32, close the IDE and reopen the IDE, i will see it configured for the esp32 with the partition i previously selected.
if i reconfigure the IDE for an arduino board and then later re-select the esp32 board, the partition is reset and i need to reconfigure it.
gcjr:
if i previously used the IDE for the esp32, close the IDE and reopen the IDE, i will see it configured for the esp32 with the partition i previously selected.
if i reconfigure the IDE for an arduino board and then later re-select the esp32 board, the partition is reset and i need to reconfigure it.
That is VERY different from what you said in #5.
In #5 you said you selected an AVR board and did not see the esp32 partition option.
Under Tools is Partition Scheme when i select ESP32. it is not there when i select Aduino AVR Boards
For that case that would be expected as there is partition option for AVR based arduino boards.
Now you are saying that a previously selected esp32 partition option is not restored after configuring the IDE for an "arduino board".
But an esp32 board is an arduino board, so it isn't clear what you mean by this.
There are literally hundreds of arduino boards.
I have to assume that you are selecting an arduino board that is not and esp32 board, perhaps an AVR board?
Again, clarifying what you are really doing would really help.
Tools > Partition Scheme - you will see that the menu selection has reverted to the default "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)" option.
I have chosen arbitrary board and option selections. The bug is not specific to the "ESP32 Dev Module", "Default 4MB with ffat (1.2MB APP/1.5MB FATFS)", and "Arduino Yun" selections. Any equivalent selections should give the same results.
When you say "Classic IDE" what you do mean by that?
The pre 2.0 IDE?
pert:
Here are the steps that can be used to reproduce the bug:
Yeah,kind of what I thought something like that was what was happening.
It just wasn't what the OP was saying in the posts.
For me with the 2.0.0 beta 3 on linux mint 20.1 mate, I get the same partition option if I
select a esp32 board
set the partition type
exit the IDE
start the IDE
then select the esp32 board type (which it didn't remember)
and then the previously select partition option is already selected.
The most annoying part of 2.0 is that it doesn't remember the previously open sketches or board type(s).
And each time you open a sketch, you have to set the board type.
For pre 2.0 the IDE remembers everything.
All the sketches I had open and the board type.
For 2.0, I wonder if some there are issues related to each Window now having its own configuration.
i.e. each window now has its own board type and options that must be set vs the in pre 2.0 a single board type setting applied to all open windows.
It is a bit of PITA, to have to set the board type each time I bring up the IDE or open an new example.
In my use case for testing my libaries, I much prefer a single global setting as it allows me to bring up a bunch of test sketches, change the board once than flip between each window to build and try it out.
Lots of little differences and oddities in this new IDE.
IMO, some of them are improvements, some are not, and some are a regression / loss of prior functionality.
bperrybap:
When you say "Classic IDE" what you do mean by that?
The pre 2.0 IDE?
Correct. It's not quite time to start calling the Java IDE the "old Arduino IDE" because Arduino IDE 2.x is still in the beta development phase.
bperrybap:
then select the esp32 board type (which it didn't remember)
This is unexpected. For me, on both Ubuntu and Windows 10, the previously selected board is remembered when the IDE starts. This used to be an issue with older versions of Arduino Pro IDE, but it was reported to be fixed:
(I didn't find the commit to reference)
bperrybap:
The most annoying part of 2.0 is that it doesn't remember the previously open sketches or board type(s).
And each time you open a sketch, you have to set the board type.
For pre 2.0 the IDE remembers everything.
All the sketches I had open and the board type.
As I said, for me and some others, it does remember the previous board on startup. However, it does not remember the previous board when you open a new window, either via File > New or opening a sketch. There is a bug report to track it here:
Opened by none other than the lead developer, so I think it's very much an annoyance for all involved. I'm hoping it will be fixed in an upcoming release.
bperrybap:
Lots of little differences and oddities in this new IDE.
IMO, some of them are improvements, some are not, and some are a regression / loss of prior functionality.
Nobody involved will claim that it's ready for a production release yet. I think it was ready enough to open it up for the entire community to get involved with the project, in the spirit of open source. I'm certain that some of the issue will be fixed in the near future. I'm also pretty sure that there will be some loss of feature parity with the classic Arduino IDE. I'm hoping that can be kept to the minimum and that the new improvements and more sustainable code base will more than balance them out.