Programmers.txt location on Ubuntu/Snap

Hi All,
can anybody tell me where to put programmers.txt in Arduino installed on Ubuntu with snap? I was trying several paths with no success.

Hi @modrzywolski. The first thing you need to understand is that there isn’t just a single programmers.txt. Each boards platform has its own programmers.txt, and the programmers defined in that programmers.txt are only accessible when you have a board of that platform selected from the IDE’s Tools > Board menu.

Here’s how you can find the location for the board you currently have selected:

  1. Select File > Preferences from the Arduino IDE’s menus.
  2. Check the box next to “Show verbose output during: > compilation”.
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE’s menus. It doesn’t matter which sketch you compile
  5. After the compilation finishes, scroll the black console pane at the bottom of the Arduino IDE window all the way up. In the output, you’ll see something like this:
    Using core 'arduino' from platform in folder: /home/<user name> .arduino15/packages/arduino/hardware/avr/1.8.3

The path shown in that line of the output is where the programmers.txt file that affects the board you had selected is located.

I’m getting something like that:

/snap/arduino/56/arduino-builder -compile -logger=machine -hardware /snap/arduino/56/hardware -hardware /home/emk/snap/arduino/56/.arduino15/packages -tools /snap/arduino/56/tools-builder -tools /snap/arduino/56/hardware/tools/avr -tools /home/emk/snap/arduino/56/.arduino15/packages ...
/snap/arduino/56/hardware/tools/avr/bin/avr-g++ ... -I/snap/arduino/56/hardware/arduino/avr/cores/arduino ...

I suspect it expects the file somewhere down under:
but I do not know where exactly.

Is there no “Using core x from platform in folder: …” line in the compilation output?

That’s probably correct, but it could also be at /snap/arduino/56/hardware/arduino/avr depending on which board you have selected. The Arduino IDE (though possibly not the Snap version, I don’t know) comes with a preinstalled copy of the “Arduino AVR Boards” platform of the Uno, Mega, Leonardo, etc. When you install other boards or update Arduino AVR Boards via Tools > Board > Boards Manager, the are installed under this ... .arduino15/packages folder.

yes I have it:

Using core 'arduino' from platform in folder: /snap/arduino/56/hardware/arduino/avr


/snap/ is read-only filesystem, it is a mounted snap image, it cannot be edited.

original file is at:


In this case, I think you have two options:

  • Use the normal version of the Arduino IDE, downloaded from here:
  • Manually install the boards platform you want to modify under the hardware subfolder of your sketchbook folder (see File > Preferences > Sketchbook location in the Arduino IDE).

You can learn about the platform folder structure here:
You also might find the platform referencing feature very useful to allow you to create a very minimal custom platform by referencing all the standard components from the existing platforms:

You also might benefit from describing what you are hoping to accomplish. It might be that we can give you more specific advice then.

I want to connect AVR Dragon programmer.

You might like this project I did:

Unfortunately, the technique I used to allow installing programmers via Boards Manager was broken in the Arduino IDE 1.8.13 release, and will never be available again. So you can only do that installation method with Arduino IDE 1.8.12 and older. I don’t know if that version is available from Snap or not.

Thanks for your input, I installed it manually as you advised and I’m now able to add AVR Dragon to programmers.txt.

I appreciate your help, cheers.

You’re welcome. I’m glad to hear it’s working now. Enjoy!

For a reference to others:
AVR Dragon also works. I manually installed files delivered in InoAVRDragon. I also had to grant user permissions to usb device:

cat /etc/udev/rules.d/46-avr.rules

# udev rules file for ATMEL AVR isp
ACTION!="add|change", GOTO="avrisp_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="avrisp_rules_end"

# AVR Dragon v1
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2104", MODE="0660", GROUP="plugdev"
# AVR Dragon v2 (the one without shitty voltage regulators)
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0660", GROUP="plugdev"


sudo udevadm control --reload-rules

works like a charm.

1 Like

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