Home Getting Started Download Discussions Source Report An Issue

Enabling "AVR/EDBG mode" on the MPLAB Snap & PICkit 4 on GNU/Linux

The MPLAB Snap and PICkit 4 are hybrid devices - that is, they can present themselves as two different USB devices, depending on the configured firmware mode. When configured, these devices can present themselves as EDBG (Embedded Debugger) devices. They are known to be in "AVR mode" when configured in this way.

When in AVR mode, both devices will use different USB vendor and product IDs.

Firmware mode Device USB vendor ID USB product ID
EDBG (AVR) Mode MPLAB Snap 1003 (0x03eb) 8576 (0x2180)
MPLAB PICkit 4 1003 (0x03eb) 8567 (0x2177)
Non-EDBG Mode MPLAB Snap 1240 (0x04d8) 36888 (0x9018), or 36887 (0x9017)
MPLAB PICkit 4 1240 (0x04d8) 36882 (0x9012)

Both devices can be configured to operate in one of these two firmware modes, via Microchip software (MPLAB IDE and IPE).

In order to use the MPLAB Snap or PICkit 4 to program and debug AVR microcontrollers, AVR mode must be enabled.

The configured firmware mode is persisted through power cycles. Users are not required to enable AVR mode before each instance of use - enabling it on a single occasion should suffice.

Bloom will fail to recognise the device until AVR mode has been enabled.


Confirm the device is not already in AVR/EDBG mode

The differing USB vendor IDs can be used to determine the device's current mode of operation. When the device is in AVR mode, it uses vendor ID 0x03eb.

Upon connecting the device via USB, run the following command to identify all Microchip and Atmel devices:

$ lsusb | grep -e "Atmel" -e "Microchip";

The command above will output information on all Microchip and Atmel devices currently connected to the system. This will include their vendor and product IDs.

If the device is in AVR mode, the output of the command should include the 0x03eb vendor ID:

Bus XXX Device XXX: ID 03eb:XXXX Atmel Corp. ...

If the device is not in AVR mode, the output of the command should include the 0x04d8 vendor ID:

Bus XXX Device XXX: ID 04d8:XXXX Microchip Technology, Inc. ...

If the output of the command is empty, examine the device's USB connection and check for enumeration issues.

Installing MPLAB IPE

Since MPLAB IPE 6.10, this method of activating EDBG/AVR mode no longer works. At this point, your only option is to use an older version of MPLAB IPE (6.05 or older).

The installer for version 6.05 is available here. Other versions can be found in the MPLAB X IDE Archives page.

Bloom cannot enable AVR mode on the device - it must be done via Microchip's MPLAB IPE software. This can be installed via the MPLAB IDE installer. Download the installer from the Microchip website, select the MPLAB IPE option and proceed with the installation.

Selecting MPLAB IPE within MPLAB IDE installer

Enabling AVR mode via MPLAB IPE

Since MPLAB IPE 6.10, this method of activating EDBG/AVR mode no longer works. At this point, your only option is to use an older version of MPLAB IPE (6.05 or older).

The installer for version 6.05 is available here. Other versions can be found in the MPLAB X IDE Archives page.

MPLAB IPE may fail to enable AVR mode, if this is the first instance of use, for the particular device.


If the device is brand new or this is the first instance of use, since purchase, a firmware upgrade may be required before AVR mode can be enabled. The MPLAB IPE software can automatically upgrade the firmware, but will only do so when attempting to connect to the device via its other (non-EDBG) interface.

This means you must first follow the instructions in the Disabling AVR mode section, before attempting to enable AVR mode. Following those instructions will result in MPLAB IPE attempting to connect to the device via its non-EDBG interface. This connection attempt will trigger an automatic firmware upgrade. Once the firmware upgrade is complete, restart MPLAB IPE and proceed with the enabling of AVR mode.

Open MPLAB IPE, select any target from the AVR 8-bit family and ensure that the device (Snap or PICkit 4) is selected in the 'Tool' input.

The device does not need to be connected to the selected target. It can remain disconnected from any target throughout this process.


Enabling AVR mode on the MPLAB Snap and PICkit 4, via the Microchip MPLAB IPE software

Select the 'Read' function. MPLAB IPE will now attempt to connect to the device. Upon connecting, it will automatically enable the EDBG (AVR) firmware mode.

During this process, MPLAB IPE may report errors relating to target connection/power/detected voltage - please ignore these.

Once AVR mode has been enabled, the device will perform a hard USB reset. Then, follow the instructions in the Confirmation section to confirm the operation was successful.

Disabling AVR mode via MPLAB IPE

Upon enabling AVR mode, the device will no longer be able to perform programming and debugging operations with any non-AVR target (such as any target from the PIC family), until AVR mode has been disabled.

The process of disabling AVR mode is similar to that of enabling AVR mode. MPLAB IPE will automatically disable AVR mode when attempting to use the device to connect to a non-AVR target, such as one from the PIC family.

Switching target families (AVR -> PIC) in the same MPALB IPE session can result in MPLAB IPE crashing or hanging indefinitely. Restart MPLAB IPE before switching target families.

Open MPLAB IPE and select any target from the PIC family. Click 'Apply', then 'Connect'.


Disabling AVR mode on the MPLAB Snap and PICkit 4, via the Microchip MPLAB IPE software

MPLAB IPE will now attempt to connect to the device. Upon connecting, it will automatically disable AVR mode.

During this process, MPLAB IPE may report errors relating to target connection/power/detected voltage - please ignore these.

Once AVR mode has been disabled, the device will perform a hard USB reset.

Debugging AVR targets with the MPLAB Snap and PICkit 4

Once AVR mode has been enabled, the device can be used in conjunction with Bloom, to perform debugging operations on over 200 AVR 8-bit targets.

Bloom exposes an interface to the connected target by means of a GDB server. Any IDE with remote GDB capabilities can interface with Bloom, in order to perform debugging operations on the target.

Bloom also exposes the target's GPIO pin states, register values and memories, via the Bloom Insight window. Users can manipulate GPIO output pins and register values, as well as inspect target RAM and EEPROM, whilst execution on the target is halted.

Bloom Insight

To begin debugging with the MPLAB Snap or PICkit 4, on GNU/Linux, follow the instructions at Getting Started with Bloom.