Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
jtag3_private.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mega_device_desc
 
struct  xmega_device_desc
 

Macros

#define TOKEN   0x0e
 
#define SCOPE_INFO   0x00
 
#define SCOPE_GENERAL   0x01
 
#define SCOPE_AVR_ISP   0x11
 
#define SCOPE_AVR   0x12
 
#define CMD3_GET_INFO   0x00
 
#define CMD3_INFO_NAME   0x80 /* JTAGICE3 */
 
#define CMD3_INFO_SERIAL   0x81 /* J3xxxxxxxxxx */
 
#define CMD3_SET_PARAMETER   0x01
 
#define CMD3_GET_PARAMETER   0x02
 
#define CMD3_SIGN_ON   0x10
 
#define CMD3_SIGN_OFF   0x11 /* takes one parameter? */
 
#define CMD3_START_DW_DEBUG   0x13
 
#define CMD3_MONCON_DISABLE   0x17
 
#define CMD3_ENTER_PROGMODE   0x15
 
#define CMD3_LEAVE_PROGMODE   0x16
 
#define CMD3_ERASE_MEMORY   0x20
 
#define CMD3_READ_MEMORY   0x21
 
#define CMD3_WRITE_MEMORY   0x23
 
#define CMD3_READ_PC   0x35
 
#define RSP3_OK   0x80
 
#define RSP3_INFO   0x81
 
#define RSP3_PC   0x83
 
#define RSP3_DATA   0x84
 
#define RSP3_FAILED   0xA0
 
#define RSP3_STATUS_MASK   0xE0
 
#define RSP3_FAIL_DEBUGWIRE   0x10
 
#define RSP3_FAIL_PDI   0x1B
 
#define RSP3_FAIL_NO_ANSWER   0x20
 
#define RSP3_FAIL_NO_TARGET_POWER   0x22
 
#define RSP3_FAIL_WRONG_MODE   0x32 /* progmode vs. non-prog */
 
#define RSP3_FAIL_UNSUPP_MEMORY   0x34 /* unsupported memory type */
 
#define RSP3_FAIL_WRONG_LENGTH   0x35 /* wrong lenth for mem access */
 
#define RSP3_FAIL_NOT_UNDERSTOOD   0x91
 
#define EVT3_BREAK   0x40 /* AVR scope */
 
#define EVT3_SLEEP   0x11 /* General scope, also wakeup */
 
#define EVT3_POWER   0x10 /* General scope */
 
#define MTYPE_SRAM   0x20 /* target's SRAM or [ext.] IO registers */
 
#define MTYPE_EEPROM   0x22 /* EEPROM, what way? */
 
#define MTYPE_SPM   0xA0 /* flash through LPM/SPM */
 
#define MTYPE_FLASH_PAGE   0xB0 /* flash in programming mode */
 
#define MTYPE_EEPROM_PAGE   0xB1 /* EEPROM in programming mode */
 
#define MTYPE_FUSE_BITS   0xB2 /* fuse bits in programming mode */
 
#define MTYPE_LOCK_BITS   0xB3 /* lock bits in programming mode */
 
#define MTYPE_SIGN_JTAG   0xB4 /* signature in programming mode */
 
#define MTYPE_OSCCAL_BYTE   0xB5 /* osccal cells in programming mode */
 
#define MTYPE_FLASH   0xc0 /* xmega (app.) flash - undocumented in AVR067 */
 
#define MTYPE_BOOT_FLASH   0xc1 /* xmega boot flash - undocumented in AVR067 */
 
#define MTYPE_EEPROM_XMEGA   0xc4 /* xmega EEPROM in debug mode - undocumented in AVR067 */
 
#define MTYPE_USERSIG   0xc5 /* xmega user signature - undocumented in AVR067 */
 
#define MTYPE_PRODSIG   0xc6 /* xmega production signature - undocumented in AVR067 */
 
#define PARM3_HW_VER   0x00 /* section 0, generic scope, 1 byte */
 
#define PARM3_FW_MAJOR   0x01 /* section 0, generic scope, 1 byte */
 
#define PARM3_FW_MINOR   0x02 /* section 0, generic scope, 1 byte */
 
#define PARM3_FW_RELEASE
 
#define PARM3_VTARGET
 
#define PARM3_DEVICEDESC
 
#define PARM3_ARCH   0x00 /* section 0, AVR scope, 1 byte */
 
#define PARM3_ARCH_TINY   1 /* also small megaAVR with ISP/DW only */
 
#define PARM3_ARCH_MEGA   2
 
#define PARM3_ARCH_XMEGA   3
 
#define PARM3_SESS_PURPOSE   0x01 /* section 0, AVR scope, 1 byte */
 
#define PARM3_SESS_PROGRAMMING   1
 
#define PARM3_SESS_DEBUGGING   2
 
#define PARM3_CONNECTION   0x00 /* section 1, AVR scope, 1 byte */
 
#define PARM3_CONN_ISP   1
 
#define PARM3_CONN_JTAG   4
 
#define PARM3_CONN_DW   5
 
#define PARM3_CONN_PDI   6
 
#define PARM3_JTAGCHAIN
 
#define PARM3_CLK_MEGA_PROG   0x20 /* section 1, AVR scope, 2 bytes (kHz) */
 
#define PARM3_CLK_MEGA_DEBUG   0x21 /* section 1, AVR scope, 2 bytes (kHz) */
 
#define PARM3_CLK_XMEGA_JTAG   0x30 /* section 1, AVR scope, 2 bytes (kHz) */
 
#define PARM3_CLK_XMEGA_PDI   0x31 /* section 1, AVR scope, 2 bytes (kHz) */
 
#define XMEGA_ERASE_CHIP   0x00
 
#define XMEGA_ERASE_APP   0x01
 
#define XMEGA_ERASE_BOOT   0x02
 
#define XMEGA_ERASE_EEPROM   0x03
 
#define XMEGA_ERASE_APP_PAGE   0x04
 
#define XMEGA_ERASE_BOOT_PAGE   0x05
 
#define XMEGA_ERASE_EEPROM_PAGE   0x06
 
#define XMEGA_ERASE_USERSIG   0x07
 
#define EDBG_VENDOR_AVR_CMD   0x80
 
#define EDBG_VENDOR_AVR_RSP   0x81
 
#define EDBG_VENDOR_AVR_EVT   0x82
 
#define CMSISDAP_CMD_INFO   0x00 /* get info, followed by INFO byte */
 
#define CMSISDAP_INFO_VID   0x01 /* vendor ID (string) */
 
#define CMSISDAP_INFO_PID   0x02 /* product ID (string) */
 
#define CMSISDAP_INFO_SERIAL   0x03 /* serial number (string) */
 
#define CMSISDAP_INFO_FIRMWARE   0x04 /* firmware version (string) */
 
#define CMSISDAP_INFO_TARGET_VENDOR   0x05 /* target device vendor (string) */
 
#define CMSISDAP_INFO_TARGET_NAME   0x06 /* target device name (string) */
 
#define CMSISDAP_INFO_CAPABILITIES   0xF0 /* debug unit capabilities (byte) */
 
#define CMSISDAP_INFO_PACKET_COUNT   0xFE /* packet count (byte) (which packets, anyway?) */
 
#define CMSISDAP_INFO_PACKET_SIZE   0xFF /* packet size (short) */
 
#define CMSISDAP_CMD_LED   0x01 /* LED control, followed by LED number and on/off byte */
 
#define CMSISDAP_LED_CONNECT   0x00 /* connect LED */
 
#define CMSISDAP_LED_RUNNING   0x01 /* running LED */
 
#define CMSISDAP_CMD_CONNECT   0x02 /* connect to target, followed by DAP mode */
 
#define CMSISDAP_CONN_DEFAULT   0x00
 
#define CMSISDAP_CONN_SWD   0x01 /* serial wire debug */
 
#define CMSISDAP_CONN_JTAG   0x02 /* JTAG mode */
 
#define CMSISDAP_CMD_DISCONNECT   0x03 /* disconnect from target */
 
#define CMSISDAP_XFR_CONFIGURE
 
#define CMSISDAP_CMD_WRITEAPBORT   0x08 /* write to CoreSight ABORT register of target */
 
#define CMSISDAP_CMD_DELAY   0x09 /* delay for number of microseconds (short) */
 
#define CMSISDAP_CMD_RESET   0x0A /* reset target */
 
#define CMSISDAP_CMD_SWJ_CLOCK   0x11 /* SWD/JTAG clock, (word) */
 
#define CMSISDAP_CMD_SWD_CONFIGURE   0x13 /* configure SWD protocol; (byte) */
 

Class Documentation

◆ mega_device_desc

struct mega_device_desc
Class Members
unsigned char allow_full_page_bitstream
unsigned char always_one
unsigned char boot_address[4]
unsigned char dummy1[4]
unsigned char dummy2[2]
unsigned char eearh_address
unsigned char eearl_address
unsigned char eecr_address
unsigned char eedr_address
unsigned char eeprom_page_size
unsigned char eeprom_size[2]
unsigned char flash_page_size[2]
unsigned char flash_size[4]
unsigned char idr_address
unsigned char ocd_revision
unsigned char osccal_address
unsigned char spmcr_address
unsigned char sram_offset[2]

◆ xmega_device_desc

struct xmega_device_desc
Class Members
unsigned char app_size[4]
unsigned char boot_size[2]
unsigned char datalen
unsigned char eeprom_page_size
unsigned char eeprom_size[2]
unsigned char flash_page_size[2]
unsigned char mcu_base_addr[2]
unsigned char nvm_app_offset[4]
unsigned char nvm_base_addr[2]
unsigned char nvm_boot_offset[4]
unsigned char nvm_data_offset[4]
unsigned char nvm_eeprom_offset[4]
unsigned char nvm_fuse_offset[4]
unsigned char nvm_lock_offset[4]
unsigned char nvm_prod_sig_offset[4]
unsigned char nvm_user_sig_offset[4]
unsigned char whatever[2]

Macro Definition Documentation

◆ CMD3_ENTER_PROGMODE

#define CMD3_ENTER_PROGMODE   0x15

◆ CMD3_ERASE_MEMORY

#define CMD3_ERASE_MEMORY   0x20

◆ CMD3_GET_INFO

#define CMD3_GET_INFO   0x00

◆ CMD3_GET_PARAMETER

#define CMD3_GET_PARAMETER   0x02

◆ CMD3_INFO_NAME

#define CMD3_INFO_NAME   0x80 /* JTAGICE3 */

◆ CMD3_INFO_SERIAL

#define CMD3_INFO_SERIAL   0x81 /* J3xxxxxxxxxx */

◆ CMD3_LEAVE_PROGMODE

#define CMD3_LEAVE_PROGMODE   0x16

◆ CMD3_MONCON_DISABLE

#define CMD3_MONCON_DISABLE   0x17

◆ CMD3_READ_MEMORY

#define CMD3_READ_MEMORY   0x21

◆ CMD3_READ_PC

#define CMD3_READ_PC   0x35

◆ CMD3_SET_PARAMETER

#define CMD3_SET_PARAMETER   0x01

◆ CMD3_SIGN_OFF

#define CMD3_SIGN_OFF   0x11 /* takes one parameter? */

◆ CMD3_SIGN_ON

#define CMD3_SIGN_ON   0x10

◆ CMD3_START_DW_DEBUG

#define CMD3_START_DW_DEBUG   0x13

◆ CMD3_WRITE_MEMORY

#define CMD3_WRITE_MEMORY   0x23

◆ CMSISDAP_CMD_CONNECT

#define CMSISDAP_CMD_CONNECT   0x02 /* connect to target, followed by DAP mode */

◆ CMSISDAP_CMD_DELAY

#define CMSISDAP_CMD_DELAY   0x09 /* delay for number of microseconds (short) */

◆ CMSISDAP_CMD_DISCONNECT

#define CMSISDAP_CMD_DISCONNECT   0x03 /* disconnect from target */

◆ CMSISDAP_CMD_INFO

#define CMSISDAP_CMD_INFO   0x00 /* get info, followed by INFO byte */

◆ CMSISDAP_CMD_LED

#define CMSISDAP_CMD_LED   0x01 /* LED control, followed by LED number and on/off byte */

◆ CMSISDAP_CMD_RESET

#define CMSISDAP_CMD_RESET   0x0A /* reset target */

◆ CMSISDAP_CMD_SWD_CONFIGURE

#define CMSISDAP_CMD_SWD_CONFIGURE   0x13 /* configure SWD protocol; (byte) */

◆ CMSISDAP_CMD_SWJ_CLOCK

#define CMSISDAP_CMD_SWJ_CLOCK   0x11 /* SWD/JTAG clock, (word) */

◆ CMSISDAP_CMD_WRITEAPBORT

#define CMSISDAP_CMD_WRITEAPBORT   0x08 /* write to CoreSight ABORT register of target */

◆ CMSISDAP_CONN_DEFAULT

#define CMSISDAP_CONN_DEFAULT   0x00

◆ CMSISDAP_CONN_JTAG

#define CMSISDAP_CONN_JTAG   0x02 /* JTAG mode */

◆ CMSISDAP_CONN_SWD

#define CMSISDAP_CONN_SWD   0x01 /* serial wire debug */

◆ CMSISDAP_INFO_CAPABILITIES

#define CMSISDAP_INFO_CAPABILITIES   0xF0 /* debug unit capabilities (byte) */

◆ CMSISDAP_INFO_FIRMWARE

#define CMSISDAP_INFO_FIRMWARE   0x04 /* firmware version (string) */

◆ CMSISDAP_INFO_PACKET_COUNT

#define CMSISDAP_INFO_PACKET_COUNT   0xFE /* packet count (byte) (which packets, anyway?) */

◆ CMSISDAP_INFO_PACKET_SIZE

#define CMSISDAP_INFO_PACKET_SIZE   0xFF /* packet size (short) */

◆ CMSISDAP_INFO_PID

#define CMSISDAP_INFO_PID   0x02 /* product ID (string) */

◆ CMSISDAP_INFO_SERIAL

#define CMSISDAP_INFO_SERIAL   0x03 /* serial number (string) */

◆ CMSISDAP_INFO_TARGET_NAME

#define CMSISDAP_INFO_TARGET_NAME   0x06 /* target device name (string) */

◆ CMSISDAP_INFO_TARGET_VENDOR

#define CMSISDAP_INFO_TARGET_VENDOR   0x05 /* target device vendor (string) */

◆ CMSISDAP_INFO_VID

#define CMSISDAP_INFO_VID   0x01 /* vendor ID (string) */

◆ CMSISDAP_LED_CONNECT

#define CMSISDAP_LED_CONNECT   0x00 /* connect LED */

◆ CMSISDAP_LED_RUNNING

#define CMSISDAP_LED_RUNNING   0x01 /* running LED */

◆ CMSISDAP_XFR_CONFIGURE

#define CMSISDAP_XFR_CONFIGURE
Value:
0x04 /* configure transfers; idle cycles (byte);
wait retry (short); match retry (short) */

◆ EDBG_VENDOR_AVR_CMD

#define EDBG_VENDOR_AVR_CMD   0x80

◆ EDBG_VENDOR_AVR_EVT

#define EDBG_VENDOR_AVR_EVT   0x82

◆ EDBG_VENDOR_AVR_RSP

#define EDBG_VENDOR_AVR_RSP   0x81

◆ EVT3_BREAK

#define EVT3_BREAK   0x40 /* AVR scope */

◆ EVT3_POWER

#define EVT3_POWER   0x10 /* General scope */

◆ EVT3_SLEEP

#define EVT3_SLEEP   0x11 /* General scope, also wakeup */

◆ MTYPE_BOOT_FLASH

#define MTYPE_BOOT_FLASH   0xc1 /* xmega boot flash - undocumented in AVR067 */

◆ MTYPE_EEPROM

#define MTYPE_EEPROM   0x22 /* EEPROM, what way? */

◆ MTYPE_EEPROM_PAGE

#define MTYPE_EEPROM_PAGE   0xB1 /* EEPROM in programming mode */

◆ MTYPE_EEPROM_XMEGA

#define MTYPE_EEPROM_XMEGA   0xc4 /* xmega EEPROM in debug mode - undocumented in AVR067 */

◆ MTYPE_FLASH

#define MTYPE_FLASH   0xc0 /* xmega (app.) flash - undocumented in AVR067 */

◆ MTYPE_FLASH_PAGE

#define MTYPE_FLASH_PAGE   0xB0 /* flash in programming mode */

◆ MTYPE_FUSE_BITS

#define MTYPE_FUSE_BITS   0xB2 /* fuse bits in programming mode */

◆ MTYPE_LOCK_BITS

#define MTYPE_LOCK_BITS   0xB3 /* lock bits in programming mode */

◆ MTYPE_OSCCAL_BYTE

#define MTYPE_OSCCAL_BYTE   0xB5 /* osccal cells in programming mode */

◆ MTYPE_PRODSIG

#define MTYPE_PRODSIG   0xc6 /* xmega production signature - undocumented in AVR067 */

◆ MTYPE_SIGN_JTAG

#define MTYPE_SIGN_JTAG   0xB4 /* signature in programming mode */

◆ MTYPE_SPM

#define MTYPE_SPM   0xA0 /* flash through LPM/SPM */

◆ MTYPE_SRAM

#define MTYPE_SRAM   0x20 /* target's SRAM or [ext.] IO registers */

◆ MTYPE_USERSIG

#define MTYPE_USERSIG   0xc5 /* xmega user signature - undocumented in AVR067 */

◆ PARM3_ARCH

#define PARM3_ARCH   0x00 /* section 0, AVR scope, 1 byte */

◆ PARM3_ARCH_MEGA

#define PARM3_ARCH_MEGA   2

◆ PARM3_ARCH_TINY

#define PARM3_ARCH_TINY   1 /* also small megaAVR with ISP/DW only */

◆ PARM3_ARCH_XMEGA

#define PARM3_ARCH_XMEGA   3

◆ PARM3_CLK_MEGA_DEBUG

#define PARM3_CLK_MEGA_DEBUG   0x21 /* section 1, AVR scope, 2 bytes (kHz) */

◆ PARM3_CLK_MEGA_PROG

#define PARM3_CLK_MEGA_PROG   0x20 /* section 1, AVR scope, 2 bytes (kHz) */

◆ PARM3_CLK_XMEGA_JTAG

#define PARM3_CLK_XMEGA_JTAG   0x30 /* section 1, AVR scope, 2 bytes (kHz) */

◆ PARM3_CLK_XMEGA_PDI

#define PARM3_CLK_XMEGA_PDI   0x31 /* section 1, AVR scope, 2 bytes (kHz) */

◆ PARM3_CONN_DW

#define PARM3_CONN_DW   5

◆ PARM3_CONN_ISP

#define PARM3_CONN_ISP   1

◆ PARM3_CONN_JTAG

#define PARM3_CONN_JTAG   4

◆ PARM3_CONN_PDI

#define PARM3_CONN_PDI   6

◆ PARM3_CONNECTION

#define PARM3_CONNECTION   0x00 /* section 1, AVR scope, 1 byte */

◆ PARM3_DEVICEDESC

#define PARM3_DEVICEDESC
Value:
0x00 /* section 2, memory etc. configuration,
* 31 bytes for tiny/mega AVR, 47 bytes
* for Xmega; is also used in command
* 0x36 in JTAGICEmkII, starting with
* firmware 7.x */

◆ PARM3_FW_MAJOR

#define PARM3_FW_MAJOR   0x01 /* section 0, generic scope, 1 byte */

◆ PARM3_FW_MINOR

#define PARM3_FW_MINOR   0x02 /* section 0, generic scope, 1 byte */

◆ PARM3_FW_RELEASE

#define PARM3_FW_RELEASE
Value:
0x03 /* section 0, generic scope, 1 byte;
* always asked for by Atmel Studio,
* but never displayed there */

◆ PARM3_HW_VER

#define PARM3_HW_VER   0x00 /* section 0, generic scope, 1 byte */

◆ PARM3_JTAGCHAIN

#define PARM3_JTAGCHAIN
Value:
0x01 /* JTAG chain info, AVR scope (units
* before/after, bits before/after), 4
* bytes */

◆ PARM3_SESS_DEBUGGING

#define PARM3_SESS_DEBUGGING   2

◆ PARM3_SESS_PROGRAMMING

#define PARM3_SESS_PROGRAMMING   1

◆ PARM3_SESS_PURPOSE

#define PARM3_SESS_PURPOSE   0x01 /* section 0, AVR scope, 1 byte */

◆ PARM3_VTARGET

#define PARM3_VTARGET
Value:
0x00 /* section 1, generic scope, 2 bytes,
* in millivolts */

◆ RSP3_DATA

#define RSP3_DATA   0x84

◆ RSP3_FAIL_DEBUGWIRE

#define RSP3_FAIL_DEBUGWIRE   0x10

◆ RSP3_FAIL_NO_ANSWER

#define RSP3_FAIL_NO_ANSWER   0x20

◆ RSP3_FAIL_NO_TARGET_POWER

#define RSP3_FAIL_NO_TARGET_POWER   0x22

◆ RSP3_FAIL_NOT_UNDERSTOOD

#define RSP3_FAIL_NOT_UNDERSTOOD   0x91

◆ RSP3_FAIL_PDI

#define RSP3_FAIL_PDI   0x1B

◆ RSP3_FAIL_UNSUPP_MEMORY

#define RSP3_FAIL_UNSUPP_MEMORY   0x34 /* unsupported memory type */

◆ RSP3_FAIL_WRONG_LENGTH

#define RSP3_FAIL_WRONG_LENGTH   0x35 /* wrong lenth for mem access */

◆ RSP3_FAIL_WRONG_MODE

#define RSP3_FAIL_WRONG_MODE   0x32 /* progmode vs. non-prog */

◆ RSP3_FAILED

#define RSP3_FAILED   0xA0

◆ RSP3_INFO

#define RSP3_INFO   0x81

◆ RSP3_OK

#define RSP3_OK   0x80

◆ RSP3_PC

#define RSP3_PC   0x83

◆ RSP3_STATUS_MASK

#define RSP3_STATUS_MASK   0xE0

◆ SCOPE_AVR

#define SCOPE_AVR   0x12

◆ SCOPE_AVR_ISP

#define SCOPE_AVR_ISP   0x11

◆ SCOPE_GENERAL

#define SCOPE_GENERAL   0x01

◆ SCOPE_INFO

#define SCOPE_INFO   0x00

◆ TOKEN

#define TOKEN   0x0e

◆ XMEGA_ERASE_APP

#define XMEGA_ERASE_APP   0x01

◆ XMEGA_ERASE_APP_PAGE

#define XMEGA_ERASE_APP_PAGE   0x04

◆ XMEGA_ERASE_BOOT

#define XMEGA_ERASE_BOOT   0x02

◆ XMEGA_ERASE_BOOT_PAGE

#define XMEGA_ERASE_BOOT_PAGE   0x05

◆ XMEGA_ERASE_CHIP

#define XMEGA_ERASE_CHIP   0x00

◆ XMEGA_ERASE_EEPROM

#define XMEGA_ERASE_EEPROM   0x03

◆ XMEGA_ERASE_EEPROM_PAGE

#define XMEGA_ERASE_EEPROM_PAGE   0x06

◆ XMEGA_ERASE_USERSIG

#define XMEGA_ERASE_USERSIG   0x07