13 Appendix
13.1 Glossary
| Term | Description |
|---|---|
| Debugger | The physical hardware device used to interface between an embedded system and a host computer |
| Embedded debugger | A debugger device that is permanently mounted on a larger embedded system |
| Kit | A printed circuit board assembly containing both a target device and an embedded debugger, typically used for firmware development before custom hardware is available |
| CNANO | Curiosity Nano |
| EDBG | Microchip Embedded Debugger, which is used on various development boards |
| nEDBG | The Nano variant of the EDBG, also known as PKOB nano and the Nano Debugger |
| PKOB | Microchip PICkit® on-Board debugger, which is used on various development boards |
| CMSIS-DAP | The standardized, USB-based interface that allows a hardware debugger to provide a host computer with access to the CoreSight Debug Access Port (DAP) of Arm Cortex processors |
| SWD | Serial Wire Debug - a two-wire programming and debugging protocol developed by Arm |
| UPDI | Unified Program and Debug Interface - a single-wire progrmaming and debugging protocol developed by Microchip, used on AVR devices |
| ICSP | In-Circuit Serial Programming - a two-wire programming and debugging interface used on PIC16, PIC18, PIC24 and dsPIC devices (using different protocols) |
| CDC | Communication Device Class, or Virtual Serial Port, typically used for printf() debugging |
| MSC | Mass Storage Class - a USB protocol for implementing removable storage, also known as MSD (Mass Storage Device) |
| DGI | Data Gateway Interface - a data-streaming mechanism developed by Microchip that allows timestamped data to be streamed from an embedded debugger to a host computer for visualization |
13.2 Target Device Interfaces
The Nano Debugger supports a variety of target device interfaces through a standardised set of pins.
| Signal | Arm/SWD | AVR UPDI | ICSP | Implementation |
|---|---|---|---|---|
| DBG0 | Serial Wire Data SWDIO | UPDI | PGD | Bi-directional, direct or level-shifted |
| DBG1 | Serial Wire Clock SWCLK | - | PGC | Bi-directional, direct or level-shifted |
| DBG2 | Serial Wire Output SWO | - | - | Bi-directional, direct or level-shifted |
| DBG3 | /RESET | /RESET | MCLR | Open-drain connection |
13.3 Auxilliary Interfaces
Virtual Serial Port/CDC
The Nano Debugger features a Virtual Serial Port (CDC), which is always included during USB enumeration.
Connect the RX and TX lines according to the guidance provided in the relevant schematic.
If you do not wish to use the Virtual Serial Port, leave the PA00 pin of the Nano Debugger unconnected and install a pull-up resistor between PA01 and the 3.3V supply rail.
Data Gateway Interface/DGI
The Nano Debugger features Data Gateway Interfaces (DGI), which are always included during USB enumeration. Depending on the number of signals required by the target debug interface and your specific needs, zero, one, or two DGI GPIO channels can be supported.
If you do not wish to use a DGI GPIO channel, leave it unconnected and ensure it is disabled in the configuration. Refer to the default configuration table to determine whether DGI GPIO is enabled by default.
13.4 Nano Debugger Configuration
13.4.1 Introduction
The Microchip Nano Debugger is versatile and can be used in a range of scenarios as described above. All implementations operate using a single, identical firmware binary image. The specific behavior for each scenario is determined by the "board configuration," while information about the device connected to the Nano Debugger on a development board is managed through its "device configuration."
Both the board configuration and the device configuration are defined in XML format but are stored in a dedicated section of flash memory within the Nano Debugger.
Board Configuration
All implementations that use the Nano Debugger must include a board configuration. Without a board configuration, the Nano Debugger will not function correctly.
The board configuration is stored in two separate locations within the Nano Debugger’s non-volatile memory:
The user-config is designed to be easily modified by the user.
- The factory-config serves as a rollback backup, allowing a modified user-config to be restored to its original factory state.
The board configuration can be put in place in several ways:
The Nano Debugger firmware zip package includes several complete images, each containing a valid board configuration that corresponds to the board types described in this document. While the bootloader and application are identical across these images, the board configurations provide a suitable "default" state for each of the primary scenarios or use cases.
The pydebuggerconfig tool, available on pypi.org, can be used to:
Write, replace, or upload an entirely new XML configuration file to a running Nano Debugger
Modify the default board configuration on a running Nano Debugger
Device Configuration
The device configuration in the Nano Debugger provides information about the device that is permanently connected to the debugger. Its primary purpose is to enable drag-and-drop programming, which operates independently of an IDE. While the device configuration can be left empty (unprogrammed), it is recommended to program a null or dummy device configuration in cases where drag-and-drop programming is not supported (such as with Arm target devices) or when no target device is present (such as in a standalone debugger scenario).
The device configuration exists as a single instance and is not intended to be modified by the user.
The images included in the Nano Debugger firmware ZIP package contain the null device configuration.
The pydebuggerconfig tool, available on pypi.org, can be used to write or replace the device configuration on a running Nano Debugger.
13.4.2 Board Configuration Details
With the pydebuggerconfig tool, available on pypi.org, you can program a complete board configuration XML file or modify individual configuration fields as needed.
Many of the fields available in the board configuration are not intended to be modified, as they are either reserved for future use or intended specifically for Microchip kits.
Basic Configuaration Fields
The following fields can be modified by kit developers using the Nano Debugger. These basic fields are intended to personalize a kit or board, making it easily identifiable for users.
| Register | Description | What its for |
|---|---|---|
| DEVNAME | Device name. Maximum length: 32 ASCII characters. | Specify the exact device name here if a device is permanently mounted on the board. If the target device is not mounted on the board this field must be left blank. |
| KITNAME | Kit name. Maximum length: 60 ASCII characters. | Give your kit a nice name here |
| MNFRNAME | Manufacturer name. Maximum length: 60 ASCII characters. | Specify who you are as a vendor |
Advanced Configuration Fields
The following fields can be modified by kit developers using the Nano Debugger when configuring more advanced boards.
| Register | Description | What its for |
|---|---|---|
| SERNUM | USB serial number | A specific USB serial number can be set here. It is recommended to use exactly 20 upper-case alphanumeric characters and no spaces. Setting the "automatic serial number" bit will override this at enumeration-time, but the original value will remain in the configuration stored in Flash memory. Length: Always 20 characters. |
| REDIRECT | Redirect ID | See the tip below. |
| DATE | Manufacturing date | Optionally, specify the manufacturing date of the kit in the format YYYYMMDD |
| INSTANCE | Content revision | This is a simple version field and can be incremented for each change made to the configuration. Length: 8-bit. |
| TARGET_DEBUG_INTERFACES | Set of programing and debugging interfaces supported | Set the bits in this bitfield to indicate which physical interface(s) are supported in this implementation. Relevant bits are:
Length: 32-bit. |
| TARGET_DEBUG_FEATURES | Set of programming and debugging features implemented | Set the bits in this bitfield to enable individual features: Relevant bits are:
Length: 8-bit. |
| DGI_INTERFACES | Set of DGI interfaces supported | Set the bits in this bitfield to indicate to the debugger which DGI interfaces are connected. Relevant bits are:
Length: 32-bit. |
| DGI_GPIO_MAP | Map of DGI GPIO channels | Set the bits in this bitfield to indicate to the debugger which DGI GPIO lines are connected. Relevant bits are:
Length: 8-bit. |
| ANALOG_FEATURES | Analog features | Set the bits in this bitfield to indicate to the debugger which analog implementation is present on the board. Relevant bits are:
Length: 32-bit. |
| VMIN | Minimum voltage | For adjustable-voltage boards, specify the minimum voltage in decivolts |
| VMAX | Maximum voltage | For adjustable-voltage boards, specify the maximum voltage in decivolts |
| VTG | Default voltage | For adjustable-voltage boards, specify the default voltage in decivolts |
| VREG | Voltage regulator | For adjustable-voltage boards, specify the voltage regulation circuit implemented. Values are:
|
Configuration Fields That Must not be Modified
These fields must remain unchanged when using the Nano Debugger.
| Register(s) | Description | Mandatory Value |
|---|---|---|
CONFIG_FORMAT_MAJOR CONFIG_FORMAT_MINOR CONFIG_FORMAT_BUILD | The version of the configuration specification being used. If new fields are added, this version is updated, and this document will be updated accordingly | (latest) |
| HARDWARE_MOD | Specify hardware modifications that affect the firmware | 0x00 |
| USB_ENUMERATION | USB enumeration | 0x03 |
| MSD_SETTINGS | Mass storage content settings | 0x00 |
| CLICK_ME_TYPE | Click-me type configuration | 0xFF |
| ID_CHANNELS | Channels for extension identification | 0x00 |
| I2C_ADDR_0, I2C_ADDR_1 | I2C address, alternative I2C address | 0x00 |
| LABS | Activate experimental firmware features | 0x00 |
| KEYx_TYPE, KEYx_LEN, KEYx | Key x type, length, value | 0x00... 0x00 |
13.5 Nano Debugger Firmware Images
The Nano Debugger composite hex files are included in the PKOB Nano Support Tool Pack version 1.19 or newer, which can be downloaded from packs.download.microchip.com/.
- The readme.md file contains additional technical information for using the Nano Debugger hex files
- The versions.txt file contains versioning information about the contents of the ZIP file
- nedbg_standalonedebugger_x.y.z.hex for Making a Standalone Debugger
- nedbg_standalonedebuggerwithtargetsupply_x.y.z.hex for Making a Standalone Debugger with Target Supply
- nedbg_adjustablevoltageboard_x.y.z.hex for Making an Adjustable-voltage Board
- nedbg_3v3board_x.y.z.hex for Making a 3.3V Board
- nedbg_fixedlvoltagelevelshiftedboard_x.y.z.hex for Making a Fixed-Voltage Level-Shifted Board
All hex files include the same bootloader and application but feature different default configurations. Any of these files can be reconfigured during manufacturing to meet your specific requirements.
