Arduino IDE 2.x in a classroom setting: No compile cache for students

We use Arduino IDE 2.1.1 in a classroom setting on Windows 10 machines. Both lecturers and students have Active Directory accounts on these PCs.

When I log in with my lecturer account and compile a sketch, the core libraries and all unchanged libraries get compiled once, after that, only the sketch itself is compiled, just like it should be.

If a student uses the Arduino IDE, all libraries get compiled all the time, resulting in terrible turn-over times.

I looked at all the settings I could find, but to no avail. I guess it is a user rights problem. In order to track this down: Where should I look for the cache files? And is it possible to change the path of these files to a local folder, for example?

I'm not a windows user but one thing I would check is if the IDE and tools are installed locally on each machine or if you have a shared volume mounted on each PC. access rights might then be an issue ?

IDE and tools are installed locally using a local admin account. The user folder is mounted, for students and lecturers.

and students don't have admin rights whereas the lecturers do? (or some elevated rights at least)

1 Like

Exactly.

There are discussions about a portable version of the 2.x IDE

See Arduino IDE 2.0 Portable - #7 by ptillisch for example

And tracked here

I guess this is related. Have you tried with the latest IDE 1.x?

I tried the latest IDE 1.8.19, similar behaviour.

During compile, I can see that the binaries for libraries should go to a path like
-o "C:\\Users\\xxxxxx\\AppData\\Local\\Temp\\arduino_build_830282\\libraries\\ArduinoBLE\\BLEAdvertisingData.cpp.o" (This is for the ArduinoBLE library, just an example).

After compile, I can see the libraries there. With IDE 1.x, core, scheduler and wire do not get recompiled, but Arduino_LSM9DS1, ArduinoBLE and NanoBLEFlashPrefs do. Same for IDE 2.1.2-nightly-20230824, just a different path.

OK... seems to be a question for Arduino may be add impact on gitHub or raise a support request ?

Hi @DirkF. As you noticed, the compile cache is stored under the system temporary folder (even when using Arduino IDE 1.x in "portable" mode). That is is a per-user folder, so it is expected that there will not be a cache the first time each user makes a compilation (unless the system administrator prepared one for each user account in advance). However, the behavior you describe is unexpected:

I'm going to ask you to post the full verbose output from a compilation where this unexpected full recompilation occurred.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to finish.
  6. Select Sketch > Verify/Compile from the Arduino IDE menus.
    :exclamation: Yes, I'm intentionally asking you to perform two compilations. The reason is to ensure that a compile cache would have been in place if everything was working as expected.
  7. Wait for the compilation to finish.
  8. Right click on the black "Output" panel at the bottom of the Arduino IDE window.
  9. From the context menu, click Copy All.
  10. Open a forum reply here by clicking the Reply button.
  11. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  12. Press Ctrl+V.
    This will paste the compilation output into the code block.
  13. Move the cursor outside of the code tags before you add any additional text to your reply.
  14. Click the Reply button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (image) on the post composer toolbar:

    A dialog will open.
  6. In the dialog, select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

The path is relative to the system temporary folder location returned by the operating system, so you would need to configure the operating system to use a different system temporary folder location to do this.

Here is the output of IDE 2.1.2-nightly-20230824, as requested:
ArduinoLog.txt (146.2 KB)

I hope this helps and I'll be glad to answer any further questions.

Thanks for your support!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.