Merge pull request #2055 from MX682X/main

Erasing locked devices with pickit5 programmer if needed
This commit is contained in:
Stefan Rueger
2025-10-21 15:37:43 +02:00
committed by GitHub
12 changed files with 9526 additions and 9281 deletions

View File

@@ -61,9 +61,11 @@ typedef uint32_t Pinmask;
*/
#define LIBAVRDUDE_SUCCESS 0
#define LIBAVRDUDE_GENERAL_FAILURE (-1)
#define LIBAVRDUDE_NOTSUPPORTED (-2) // Operation not supported
#define LIBAVRDUDE_SOFTFAIL (-3) // Returned, eg, if caller might proceed with a plan B
#define LIBAVRDUDE_EXIT (-4) // End all operations in this session
#define LIBAVRDUDE_NOTSUPPORTED (-2) // Operation not supported
#define LIBAVRDUDE_SOFTFAIL (-3) // Returned, eg, if caller might proceed with a plan B
#define LIBAVRDUDE_EXIT (-4) // End all operations in this session
#define LIBAVRDUDE_DEVICE_LOCKED (-5) // Returned if the programmer determined that the device is locked
#define LIBAVRDUDE_BEYOND_ERRS (-6) // This error and lower not normally used by libavrdude functions
// Message system
@@ -828,8 +830,8 @@ const char *pinmask_to_str(const Pinmask *const pinmask);
* The target file will be selected at configure time.
*/
extern long serial_recv_timeout; // ms
extern long serial_drain_timeout; // ms
extern long serial_recv_timeout; // Milliseconds
extern long serial_drain_timeout; // Milliseconds
union filedescriptor {
int ifd;

View File

@@ -1623,12 +1623,37 @@ int main(int argc, char *argv[]) {
led_set(pgm, LED_BEG);
// Initialize the chip in preparation for accepting commands
int reinitialised = 0;
int erased_by_unlock = 0;
init_again:
init_ok = (rc = pgm->initialize(pgm, p)) >= 0;
if(!init_ok) {
if(rc == LIBAVRDUDE_EXIT) {
exitrc = 0;
goto main_exit;
}
if(rc == LIBAVRDUDE_DEVICE_LOCKED) { // The pickit5 with UPDI is a bit tricky
if(!explicit_e) { // UPDI has no access to the system when locked: must be erased first
// If tasks are pending on the command line issue error otherwise just warn
exitrc = updates && lsize(updates) > 0;
if(exitrc)
pmsg_error("device locked; chip erase option -e required for unlocking device first\n");
else
pmsg_warning("device locked; any operation will require chip erase option -e\n");
goto main_exit;
}
// Have to go in blind: cannot even read out the device ID
pmsg_notice2("-e option specified on locked device; erasing it should unlock\n");
// Reinitialise at most once if erase successful
if(reinitialised++)
pmsg_error("re-initialization failed despite part erasure; try re-running command line\n");
else if(pgm->chip_erase(pgm, p) == LIBAVRDUDE_SUCCESS) {
erased_by_unlock = 1;
goto init_again;
}
exitrc = 1;
goto main_exit;
}
pmsg_error("initialization failed (rc = %d)\n", rc);
if(rc == -2)
imsg_error(" - the programmer ISP clock is too fast for the target\n");
@@ -1828,10 +1853,10 @@ int main(int argc, char *argv[]) {
}
}
if(init_ok && erase) {
if(init_ok && erase && !erased_by_unlock) {
/*
* Erase the chip's flash and eeprom memories, this is required before the
* chip can accept new programming
* chip can accept new programming. Skip if it was already erased when unlocking.
*/
if(uflags & UF_NOWRITE) {
if(explicit_e)

View File

@@ -43,9 +43,6 @@
#include <lusb0_usb.h> // Windows
#endif
// A USB driver is needed to talk with MacOS USB; it's unclear where to find it
// so remove the support under MacOS for the time being
#if defined(HAVE_USB_H) || defined(HAVE_LUSB0_USB_H)
#define USB_PK5_CMD_READ_EP 0x81
#define USB_PK5_CMD_WRITE_EP 0x02
@@ -67,11 +64,12 @@
#define POWER_SOURCE_INT 0x01
#define POWER_SOURCE_NONE 0x02
#define ERROR_USB_SEND (-10) // Start at 10 to avoid collisions
#define ERROR_USB_RECV (-11)
#define ERROR_SCRIPT_PARAM_SIZE (-12)
#define ERROR_BAD_RESPONSE (-13)
#define ERROR_SCRIPT_EXECUTION (-14)
#define ERROR_USB_SEND (LIBAVRDUDE_BEYOND_ERRS - 1) // Start at 16 to avoid collisions
#define ERROR_USB_RECV (LIBAVRDUDE_BEYOND_ERRS - 2)
#define ERROR_SCRIPT_PARAM_SIZE (LIBAVRDUDE_BEYOND_ERRS - 3)
#define ERROR_BAD_RESPONSE (LIBAVRDUDE_BEYOND_ERRS - 4)
#define ERROR_SCRIPT_DEVICE_LOCKED (LIBAVRDUDE_BEYOND_ERRS - 5)
#define ERROR_SCRIPT_EXECUTION (LIBAVRDUDE_BEYOND_ERRS - 6)
#define can_power_target(pgm) (!!(pgm->extra_features & HAS_VTARG_ADJ))
@@ -92,7 +90,8 @@ struct pdata {
unsigned char nvm_version; // Used to determine the offset for SIGROW/DevID on UPDI
unsigned char dW_switched_isp; // for debugWIRE: Flag to indicate we switch to ISP
unsigned char dW_switched_isp; // For debugWIRE: Flag to indicate we switch to ISP
unsigned char target_locked; // Avoid additional "program_enable" when doing chip erase
unsigned char devID[4]; // Last byte has the Chip Revision of the target
unsigned char app_version[3]; // Buffer for display() sent by get_fw()
@@ -100,7 +99,7 @@ struct pdata {
unsigned char sernum_string[20]; // Buffer for display() sent by get_fw()
char sib_string[32];
unsigned char prodsig[256]; // Buffer for Prodsig that contains more then one memory
unsigned int prod_sig_len; // length of read prodsig (to know if it got filled)
unsigned int prod_sig_len; // Length of read prodsig (to know if it got filled)
unsigned char txBuf[2048]; // Buffer for transfers
unsigned char rxBuf[2048]; // 2048 because of WriteEEmem_dw with 1728 bytes length
SCRIPT scripts;
@@ -148,7 +147,7 @@ static int pickit5_updi_read_byte(const PROGRAMMER *pgm, const AVRPART *p,
const AVRMEM *mem, unsigned long addr, unsigned char *value);
static int pickit5_updi_read_sib(const PROGRAMMER *pgm, const AVRPART *p, char *sib);
static int pickit5_updi_write_cs_reg(const PROGRAMMER *pgm, unsigned int addr, unsigned char value);
static int pickit5_updi_read_cs_reg(const PROGRAMMER *pgm, unsigned int addr, unsigned char *value);
static int pickit5_updi_read_cs_reg(const PROGRAMMER *pgm, const AVRPART *p, unsigned int addr, unsigned char *value);
// ISP-specific
static int pickit5_isp_write_fuse(const PROGRAMMER *pgm, const AVRMEM *mem, unsigned char value);
@@ -171,14 +170,14 @@ static int pickit5_jtag_write_fuse(const PROGRAMMER *pgm, const AVRPART *p, cons
static int pickit5_jtag_read_fuse(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, unsigned char *value);
// PDI-Specific
static int pickit5_pdi_flash_write(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem,
static int pickit5_pdi_flash_write(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem,
unsigned long addr, int len, unsigned char *value);
// Extra functions
static int pickit5_get_fw_info(const PROGRAMMER *pgm);
static int pickit5_set_vtarget(const PROGRAMMER *pgm, double v);
static int pickit5_get_vtarget(const PROGRAMMER *pgm, double *v);
static int pickit5_set_ptg_mode(const PROGRAMMER *pgm);
static int pickit5_set_ptg_mode(const PROGRAMMER *pgm, const AVRPART *p);
static int pickit5_set_sck_period(const PROGRAMMER *pgm, double sckperiod);
@@ -188,6 +187,7 @@ inline static unsigned int pickit5_array_to_uint32(unsigned char *buf);
inline static void pickit5_create_payload_header(unsigned char *buf, unsigned int type,
unsigned int msg_len, unsigned int transfer_len);
inline static void pickit5_create_script_header(unsigned char *buf, unsigned int arg_len, unsigned int script_len);
static const char *pickit5_error_to_str(unsigned int error_code);
static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
const AVRMEM *mem, unsigned long addr, int len, unsigned char *value);
@@ -200,9 +200,9 @@ static int pickit5_send_script_done(const PROGRAMMER *pgm);
static int pickit5_read_response(const PROGRAMMER *pgm);
static int pickit5_send_script_cmd(const PROGRAMMER *pgm, const unsigned char *scr, unsigned int scr_len,
const unsigned char *param, unsigned int param_len);
static int pickit5_upload_data(const PROGRAMMER *pgm, const unsigned char *scr, unsigned int scr_len,
static int pickit5_upload_data(const PROGRAMMER *pgm, const AVRPART *p, const unsigned char *scr, unsigned int scr_len,
const unsigned char *param, unsigned int param_len, unsigned char *recv_buf, unsigned int recv_len);
static int pickit5_download_data(const PROGRAMMER *pgm, const unsigned char *scr, unsigned int scr_len,
static int pickit5_download_data(const PROGRAMMER *pgm, const AVRPART *p, const unsigned char *scr, unsigned int scr_len,
const unsigned char *param, unsigned int param_len, unsigned char *send_buf, unsigned int send_len);
@@ -212,6 +212,67 @@ static int usbdev_bulk_send(const union filedescriptor *fd, const unsigned char
// Check if the device exists
static int usbdev_check_connected(unsigned int vid, unsigned int pid);
const char *pickit5_error_to_str(unsigned int error_code) {
switch(error_code) { // These strings were found in the depths of the IDE files (HEX Editor ftw!)
case 0: return "NO_ERROR";
case 16: return "DW_PHY_ERROR";
case 17: return "JTAGM_INIT_ERROR";
case 18: return "JTAGM_ERROR";
case 19: return "JTAG_ERROR";
case 20: return "JTAGM_VERSION";
case 21: return "JTAGM_TIMEOUT";
case 22: return "JTAG_BIT_BANGER_TIMEOUT";
case 23: return "PARITY_ERROR";
case 24: return "EB_ERROR";
case 25: return "PDI_TIMEOUT";
case 26: return "COLLISION";
case 27: return "PDI_ENABLE";
case 28: return "FRAMING_ERROR";
case 29: return "DMA_ERROR";
case 32: return "NO_DEVICE_FOUND";
case 33: return "CLOCK_ERROR";
case 34: return "NO_TARGET_POWER";
case 35: return "NOT_ATTACHED";
case 36: return "DAISY_CHAIN_TOO_LONG";
case 37: return "DAISY_CHAIN_CONFIG";
case 49: return "INVALID_PHYSICAL_STATE";
case 50: return "ILLEGAL_STATE";
case 51: return "INVALID_CONFIG";
case 52: return "INVALID_MEMTYPE";
case 53: return "INVALID_SIZE";
case 54: return "INVALID_ADDRESS";
case 55: return "INVALID_ALIGNMENT";
case 56: return "ILLEGAL_MEMORY_RANGE";
case 57: return "ILLEGAL_VALUE";
case 58: return "ILLEGAL_ID";
case 59: return "INVALID_CLOCK_SPEED";
case 60: return "TIMEOUT";
case 61: return "ILLEGAL_OCD_STATUS";
case 64: return "NVM_ENABLE";
case 65: return "NVM_DISABLE";
case 66: return "CS_ERROR";
case 67: return "CRC_FAILURE";
case 68: return "OCD_LOCKED";
case 69: return "KEY_ERROR";
case 70: return "BOOT_ERROR";
case 71: return "ACK_ERROR";
case 80: return "NO_OCD_CONTROL";
// case 81: return "PLEASE_TOGGLE_POWER"; // Original, but the one below might help better
case 81: return "NO_RESPONSE_CHECK_CONNECTIONS";
case 82: return "NO_VOUT_SET";
case 83: return "VOUT_ERROR";
case 84: return "VTG_TOO_LOW_FOR_FEATURE";
case 96: return "PC_READ_FAILED";
case 97: return "REGISTER_READ_FAILED";
case 112: return "READ_ERROR";
case 113: return "WRITE_ERROR";
case 114: return "WRITE_TIMEOUT";
case 144: return "NOT_SUPPORTED";
case 145: return "NOT_IMPLEMENTED";
default: return "UNKNOWN";
}
}
inline static void pickit5_uint32_to_array(unsigned char *buf, uint32_t num) {
*(buf++) = (uint8_t) num;
*(buf++) = (uint8_t) (num >> 8);
@@ -359,7 +420,7 @@ static int pickit5_send_script(const PROGRAMMER *pgm, unsigned int script_type,
if(script == NULL) {
pmsg_error("invalid script pointer passed\n");
return -3;
return LIBAVRDUDE_EXIT; // If script is NULL there is a significant problem
}
unsigned int header_len = 16 + 8; // Header info + script header
@@ -381,10 +442,10 @@ static int pickit5_send_script(const PROGRAMMER *pgm, unsigned int script_type,
memcpy(&buf[preamble_len], script, script_len);
int ret_val = serial_send(&pgm->fd, buf, message_len);
if(ret_val < 0)
pmsg_error("sending script failed\n");
return ret_val;
if(serial_send(&pgm->fd, buf, message_len) < 0) {
return LIBAVRDUDE_GENERAL_FAILURE;
}
return LIBAVRDUDE_SUCCESS;
}
static int pickit5_read_response(const PROGRAMMER *pgm) {
@@ -402,12 +463,21 @@ static int pickit5_read_response(const PROGRAMMER *pgm) {
return ERROR_BAD_RESPONSE;
}
if(error_code != 0x00) {
pmsg_error("script error returned: 0x%2X\n", error_code);
return ERROR_SCRIPT_EXECUTION;
int rc = LIBAVRDUDE_SUCCESS;
if(error_code == 0x44) {
my.target_locked = 0x01;
rc = LIBAVRDUDE_DEVICE_LOCKED;
} else if(error_code == 0x51) {
if(is_updi(pgm))
pmsg_error("failed to start session; reason might be: no power, bad connection or missing HV pulse.");
else
pmsg_error("failed to start session; reason might be: no power or bad connection");
rc = LIBAVRDUDE_GENERAL_FAILURE;
} else if(error_code != 0x00) {
pmsg_error("script error returned: 0x%2X - %s\n", error_code, pickit5_error_to_str(error_code));
rc = ERROR_SCRIPT_EXECUTION;
}
return 0;
return rc;
}
/*
@@ -474,22 +544,18 @@ static int pickit5_get_status(const PROGRAMMER *pgm, unsigned char status) {
*/
static int pickit5_send_script_cmd(const PROGRAMMER *pgm, const unsigned char *scr, unsigned int scr_len,
const unsigned char *param, unsigned int param_len) {
if(pickit5_send_script(pgm, SCR_CMD, scr, scr_len, param, param_len, 0) < 0) {
pmsg_error("sending script failed\n");
return -1;
pmsg_debug("%s()\n", __func__);
int rc = pickit5_send_script(pgm, SCR_CMD, scr, scr_len, param, param_len, 0);
if(rc == LIBAVRDUDE_SUCCESS) {
return pickit5_read_response(pgm);
}
if(pickit5_read_response(pgm) < 0) {
pmsg_error("reading script response failed\n");
return -2;
}
return 0;
return rc;
}
/*
Sends a script and sends the send_buf array over the data endpoint
*/
static int pickit5_download_data(const PROGRAMMER *pgm, const unsigned char *scr, unsigned int scr_len,
static int pickit5_download_data(const PROGRAMMER *pgm, const AVRPART *p, const unsigned char *scr, unsigned int scr_len,
const unsigned char *param, unsigned int param_len, unsigned char *send_buf, unsigned int send_len) {
if(pickit5_send_script(pgm, SCR_DOWNLOAD, scr, scr_len, param, param_len, send_len) < 0) {
@@ -505,11 +571,11 @@ static int pickit5_download_data(const PROGRAMMER *pgm, const unsigned char *scr
return -3;
}
pmsg_notice("attempting to recover from transmission error\n");
if(pickit5_program_disable(pgm, NULL) < 0) {
if(pickit5_program_disable(pgm, p) < 0) {
pmsg_error("failed to disable programming mode, please power-cycle the programmer and part\n");
return -3;
}
if(pickit5_program_enable(pgm, NULL) < 0) {
if(pickit5_program_enable(pgm, p) < 0) {
pmsg_error("failed to re-enable programming mode, please power-cycle the programmer and part\n");
return -3;
}
@@ -533,7 +599,7 @@ static int pickit5_download_data(const PROGRAMMER *pgm, const unsigned char *scr
/*
Sends a script and reads data from the data channel into recv_buf.
*/
static int pickit5_upload_data(const PROGRAMMER *pgm, const unsigned char *scr, unsigned int scr_len,
static int pickit5_upload_data(const PROGRAMMER *pgm, const AVRPART *p, const unsigned char *scr, unsigned int scr_len,
const unsigned char *param, unsigned int param_len, unsigned char *recv_buf, unsigned int recv_len) {
if(pickit5_send_script(pgm, SCR_UPLOAD, scr, scr_len, param, param_len, recv_len) < 0) {
@@ -796,8 +862,8 @@ static void pickit5_enable(PROGRAMMER *pgm, const AVRPART *p) {
}
if(is_debugwire(pgm)) {
if((mem = avr_locate_flash(p))) {
mem->page_size = mem->size < 1024? mem->size : 1024; // The Flash Write function on DW needs 1600 bytes
mem->readsize = mem->size < 1024? mem->size : 1024; // this reduces overhead and speeds things up
mem->page_size = mem->size < 1024? mem->size : 1024; // The Flash Write function on DW needs 1600 bytes.
mem->readsize = mem->size < 1024? mem->size : 1024; // This reduces overhead and speeds things up
}
}
if(is_isp(pgm)) {
@@ -871,18 +937,19 @@ static void pickit5_print_parms(const PROGRAMMER *pgm, FILE *fp) {
}
static int pickit5_updi_init(const PROGRAMMER *pgm, const AVRPART *p, double v_target) {
if(pickit5_program_enable(pgm, p) < 0)
return -1;
int rc = pickit5_program_enable(pgm, p);
if(rc < LIBAVRDUDE_SUCCESS) {
return (rc < LIBAVRDUDE_BEYOND_ERRS)? LIBAVRDUDE_GENERAL_FAILURE : rc;
}
// Get SIB so we can get the NVM Version
if(pickit5_updi_read_sib(pgm, p, my.sib_string) < 0) {
pmsg_error("failed to obtain System Info Block\n");
return -1;
return LIBAVRDUDE_GENERAL_FAILURE;
}
if(pickit5_read_dev_id(pgm, p) < 0) {
pmsg_error("failed to obtain device ID\n");
return -1;
return LIBAVRDUDE_GENERAL_FAILURE;
}
if(!(pgm->extra_features & HAS_BITCLOCK_ADJ))
@@ -905,7 +972,7 @@ static int pickit5_updi_init(const PROGRAMMER *pgm, const AVRPART *p, double v_t
pickit5_updi_write_cs_reg(pgm, UPDI_ASI_CTRLA, 0x01); // Change UPDI clock to 16 MHz
unsigned char ret_val = 0;
pickit5_updi_read_cs_reg(pgm, UPDI_ASI_CTRLA, &ret_val);
pickit5_updi_read_cs_reg(pgm, p, UPDI_ASI_CTRLA, &ret_val);
if(ret_val != 0x01) {
pmsg_warning("failed to change UPDI clock, falling back to 225 kHz\n");
baud = 225000;
@@ -920,7 +987,7 @@ static int pickit5_updi_init(const PROGRAMMER *pgm, const AVRPART *p, double v_t
} else {
pmsg_warning("failed to set UPDI speed, continuing\n");
}
return 1;
return LIBAVRDUDE_SUCCESS;
}
@@ -967,6 +1034,8 @@ static int pickit5_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
}
pmsg_debug("found scripts at namepos %d", rc);
my.target_locked = 0;
if(my.hvupdi_enabled > 0) {
if(p->hvupdi_variant == UPDI_ENABLE_HV_UPDI)
pmsg_notice("high-voltage SYSCFG0 override on UPDI pin enabled\n");
@@ -980,12 +1049,12 @@ static int pickit5_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
my.pk_op_mode = PK_OP_RESPONDS;
}
pickit5_set_ptg_mode(pgm);
pickit5_set_ptg_mode(pgm, p);
pickit5_set_vtarget(pgm, 0.0); // Avoid the edge case when avrdude was CTRL+C'd but still provides power
// Now we try to figure out if we have to supply power from PICkit
double v_target = 3.30; // Placeholder in case no VTARG Read
if(pgm->extra_features & HAS_VTARG_READ) { // If not supported (PK Basic), use a place
pickit5_get_vtarget(pgm, &v_target);
if(v_target < 1.8) {
@@ -1041,9 +1110,7 @@ static int pickit5_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
default_baud;
if(is_updi(pgm)) { // UPDI got it's own init as it is well enough documented to select
if(pickit5_updi_init(pgm, p, v_target) < 0) // the CLKDIV based on the voltage and requested baud
return -1;
return 0;
return pickit5_updi_init(pgm, p, v_target); // the CLKDIV based on the voltage and requested baud
}
// JTAG __requires__ setting the speed before program enable
@@ -1065,7 +1132,7 @@ static int pickit5_cmd(const PROGRAMMER *pgm, const unsigned char *cmd, unsigned
}
static int pickit5_program_enable(const PROGRAMMER *pgm, const AVRPART *p) {
(void) p; // Warning! this file is passing NULL at some point
(void) p; // p is unused but required by libavrdude.h
pmsg_debug("%s()\n", __func__);
const unsigned char *enter_prog = my.scripts.EnterProgMode;
unsigned int enter_prog_len = my.scripts.EnterProgMode_len;
@@ -1081,21 +1148,19 @@ static int pickit5_program_enable(const PROGRAMMER *pgm, const AVRPART *p) {
}
}
if(my.pk_op_mode == PK_OP_READY) {
if(pickit5_send_script_cmd(pgm, enter_prog, enter_prog_len, NULL, 0) < 0)
return -1;
return pickit5_send_script_cmd(pgm, enter_prog, enter_prog_len, NULL, 0);
}
return 0;
return LIBAVRDUDE_SUCCESS;
}
static int pickit5_program_disable(const PROGRAMMER *pgm, const AVRPART *p) {
(void) p; // Warning! this file is passing NULL at some point
(void) p; // p is unused but required by libavrdude.h
pmsg_debug("%s()\n", __func__);
const unsigned char *exit_prog = my.scripts.ExitProgMode;
unsigned int exit_prog_len = my.scripts.ExitProgMode_len;
if(my.pk_op_mode == PK_OP_READY) {
if(pickit5_send_script_cmd(pgm, exit_prog, exit_prog_len, NULL, 0) < 0)
return -1;
return pickit5_send_script_cmd(pgm, exit_prog, exit_prog_len, NULL, 0);
}
return 0;
}
@@ -1103,8 +1168,10 @@ static int pickit5_program_disable(const PROGRAMMER *pgm, const AVRPART *p) {
static int pickit5_chip_erase(const PROGRAMMER *pgm, const AVRPART *p) {
pmsg_debug("%s()\n", __func__);
pickit5_program_enable(pgm, p);
if(is_debugwire(pgm)) // dW Chip erase doesn't seem to be working, use ISP
if(!my.target_locked) // Avoid function call to avoid error printing (might be confusing)
pickit5_program_enable(pgm, p); // Ignore any errors that might come up
if(is_debugwire(pgm)) // debugWire Chip erase doesn't seem to be working, use ISP
pickit5_dw_switch_to_isp(pgm, p);
const unsigned char *chip_erase = my.scripts.EraseChip;
@@ -1115,12 +1182,12 @@ static int pickit5_chip_erase(const PROGRAMMER *pgm, const AVRPART *p) {
pmsg_info("target successfully erased\n");
my.pk_op_mode = PK_OP_READY;
pickit5_program_enable(pgm, p);
return 0;
return LIBAVRDUDE_SUCCESS;
}
}
pmsg_error("chip erase failed\n");
return -1;
return LIBAVRDUDE_GENERAL_FAILURE;
}
static int pickit5_paged_load(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem,
@@ -1146,11 +1213,11 @@ static int pickit5_set_sck_period(const PROGRAMMER *pgm, double sckperiod) {
return 0;
pickit5_uint32_to_array(buf, frq);
if(pickit5_send_script_cmd(pgm, set_speed, set_speed_len, buf, 4) >= 0)
return 0;
pmsg_error("failed to set speed\n");
return -1;
int rc = pickit5_send_script_cmd(pgm, set_speed, set_speed_len, buf, 4);
if(rc != LIBAVRDUDE_SUCCESS)
pmsg_error("failed to set speed\n");
return rc;
}
static int pickit5_write_byte(const PROGRAMMER *pgm, const AVRPART *p,
@@ -1261,7 +1328,7 @@ static int pickit5_pdi_flash_write(const PROGRAMMER *pgm, const AVRPART *p,
const AVRMEM *mem, unsigned long addr, int len, unsigned char *value) {
pmsg_debug("%s\n", __func__);
unsigned short page_size = mem->page_size;
if (len % page_size != 0) { // sanity
if(len % page_size != 0) { // Sanity
pmsg_error("length %i is not a multiple of page size %i, aborting.\n", len, page_size);
return -1;
}
@@ -1277,20 +1344,20 @@ static int pickit5_pdi_flash_write(const PROGRAMMER *pgm, const AVRPART *p,
0x9B, 0x09, 0xFF, // Set r09 to value 0xFF (Dummy Flash write value)
0x9C, 0x0A, page_size, (page_size >> 8), // Load word (page size) to r09
0x1E, 0x03, 0x04, // load byte from NVM Command register (r04)
0x1E, 0x03, 0x04, // Load byte from NVM Command register (r04)
0x6C, 0x0B, // Move temp_reg to r11
0x1E, 0x03, 0x05, // Load byte from NVM Data register (r05)
0x6C, 0x0C, // Move temp_reg to r12
0x60, 0x03, 0x01, // copy r01 to r03
0x60, 0x03, 0x01, // Copy r01 to r03
0x93, 0x03, page_size, (page_size >> 8), // Integer divide r03 by page size
0xAD, 0x03, // while (r03 --) {
0x1E, 0x06, 0x04, 0x07, // Load "load page command" to NVM Cmd Reg
0x1E, 0x09, 0x00, // Set pointer for indirect addressing to r00
0x1E, 0x10, 0x0A, // Set repeat counter to number in r09
0x1E, 0x0A, 0x0A, // read from data stream and send it to the device
0x1E, 0x0A, 0x0A, // Read from data stream and send it to the device
0x1E, 0x06, 0x04, 0x08, // Load "Erase and write flash page" command into NVM Cmd buffer
0x1E, 0x06, 0x00, 0x09, // Triger NVM Cmd by writing to the first address (r0, 0xFF)
0xA2, // Do {
@@ -1310,8 +1377,8 @@ static int pickit5_pdi_flash_write(const PROGRAMMER *pgm, const AVRPART *p,
unsigned char param[8];
pickit5_uint32_to_array(&param[0], addr);
pickit5_uint32_to_array(&param[4], len);
int rc = pickit5_download_data(pgm, flash_cmd, sizeof(flash_cmd), param, sizeof(param), value, len);
int rc = pickit5_download_data(pgm, p, flash_cmd, sizeof(flash_cmd), param, sizeof(param), value, len);
if(rc < 0)
rc = LIBAVRDUDE_EXIT;
return rc;
@@ -1379,7 +1446,7 @@ static int pickit5_write_array(const PROGRAMMER *pgm, const AVRPART *p,
pickit5_uint32_to_array(&param[0], addr);
pickit5_uint32_to_array(&param[4], len);
int rc = pickit5_download_data(pgm, write_bytes, write_bytes_len, param, 8, value, len);
int rc = pickit5_download_data(pgm, p, write_bytes, write_bytes_len, param, 8, value, len);
if(rc < 0) // Any error here means that a write fail occured, so restart
return LIBAVRDUDE_EXIT;
return len;
@@ -1474,7 +1541,7 @@ static int pickit5_read_array(const PROGRAMMER *pgm, const AVRPART *p,
pickit5_uint32_to_array(&param[0], addr);
pickit5_uint32_to_array(&param[4], len);
int rc = pickit5_upload_data(pgm, read_bytes, read_bytes_len, param, 8, value, len);
int rc = pickit5_upload_data(pgm, p, read_bytes, read_bytes_len, param, 8, value, len);
if(rc < 0) // Any error here means that a read fail occured, better restart
return LIBAVRDUDE_EXIT;
@@ -1497,7 +1564,7 @@ static int pickit5_read_dev_id(const PROGRAMMER *pgm, const AVRPART *p) {
if(my.rxBuf[17] == 0x0E) { // Errors figured out during 6 hours of failing to get it to work
if(my.rxBuf[16] == 0x10 || my.rxBuf[16] == 58) { // Serial/bootloader auto-reset circuit on Arduino board
pmsg_error("debugWIRE transmission error, aborting"
" (ensure reset has a pullup >= 10 kOhm and no cap)\n");
" (ensure reset has a pullup >= 10 kOhm and no capacitance)\n");
} else {
pmsg_error("%d\n", my.rxBuf[16]);
}
@@ -1508,16 +1575,16 @@ static int pickit5_read_dev_id(const PROGRAMMER *pgm, const AVRPART *p) {
0x1e, 0x45, 0x0C, // Send 0xF0 + reg and receive 2 bytes (found by trial and error)
0x9D, // Place word into status response
};
if(pickit5_send_script_cmd(pgm, get_sig, sizeof(get_sig), NULL, 0) >= 0) {
int rc = pickit5_send_script_cmd(pgm, get_sig, sizeof(get_sig), NULL, 0);
if(rc >= LIBAVRDUDE_SUCCESS) {
unsigned char len = my.rxBuf[20];
if(len == 0x02) { // if debugWIRE
my.devID[0] = 0x1E; // dW doesn't send the first byte, fill it in
my.devID[0] = 0x1E; // debugWIRE doesn't send the first byte, fill it in
my.devID[1] = my.rxBuf[25]; // Flip byte order
my.devID[2] = my.rxBuf[24];
return 0;
}
}
return -1;
return rc;
}
if(pickit5_send_script_cmd(pgm, read_id, read_id_len, NULL, 0) < 0)
@@ -1591,7 +1658,7 @@ static int pickit5_updi_write_cs_reg(const PROGRAMMER *pgm, unsigned int addr, u
return 1;
}
static int pickit5_updi_read_cs_reg(const PROGRAMMER *pgm, unsigned int addr, unsigned char *value) {
static int pickit5_updi_read_cs_reg(const PROGRAMMER *pgm, const AVRPART *p, unsigned int addr, unsigned char *value) {
pmsg_debug("%s(CS Addr: %u)\n", __func__, addr);
const unsigned char *read_cs = my.scripts.ReadCSreg;
unsigned int read_cs_len = my.scripts.ReadCSreg_len;
@@ -1604,7 +1671,7 @@ static int pickit5_updi_read_cs_reg(const PROGRAMMER *pgm, unsigned int addr, un
unsigned char buf[1];
buf[0] = addr;
int ret_val = pickit5_upload_data(pgm, read_cs, read_cs_len, buf, 1, value, 1);
int ret_val = pickit5_upload_data(pgm, p, read_cs, read_cs_len, buf, 1, value, 1);
switch(ret_val) {
case -1:
@@ -1643,10 +1710,11 @@ static void pickit5_dw_switch_to_isp(const PROGRAMMER *pgm, const AVRPART *p) {
static void pickit5_isp_switch_to_dw(const PROGRAMMER *pgm, const AVRPART *p) {
if(my.dW_switched_isp) {
// dW_switched_isp is set when accessing fuses where dW has to be switched to ISP
// we have to power cycle to switch back to dW so that the scripts work.
// For now, only support power-cycling through PICkit.
// Maybe in the future: monitor voltages and wait for voltage falling and rising
/* dW_switched_isp is set when accessing fuses where dW has to be switched to ISP
* we have to power cycle to switch back to dW so that the scripts work.
* For now, only support power-cycling through PICkit.
* Maybe in the future: monitor voltages and wait for voltage falling and rising
*/
if(my.power_source == POWER_SOURCE_INT) {
pickit5_program_disable(pgm, p);
pickit5_set_vtarget(pgm, 0.0); // Has a little delay already built in
@@ -1665,23 +1733,24 @@ static void pickit5_isp_switch_to_dw(const PROGRAMMER *pgm, const AVRPART *p) {
}
// Original Script only supports doing all three bytes at once,
// doing a custom script felt easier to integrate into avrdude,
// especially as we already have all the programming commands in the .conf file
/* Original Script only supports doing all three bytes at once,
* doing a custom script felt easier to integrate into avrdude,
* especially as we already have all the programming commands in the .conf file
*/
static int pickit5_isp_write_fuse(const PROGRAMMER *pgm, const AVRMEM *mem, unsigned char value) {
pmsg_debug("%s(offset: %i, val: %i)\n", __func__, mem->offset, value);
unsigned int cmd;
avr_set_bits(mem->op[AVR_OP_WRITE], (unsigned char*)&cmd);
avr_set_addr(mem->op[AVR_OP_WRITE], (unsigned char*)&cmd, mem_fuse_offset(mem));
avr_set_input(mem->op[AVR_OP_WRITE], (unsigned char*)&cmd, value);
avr_set_bits(mem->op[AVR_OP_WRITE], (unsigned char *)&cmd);
avr_set_addr(mem->op[AVR_OP_WRITE], (unsigned char *)&cmd, mem_fuse_offset(mem));
avr_set_input(mem->op[AVR_OP_WRITE], (unsigned char *)&cmd, value);
unsigned char write_fuse_isp [] = {
0x90, 0x00, 0x32, 0x00, 0x00, 0x00, // Load 0x32 to r00
0x1E, 0x37, 0x00, // Enable Programming?
0x9F, // Send status byte from temp_reg to host
0xA8, 0x00, 0x00, 0x00, 0x00, // ???
0x90, 0x01, (cmd >> 24), (cmd >> 16), (cmd >> 8), cmd, // load programming command to r01 (swapped bitorder)
0x90, 0x01, (cmd >> 24), (cmd >> 16), (cmd >> 8), cmd, // Load programming command to r01 (swapped bitorder)
0x1E, 0x34, 0x01, // Execute write command placed in r01
};
unsigned int write_fuse_isp_len = sizeof(write_fuse_isp);
@@ -1707,8 +1776,8 @@ static int pickit5_isp_write_fuse(const PROGRAMMER *pgm, const AVRMEM *mem, unsi
// Support slow AVRs without write status polling (won't affect performance)
int delay = mem->min_write_delay;
if (delay > 0)
usleep(delay);
if(delay > 0)
usleep(delay);
return 1;
}
@@ -1717,16 +1786,16 @@ static int pickit5_isp_read_fuse(const PROGRAMMER *pgm, const AVRMEM *mem, unsig
pmsg_debug("%s(offset: %i)\n", __func__, mem->offset);
unsigned int cmd;
avr_set_bits(mem->op[AVR_OP_READ], (unsigned char*)&cmd);
avr_set_addr(mem->op[AVR_OP_READ], (unsigned char*)&cmd, addr + mem->offset);
avr_set_bits(mem->op[AVR_OP_READ], (unsigned char *)&cmd);
avr_set_addr(mem->op[AVR_OP_READ], (unsigned char *)&cmd, addr + mem->offset);
unsigned char read_fuse_isp [] = { // As we pull the command from avrdude's conf file, this isn't limited to fuses
0x90, 0x00, 0x32, 0x00, 0x00, 0x00, // load 0x32 to r00
0x90, 0x00, 0x32, 0x00, 0x00, 0x00, // Load 0x32 to r00
0x1E, 0x37, 0x00, // Enable Programming?
0x9F, // Send status from temp_reg to host
0xA8, 0x00, 0x00, 0x00, 0x00, // ???
0x90, 0x01, (cmd >> 24), (cmd >> 16), (cmd >> 8), cmd, // load programming command to r01 (swapped bitorder)
0x90, 0x01, (cmd >> 24), (cmd >> 16), (cmd >> 8), cmd, // Load programming command to r01 (swapped bitorder)
0x9B, 0x02, 0x03, // Load 0x03 to r02
0x9B, 0x03, 0x00, // Load 0x00 to r03
0x1E, 0x35, 0x01, 0x02, 0x03, // Execute Command placed in r01
@@ -1756,10 +1825,11 @@ static int pickit5_isp_read_fuse(const PROGRAMMER *pgm, const AVRMEM *mem, unsig
return 1;
}
/* debugWIRE cannot write nor read fuses, have to change to ISP for that.
* Luckily, there is a custom script doing fuse access on ISP anyway,
* so no need to switch between script sets
*/
// debugWIRE cannot write nor read fuses, have to change to ISP for that.
// Luckily, there is a custom script doing fuse access on ISP anyway,
// so no need to switch between script sets
static int pickit5_dw_write_fuse(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, unsigned char value) {
pickit5_dw_switch_to_isp(pgm, p);
return pickit5_isp_write_fuse(pgm, mem, value);
@@ -1771,8 +1841,8 @@ static int pickit5_dw_read_fuse(const PROGRAMMER *pgm, const AVRPART *p, const A
}
// Gave JTAG also a custom script to make integration into avrdude
// easier. Also encodes all data in script itself instead of using paramters
// Gave JTAG also a custom script to make integration into avrdude easier.
// Also encodes all data in script itself instead of using paramters
static int pickit5_jtag_write_fuse(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, unsigned char value) {
pmsg_debug("%s(offset: %i, val: %i)\n", __func__, mem->offset, value);
unsigned char fuse_cmd = 0x33; // Value for lfuse
@@ -1793,7 +1863,7 @@ static int pickit5_jtag_write_fuse(const PROGRAMMER *pgm, const AVRPART *p, cons
0x9b, 0x02, 0x0F, // Set r02 to 0x0F
0x9b, 0x03, 0x05, // Set r03 to 0x05 (PROG_COMMANDS)
0x1e, 0x66, 0x03, // JTAG Write to Instruction Reg the value in r03
0x90, 0x04, 0x40, 0x23, 0x00, 0x00, // set r04 to 0x2340 (Enter Fuse Write)
0x90, 0x04, 0x40, 0x23, 0x00, 0x00, // Set r04 to 0x2340 (Enter Fuse Write)
0x1e, 0x67, 0x04, 0x02, // JTAG: Write to Data Reg the value in r04 with a length in r02(16)
0x1e, 0x67, 0x01, 0x02, // JTAG: Write to Data Reg the value in r01 with a length in r02(16)
@@ -1802,10 +1872,10 @@ static int pickit5_jtag_write_fuse(const PROGRAMMER *pgm, const AVRPART *p, cons
0x1e, 0x67, 0x00, 0x02, // JTAG: Write to Data Reg the value in r00 with a length in r02(16)
0x1e, 0x67, 0x00, 0x02, // JTAG: Write to Data Reg the value in r00 with a length in r02(16)
0xa2, // do
0xa2, // Do
0x1e, 0x6b, 0x07, 0x02, // JTAG: Write/read Data Reg the value in r07 with a length in r02(16)
0xa5, 0x00, 0x02, 0x00, 0x00, // while((temp_reg & 0x200) != 0x200)
0x00, 0x02, 0x00, 0x00, 0x0a, 0x00, //
0x00, 0x02, 0x00, 0x00, 0x0a, 0x00,
};
unsigned int write_fuse_isp_len = sizeof(write_fuse_jtag);
@@ -1851,14 +1921,15 @@ static int pickit5_jtag_read_fuse(const PROGRAMMER *pgm, const AVRPART *p, const
}
// TPI has an unified memory space, meaning that any memory (even SRAM)
// can be accessed by the same command, meaning that we don't need the
// decision tree found in the "read/write array" functions
/* TPI has an unified memory space, meaning that any memory (even SRAM)
* can be accessed by the same command, meaning that we don't need the
* decision tree found in the "read/write array" functions
*/
static int pickit5_tpi_write(const PROGRAMMER *pgm, const AVRPART *p,
const AVRMEM *mem, unsigned long addr, int len, unsigned char *value) {
pmsg_debug("%s(%s, addr: 0x%04x, offset: %i, len: %i)\n", __func__, mem->desc, (unsigned int) addr, mem->offset, len);
const unsigned char* write_bytes = my.scripts.WriteProgmem;
const unsigned char *write_bytes = my.scripts.WriteProgmem;
unsigned int write_bytes_len = my.scripts.WriteProgmem_len;
addr += mem->offset;
@@ -1867,7 +1938,7 @@ static int pickit5_tpi_write(const PROGRAMMER *pgm, const AVRPART *p,
pickit5_uint32_to_array(&buf[0], addr);
pickit5_uint32_to_array(&buf[4], len);
int rc = pickit5_download_data(pgm, write_bytes, write_bytes_len, buf, 8, value, len);
int rc = pickit5_download_data(pgm, p, write_bytes, write_bytes_len, buf, 8, value, len);
return rc < 0? -1: len;
}
@@ -1876,21 +1947,21 @@ static int pickit5_tpi_read(const PROGRAMMER *pgm, const AVRPART *p,
const AVRMEM *mem, unsigned long addr, int len, unsigned char *value) {
pmsg_debug("%s(%s, addr: 0x%04x, offset: %i, len: %i)\n", __func__, mem->desc, (unsigned int) addr, mem->offset, len);
const unsigned char* read_bytes = my.scripts.ReadProgmem;
const unsigned char *read_bytes = my.scripts.ReadProgmem;
unsigned int read_bytes_len = my.scripts.ReadProgmem_len;
addr += mem->offset;
unsigned char buf[8];
pickit5_uint32_to_array(&buf[0], addr);
pickit5_uint32_to_array(&buf[4], len);
int rc = pickit5_upload_data(pgm, read_bytes, read_bytes_len, buf, 8, value, len);
int rc = pickit5_upload_data(pgm, p, read_bytes, read_bytes_len, buf, 8, value, len);
return rc < 0? -1: len;
}
// There are often multiple memories located in prodsig, we try to read it once
// and handle all further requests through a buffer.
// There are often multiple memories located in prodsig, we try to read it once.
// Handle all further requests through a buffer as it doesn't change.
static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
const AVRMEM *mem, unsigned long addr, int len, unsigned char *value) {
pmsg_debug("%s(%s, addr: 0x%04x, offset: %i, len: %i)\n", __func__, mem->desc, (unsigned int) addr, mem->offset, len);
@@ -1904,7 +1975,7 @@ static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
return 0; // Requested memory not in prodsig, try again in read_array
}
int max_mem_len = sizeof(my.prodsig); // Current devices have not more than 128 bytes
int max_mem_len = sizeof(my.prodsig); // Current devices have less then 128 bytes
unsigned mem_len = (prodsig->size < max_mem_len)? prodsig->size: max_mem_len;
if((addr + len) > mem_len) {
@@ -1919,7 +1990,7 @@ static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
unsigned char param_buf[8];
pickit5_uint32_to_array(&param_buf[0], prodsig->offset);
pickit5_uint32_to_array(&param_buf[4], mem_len);
rc = pickit5_upload_data(pgm, my.scripts.ReadConfigmem, my.scripts.ReadConfigmem_len, param_buf, 8, my.prodsig, mem_len);
rc = pickit5_upload_data(pgm, p, my.scripts.ReadConfigmem, my.scripts.ReadConfigmem_len, param_buf, 8, my.prodsig, mem_len);
} else if(mem->op[AVR_OP_READ] != NULL) {
if(both_jtag(pgm, p)) {
const unsigned char read_prodsigmem_jtag [] = {
@@ -1940,10 +2011,10 @@ static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
0x92, 0x00, 0x01, 0x00, 0x00, 0x00, // Increase address (r00) by 1
0xA4, // End of for loop
};
rc = pickit5_upload_data(pgm, read_prodsigmem_jtag, sizeof(read_prodsigmem_jtag), NULL, 0, my.prodsig, mem_len);
rc = pickit5_upload_data(pgm, p, read_prodsigmem_jtag, sizeof(read_prodsigmem_jtag), NULL, 0, my.prodsig, mem_len);
} else if(is_isp(pgm)) {
// Ok, this one is tricky due to the lsb being on another position compared to the rest,
// The solution is to read two bytes in one while loop and toggle the LSB
// Ok, this one is tricky due to the LSB being on another position compared to the rest,
// The solution is to read two bytes in one while-loop and toggle the LSB
const unsigned char read_prodsig_isp [] = {
0x90, 0x00, 0x32, 0x00, 0x00, 0x00, // Load 0x32 to r00
0x90, 0x01, 0x00, 0x00, 0x00, 0x30, // Load programming command to r01 (the same on all)
@@ -1960,7 +2031,7 @@ static int pickit5_read_prodsig(const PROGRAMMER *pgm, const AVRPART *p,
0x92, 0x01, 0x00, 0x01, 0x00, 0x00, // Increase address by "2"
0xA4, // End of for loop
};
rc = pickit5_upload_data(pgm, read_prodsig_isp, sizeof(read_prodsig_isp), NULL, 0, my.prodsig, mem_len);
rc = pickit5_upload_data(pgm, p, read_prodsig_isp, sizeof(read_prodsig_isp), NULL, 0, my.prodsig, mem_len);
} else { // debugWIRE
return 0;
}
@@ -2074,7 +2145,7 @@ static int pickit5_get_vtarget(const PROGRAMMER *pgm, double *v) {
return 0;
}
static int pickit5_set_ptg_mode(const PROGRAMMER *pgm) {
static int pickit5_set_ptg_mode(const PROGRAMMER *pgm, const AVRPART *p) {
if(!can_do_ptg(pgm)) // Don't bother if Programmer doesn't support PTG
return 0;
@@ -2085,20 +2156,22 @@ static int pickit5_set_ptg_mode(const PROGRAMMER *pgm) {
pmsg_debug("%s()\n", __func__);
if(pickit5_upload_data(pgm, ptg_mode, 5, NULL, 0, buf, 4))
if(pickit5_upload_data(pgm, p, ptg_mode, 5, NULL, 0, buf, 4))
return -1;
return 0;
}
/*
* Found sw reset command in basic firmware switcher.
* other commands are
* Enter Boot Mode: 0xEB
* jump to app: 0xEC
* erase flash: 0xE2
* erase application: 0xFA
* write page: 0xE3
* read crc32: 0x5E
*/
// Found sw reset command in basic firmware switcher.
// other commands are
// Enter Boot Mode: 0xEB
// jump to app: 0xEC
// erase flash: 0xE2
// erase application: 0xFA
// write page: 0xE3
// read crc32: 0x5E
/* currently unused, thus uncommented, but maybe useful in the future
static int pickit5_software_reset(const PROGRAMMER *pgm) {
unsigned char sw_reset[] = {

View File

@@ -1,5 +1,5 @@
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
*/
/*
@@ -91,7 +91,7 @@ struct avr_script_lut {
};
typedef struct avr_script_lut SCRIPT;
const unsigned char * get_devid_script_by_nvm_ver(unsigned char version);
const unsigned char *get_devid_script_by_nvm_ver(unsigned char version);
int get_pickit_dw_script(SCRIPT *scr, const char *partdesc);
int get_pickit_isp_script(SCRIPT *scr, const char *partdesc);
int get_pickit_jtag_script(SCRIPT *scr, const char *partdesc);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
*/
/*
@@ -26,388 +26,388 @@
#include "pickit5_lut.h"
const unsigned char EnterProgMode_pdi_0[121] = {
0x9b, 0x00, 0x06, 0x9b, 0x01, 0x00, 0x1e, 0x01, 0x00, 0x01, 0x9b, 0x01, 0x00, 0x9b, 0x02, 0xfd,
0x1e, 0x0f, 0x01, 0x02, 0x9b, 0x01, 0x00, 0xa2, 0x1e, 0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x9b, 0x01, 0x01, 0x9b, 0x02, 0x59, 0x1e, 0x0f, 0x01, 0x02,
0x9b, 0x01, 0x00, 0x65, 0xff, 0x88, 0xd8, 0xcd, 0x04, 0x65, 0x45, 0xab, 0x89, 0x12, 0x04, 0x1e,
0x11, 0x01, 0x9b, 0x01, 0x00, 0x1e, 0x0e, 0x01, 0x6c, 0x02, 0x66, 0x02, 0xf9, 0x00, 0x00, 0x00,
0x90, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x03, 0x70, 0x00, 0x9b, 0x01, 0x00, 0xa2, 0x1e,
0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x03, 0xfb, 0x78, 0x00,
0x90, 0x01, 0x00, 0x01, 0x00, 0x00, 0x7f, 0x01, 0x5a,
const unsigned char EnterProgMode_pdi_0[121] = {
0x9b, 0x00, 0x06, 0x9b, 0x01, 0x00, 0x1e, 0x01, 0x00, 0x01, 0x9b, 0x01, 0x00, 0x9b, 0x02, 0xfd,
0x1e, 0x0f, 0x01, 0x02, 0x9b, 0x01, 0x00, 0xa2, 0x1e, 0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x9b, 0x01, 0x01, 0x9b, 0x02, 0x59, 0x1e, 0x0f, 0x01, 0x02,
0x9b, 0x01, 0x00, 0x65, 0xff, 0x88, 0xd8, 0xcd, 0x04, 0x65, 0x45, 0xab, 0x89, 0x12, 0x04, 0x1e,
0x11, 0x01, 0x9b, 0x01, 0x00, 0x1e, 0x0e, 0x01, 0x6c, 0x02, 0x66, 0x02, 0xf9, 0x00, 0x00, 0x00,
0x90, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x02, 0x03, 0x70, 0x00, 0x9b, 0x01, 0x00, 0xa2, 0x1e,
0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xe8, 0x03, 0xfb, 0x78, 0x00,
0x90, 0x01, 0x00, 0x01, 0x00, 0x00, 0x7f, 0x01, 0x5a,
};
const unsigned char ExitProgMode_pdi_0[40] = {
0x9b, 0x01, 0x01, 0x9b, 0x02, 0x00, 0x1e, 0x0f, 0x01, 0x02, 0x9b, 0x01, 0x00, 0x9b, 0x02, 0x00,
0x1e, 0x0f, 0x01, 0x02, 0x9b, 0x01, 0x00, 0xa2, 0x1e, 0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x1e, 0x02,
const unsigned char ExitProgMode_pdi_0[40] = {
0x9b, 0x01, 0x01, 0x9b, 0x02, 0x00, 0x1e, 0x0f, 0x01, 0x02, 0x9b, 0x01, 0x00, 0x9b, 0x02, 0x00,
0x1e, 0x0f, 0x01, 0x02, 0x9b, 0x01, 0x00, 0xa2, 0x1e, 0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x1e, 0x02,
};
const unsigned char SetSpeed_pdi_0[5] = {
0x91, 0x00, 0x1e, 0x14, 0x00,
const unsigned char SetSpeed_pdi_0[5] = {
0x91, 0x00, 0x1e, 0x14, 0x00,
};
const unsigned char GetDeviceID_pdi_0[104] = {
0x95, 0x90, 0x01, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x90,
0x03, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x03, 0x6c, 0x0a, 0x90, 0x03, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x03, 0x03, 0x6c, 0x0b, 0x90, 0x00, 0x90, 0x00, 0x00, 0x01, 0x1e, 0x09, 0x00, 0x9c, 0x01,
0x03, 0x00, 0x1e, 0x10, 0x01, 0x9b, 0x02, 0x03, 0x1e, 0x0c, 0x02, 0x90, 0x02, 0x93, 0x00, 0x00,
0x01, 0x1e, 0x03, 0x02, 0x9f, 0x90, 0x01, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00,
0x00, 0x67, 0x00, 0x90, 0x03, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x03, 0x0a, 0x90, 0x03, 0xc4,
0x01, 0x00, 0x01, 0x1e, 0x06, 0x03, 0x0b, 0x5a,
const unsigned char GetDeviceID_pdi_0[104] = {
0x95, 0x90, 0x01, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x90,
0x03, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x03, 0x6c, 0x0a, 0x90, 0x03, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x03, 0x03, 0x6c, 0x0b, 0x90, 0x00, 0x90, 0x00, 0x00, 0x01, 0x1e, 0x09, 0x00, 0x9c, 0x01,
0x03, 0x00, 0x1e, 0x10, 0x01, 0x9b, 0x02, 0x03, 0x1e, 0x0c, 0x02, 0x90, 0x02, 0x93, 0x00, 0x00,
0x01, 0x1e, 0x03, 0x02, 0x9f, 0x90, 0x01, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00,
0x00, 0x67, 0x00, 0x90, 0x03, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x03, 0x0a, 0x90, 0x03, 0xc4,
0x01, 0x00, 0x01, 0x1e, 0x06, 0x03, 0x0b, 0x5a,
};
const unsigned char EraseChip_pdi_0[99] = {
0x90, 0x01, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x01, 0x6c, 0x05, 0x90, 0x01, 0xca, 0x01, 0x00,
0x01, 0x90, 0x02, 0x40, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x01, 0x02, 0x90, 0x01, 0xcb, 0x01, 0x00,
0x01, 0x90, 0x02, 0x01, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x01, 0x02, 0x90, 0x01, 0x00, 0x00, 0x00,
0x00, 0xa2, 0x1e, 0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xd0, 0x07,
0x94, 0x0a, 0x00, 0x90, 0x01, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x01, 0xa5, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x01, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06,
0x01, 0x05, 0x5a,
const unsigned char EraseChip_pdi_0[99] = {
0x90, 0x01, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x01, 0x6c, 0x05, 0x90, 0x01, 0xca, 0x01, 0x00,
0x01, 0x90, 0x02, 0x40, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x01, 0x02, 0x90, 0x01, 0xcb, 0x01, 0x00,
0x01, 0x90, 0x02, 0x01, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x01, 0x02, 0x90, 0x01, 0x00, 0x00, 0x00,
0x00, 0xa2, 0x1e, 0x0e, 0x01, 0xa5, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xd0, 0x07,
0x94, 0x0a, 0x00, 0x90, 0x01, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x01, 0xa5, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x01, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06,
0x01, 0x05, 0x5a,
};
const unsigned char WriteProgmem_pdi_0[172] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0b, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04,
0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00,
0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x06, 0x06, 0x0b, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteProgmem_pdi_0[172] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0b, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04,
0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00,
0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x06, 0x06, 0x0b, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char WriteProgmem_pdi_1[172] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0b, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04,
0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00,
0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x06, 0x06, 0x0b, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteProgmem_pdi_1[172] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0b, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04,
0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00,
0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x06, 0x06, 0x0b, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char WriteProgmem_pdi_2[172] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0b, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04,
0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00,
0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x06, 0x06, 0x0b, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteProgmem_pdi_2[172] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0b, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04,
0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x25, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00,
0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01,
0x1e, 0x06, 0x06, 0x0b, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char ReadProgmem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadProgmem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadProgmem_pdi_1[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadProgmem_pdi_1[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadProgmem_pdi_2[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadProgmem_pdi_2[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char WriteBootMem_pdi_0[130] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00,
0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04,
0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04,
0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b,
0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00,
0xae, 0x5a,
const unsigned char WriteBootMem_pdi_0[130] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00,
0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04,
0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04,
0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b,
0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00,
0xae, 0x5a,
};
const unsigned char WriteBootMem_pdi_1[130] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00,
0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04,
0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04,
0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b,
0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00,
0xae, 0x5a,
const unsigned char WriteBootMem_pdi_1[130] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00,
0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04,
0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04,
0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b,
0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00,
0xae, 0x5a,
};
const unsigned char WriteBootMem_pdi_2[130] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00,
0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04,
0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04,
0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b,
0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00,
0xae, 0x5a,
const unsigned char WriteBootMem_pdi_2[130] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00,
0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04,
0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04,
0x00, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b,
0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00,
0xae, 0x5a,
};
const unsigned char ReadBootMem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadBootMem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadBootMem_pdi_1[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadBootMem_pdi_1[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadBootMem_pdi_2[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadBootMem_pdi_2[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char WriteDataEEmem_pdi_0[334] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x20, 0x00, 0xad, 0x03, 0x90, 0x05, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x05, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x00, 0x90, 0x09, 0xcc, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x09, 0x6c, 0x05, 0x6c, 0x0a, 0x66, 0x05, 0x08, 0x00, 0x00, 0x00, 0xfe, 0x05,
0x00, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x60, 0x05, 0x0a, 0x66, 0x05, 0xf7, 0xff, 0xff, 0xff, 0x1e,
0x06, 0x09, 0x05, 0xac, 0x02, 0x00, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x36, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x05, 0x06, 0x90, 0x05, 0xcb, 0x01, 0x00, 0x01, 0x90, 0x06, 0x01, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x05, 0x06, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x33, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x05, 0x06, 0x90, 0x08, 0x00, 0x00, 0x8c, 0x00, 0x1e, 0x09, 0x08, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x90, 0x06, 0x01, 0x00, 0x00, 0x00, 0x1e, 0x0a, 0x06, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x35, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09,
0x08, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf,
0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x64, 0x00, 0xa4, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x36, 0x00, 0x00, 0x00, 0x1e,
0x06, 0x05, 0x06, 0x90, 0x05, 0xcb, 0x01, 0x00, 0x01, 0x90, 0x06, 0x01, 0x00, 0x00, 0x00, 0x1e,
0x06, 0x05, 0x06, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x33, 0x00, 0x00, 0x00, 0x1e,
0x06, 0x05, 0x06, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x20, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04,
0x90, 0x05, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x05, 0x00, 0x00, 0x00, 0x00, 0x46, 0x01, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x34, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09,
0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf,
0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x64, 0x00, 0x1e, 0x06, 0x09, 0x0a, 0x92, 0x00, 0x20, 0x00, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteDataEEmem_pdi_0[334] = {
0x91, 0x00, 0x91, 0x01, 0x60, 0x03, 0x01, 0x93, 0x03, 0x20, 0x00, 0xad, 0x03, 0x90, 0x05, 0xc0,
0x01, 0x00, 0x00, 0xfe, 0x05, 0x00, 0x00, 0x00, 0x00, 0xf3, 0x00, 0x90, 0x09, 0xcc, 0x01, 0x00,
0x01, 0x1e, 0x03, 0x09, 0x6c, 0x05, 0x6c, 0x0a, 0x66, 0x05, 0x08, 0x00, 0x00, 0x00, 0xfe, 0x05,
0x00, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x60, 0x05, 0x0a, 0x66, 0x05, 0xf7, 0xff, 0xff, 0xff, 0x1e,
0x06, 0x09, 0x05, 0xac, 0x02, 0x00, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x36, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x05, 0x06, 0x90, 0x05, 0xcb, 0x01, 0x00, 0x01, 0x90, 0x06, 0x01, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x05, 0x06, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x33, 0x00,
0x00, 0x00, 0x1e, 0x06, 0x05, 0x06, 0x90, 0x08, 0x00, 0x00, 0x8c, 0x00, 0x1e, 0x09, 0x08, 0x65,
0xff, 0x00, 0x00, 0x00, 0x01, 0x90, 0x06, 0x01, 0x00, 0x00, 0x00, 0x1e, 0x0a, 0x06, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x35, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09,
0x08, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf,
0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x64, 0x00, 0xa4, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x36, 0x00, 0x00, 0x00, 0x1e,
0x06, 0x05, 0x06, 0x90, 0x05, 0xcb, 0x01, 0x00, 0x01, 0x90, 0x06, 0x01, 0x00, 0x00, 0x00, 0x1e,
0x06, 0x05, 0x06, 0x90, 0x05, 0xca, 0x01, 0x00, 0x01, 0x90, 0x06, 0x33, 0x00, 0x00, 0x00, 0x1e,
0x06, 0x05, 0x06, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x20, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04,
0x90, 0x05, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x05, 0x00, 0x00, 0x00, 0x00, 0x46, 0x01, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x34, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09,
0x00, 0x65, 0xff, 0x00, 0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf,
0x01, 0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x64, 0x00, 0x1e, 0x06, 0x09, 0x0a, 0x92, 0x00, 0x20, 0x00, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char ReadDataEEmem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x20, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x06, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x20, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x20, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadDataEEmem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x20, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x06, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x20, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x20, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char WriteConfigmem_pdi_0[89] = {
0x91, 0x00, 0x91, 0x01, 0xfe, 0x00, 0x27, 0x00, 0x8f, 0x00, 0x15, 0x00, 0x90, 0x07, 0x4c, 0x00,
0x00, 0x00, 0xfb, 0x1b, 0x00, 0x90, 0x07, 0x08, 0x00, 0x00, 0x00, 0xaf, 0xad, 0x01, 0x90, 0x02,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x90, 0x02, 0xca, 0x01,
0x00, 0x01, 0x1e, 0x06, 0x02, 0x07, 0x99, 0x04, 0x1e, 0x06, 0x00, 0x04, 0x90, 0x06, 0xcf, 0x01,
0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64,
0x00, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteConfigmem_pdi_0[89] = {
0x91, 0x00, 0x91, 0x01, 0xfe, 0x00, 0x27, 0x00, 0x8f, 0x00, 0x15, 0x00, 0x90, 0x07, 0x4c, 0x00,
0x00, 0x00, 0xfb, 0x1b, 0x00, 0x90, 0x07, 0x08, 0x00, 0x00, 0x00, 0xaf, 0xad, 0x01, 0x90, 0x02,
0xc0, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x90, 0x02, 0xca, 0x01,
0x00, 0x01, 0x1e, 0x06, 0x02, 0x07, 0x99, 0x04, 0x1e, 0x06, 0x00, 0x04, 0x90, 0x06, 0xcf, 0x01,
0x00, 0x01, 0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64,
0x00, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char WriteConfigmemFuse_pdi_0[71] = {
0x91, 0x00, 0x91, 0x01, 0xad, 0x01, 0x90, 0x02, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
0x00, 0x00, 0x24, 0x00, 0x90, 0x02, 0xca, 0x01, 0x00, 0x01, 0x90, 0x03, 0x4c, 0x00, 0x00, 0x00,
0x1e, 0x06, 0x02, 0x03, 0x99, 0x04, 0x1e, 0x06, 0x00, 0x04, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01,
0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92,
0x00, 0x01, 0x00, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteConfigmemFuse_pdi_0[71] = {
0x91, 0x00, 0x91, 0x01, 0xad, 0x01, 0x90, 0x02, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
0x00, 0x00, 0x24, 0x00, 0x90, 0x02, 0xca, 0x01, 0x00, 0x01, 0x90, 0x03, 0x4c, 0x00, 0x00, 0x00,
0x1e, 0x06, 0x02, 0x03, 0x99, 0x04, 0x1e, 0x06, 0x00, 0x04, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01,
0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92,
0x00, 0x01, 0x00, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char WriteConfigmemLock_pdi_0[71] = {
0x91, 0x00, 0x91, 0x01, 0xad, 0x01, 0x90, 0x02, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
0x00, 0x00, 0x24, 0x00, 0x90, 0x02, 0xca, 0x01, 0x00, 0x01, 0x90, 0x03, 0x08, 0x00, 0x00, 0x00,
0x1e, 0x06, 0x02, 0x03, 0x99, 0x04, 0x1e, 0x06, 0x00, 0x04, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01,
0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92,
0x00, 0x01, 0x00, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteConfigmemLock_pdi_0[71] = {
0x91, 0x00, 0x91, 0x01, 0xad, 0x01, 0x90, 0x02, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x02, 0x00, 0x00,
0x00, 0x00, 0x24, 0x00, 0x90, 0x02, 0xca, 0x01, 0x00, 0x01, 0x90, 0x03, 0x08, 0x00, 0x00, 0x00,
0x1e, 0x06, 0x02, 0x03, 0x99, 0x04, 0x1e, 0x06, 0x00, 0x04, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01,
0xa2, 0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92,
0x00, 0x01, 0x00, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char ReadConfigmem_pdi_0[106] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x69, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x01, 0x1e, 0x0c, 0x01, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90,
0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadConfigmem_pdi_0[106] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x69, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x01, 0x1e, 0x0c, 0x01, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90,
0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadConfigmemFuse_pdi_0[106] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x69, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x01, 0x1e, 0x0c, 0x01, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90,
0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadConfigmemFuse_pdi_0[106] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x69, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x01, 0x1e, 0x0c, 0x01, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90,
0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadConfigmemLock_pdi_0[106] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x69, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x01, 0x1e, 0x0c, 0x01, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90,
0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadConfigmemLock_pdi_0[106] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x69, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x04, 0xca, 0x01,
0x00, 0x01, 0x90, 0x05, 0x07, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x01, 0x1e, 0x0c, 0x01, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90,
0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char WriteIDmem_pdi_0[198] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x04, 0x6c, 0x0a, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x90,
0x05, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x05, 0x90, 0x04, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x04, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x04, 0x0a, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x02, 0xad,
0x03, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e,
0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01,
0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01,
0x90, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00,
0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00,
0x00, 0x02, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteIDmem_pdi_0[198] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x04, 0x6c, 0x0a, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x90,
0x05, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x05, 0x90, 0x04, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x04, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x04, 0x0a, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x02, 0xad,
0x03, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e,
0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01,
0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01,
0x90, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00,
0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00,
0x00, 0x02, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char WriteIDmem_pdi_1[198] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x04, 0x6c, 0x0a, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x90,
0x05, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x05, 0x90, 0x04, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x04, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x04, 0x0a, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x01, 0xad,
0x03, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e,
0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01,
0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01,
0x90, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00,
0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00,
0x00, 0x01, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteIDmem_pdi_1[198] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x04, 0x6c, 0x0a, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x90,
0x05, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x05, 0x90, 0x04, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x04, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x04, 0x0a, 0x60, 0x03, 0x01, 0x93, 0x03, 0x00, 0x01, 0xad,
0x03, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e,
0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01,
0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01,
0x90, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00,
0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00,
0x00, 0x01, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char WriteIDmem_pdi_2[198] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x04, 0x6c, 0x0a, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x90,
0x05, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x05, 0x90, 0x04, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x04, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x04, 0x0a, 0x60, 0x03, 0x01, 0x93, 0x03, 0x80, 0x00, 0xad,
0x03, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e,
0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01,
0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01,
0x90, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00,
0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00,
0x80, 0x00, 0x00, 0x00, 0xae, 0x5a,
const unsigned char WriteIDmem_pdi_2[198] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x04, 0x6c, 0x0a, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x18, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x90,
0x05, 0x55, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x00, 0x05, 0x90, 0x04, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x04, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x90, 0x04,
0xca, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x04, 0x0a, 0x60, 0x03, 0x01, 0x93, 0x03, 0x80, 0x00, 0xad,
0x03, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x90,
0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x23, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e,
0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x90, 0x04, 0xc0, 0x01,
0x00, 0x00, 0xfe, 0x04, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01,
0x90, 0x05, 0x1a, 0x00, 0x00, 0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x65, 0xff, 0x00,
0x00, 0x00, 0x01, 0x9b, 0x06, 0x01, 0x1e, 0x0a, 0x06, 0x90, 0x06, 0xcf, 0x01, 0x00, 0x01, 0xa2,
0x1e, 0x03, 0x06, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x92, 0x00,
0x80, 0x00, 0x00, 0x00, 0xae, 0x5a,
};
const unsigned char ReadIDmem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadIDmem_pdi_0[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x02, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x02, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x02, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadIDmem_pdi_1[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadIDmem_pdi_1[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x00, 0x01, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x00, 0x01, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x00, 0x01, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char ReadIDmem_pdi_2[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
const unsigned char ReadIDmem_pdi_2[126] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x7d, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x60, 0x03, 0x01, 0x93,
0x03, 0x80, 0x00, 0xad, 0x03, 0x90, 0x04, 0xca, 0x01, 0x00, 0x01, 0x90, 0x05, 0x43, 0x00, 0x00,
0x00, 0x1e, 0x06, 0x04, 0x05, 0x1e, 0x09, 0x00, 0x9c, 0x04, 0x80, 0x00, 0x1e, 0x10, 0x04, 0x1e,
0x0c, 0x04, 0x92, 0x00, 0x80, 0x00, 0x00, 0x00, 0xae, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e,
0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0b, 0x5a,
};
const unsigned char WriteCSreg_pdi_0[8] = {
0x99, 0x00, 0x99, 0x01, 0x1e, 0x0f, 0x00, 0x01,
const unsigned char WriteCSreg_pdi_0[8] = {
0x99, 0x00, 0x99, 0x01, 0x1e, 0x0f, 0x00, 0x01,
};
const unsigned char ReadCSreg_pdi_0[6] = {
0x99, 0x00, 0x1e, 0x0e, 0x00, 0x9f,
const unsigned char ReadCSreg_pdi_0[6] = {
0x99, 0x00, 0x1e, 0x0e, 0x00, 0x9f,
};
const unsigned char WriteMem8_pdi_0[70] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x07, 0x00, 0x00, 0x00, 0x00, 0x90, 0x03, 0x00, 0x00, 0x01, 0x00,
0xfa, 0x01, 0x03, 0x1b, 0x00, 0x60, 0x04, 0x01, 0xfb, 0x21, 0x00, 0x90, 0x04, 0x00, 0x00, 0x01,
0x00, 0x6a, 0x01, 0x04, 0x90, 0x02, 0xca, 0x01, 0x00, 0x01, 0x90, 0x03, 0x00, 0x00, 0x00, 0x00,
0x1e, 0x06, 0x02, 0x03, 0x1e, 0x09, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x6e, 0x00, 0x04,
0xfc, 0x01, 0x07, 0x0a, 0x00, 0x5a,
const unsigned char WriteMem8_pdi_0[70] = {
0x91, 0x00, 0x91, 0x01, 0x90, 0x07, 0x00, 0x00, 0x00, 0x00, 0x90, 0x03, 0x00, 0x00, 0x01, 0x00,
0xfa, 0x01, 0x03, 0x1b, 0x00, 0x60, 0x04, 0x01, 0xfb, 0x21, 0x00, 0x90, 0x04, 0x00, 0x00, 0x01,
0x00, 0x6a, 0x01, 0x04, 0x90, 0x02, 0xca, 0x01, 0x00, 0x01, 0x90, 0x03, 0x00, 0x00, 0x00, 0x00,
0x1e, 0x06, 0x02, 0x03, 0x1e, 0x09, 0x00, 0x1e, 0x10, 0x04, 0x1e, 0x0a, 0x04, 0x6e, 0x00, 0x04,
0xfc, 0x01, 0x07, 0x0a, 0x00, 0x5a,
};
const unsigned char ReadMem8_pdi_0[130] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x81, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x07, 0x00, 0x00,
0x00, 0x00, 0x90, 0x03, 0x00, 0x00, 0x01, 0x00, 0xfa, 0x01, 0x03, 0x53, 0x00, 0x60, 0x04, 0x01,
0xfb, 0x59, 0x00, 0x90, 0x04, 0x00, 0x00, 0x01, 0x00, 0x6a, 0x01, 0x04, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x04, 0x1e, 0x0c, 0x04, 0x6e, 0x00, 0x04, 0xfc, 0x01, 0x07, 0x42, 0x00, 0x90, 0x06, 0xca,
0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06,
0x0b, 0x5a,
const unsigned char ReadMem8_pdi_0[130] = {
0x91, 0x00, 0x91, 0x01, 0x95, 0x90, 0x04, 0xc0, 0x01, 0x00, 0x00, 0x90, 0x05, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x04, 0x05, 0x26, 0x00, 0xad, 0x01, 0x1e, 0x03, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0xae, 0xfb, 0x81, 0x00, 0x90, 0x06, 0xca, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c,
0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x03, 0x06, 0x6c, 0x0b, 0x90, 0x07, 0x00, 0x00,
0x00, 0x00, 0x90, 0x03, 0x00, 0x00, 0x01, 0x00, 0xfa, 0x01, 0x03, 0x53, 0x00, 0x60, 0x04, 0x01,
0xfb, 0x59, 0x00, 0x90, 0x04, 0x00, 0x00, 0x01, 0x00, 0x6a, 0x01, 0x04, 0x1e, 0x09, 0x00, 0x1e,
0x10, 0x04, 0x1e, 0x0c, 0x04, 0x6e, 0x00, 0x04, 0xfc, 0x01, 0x07, 0x42, 0x00, 0x90, 0x06, 0xca,
0x01, 0x00, 0x01, 0x1e, 0x06, 0x06, 0x0a, 0x90, 0x06, 0xc4, 0x01, 0x00, 0x01, 0x1e, 0x06, 0x06,
0x0b, 0x5a,
};
@@ -455,7 +455,7 @@ static void pickit_pdi_script_init(SCRIPT *scr) {
}
const char * const pickit5_pdi_chip_lut[] = {
const char * const pickit5_pdi_chip_lut[] = {
"ATxmega128A1", "ATxmega128A1U", "ATxmega128A3", "ATxmega128A3U", "ATxmega128A4U", "ATxmega16A4", "ATxmega16A4U", "ATxmega192A3",
"ATxmega192A3U", "ATxmega256A3", "ATxmega256A3B", "ATxmega256A3BU", "ATxmega256A3U", "ATxmega32A4", "ATxmega32A4U", "ATxmega64A1",
"ATxmega64A1U", "ATxmega64A3", "ATxmega64A3U", "ATxmega64A4U", "ATxmega128B1", "ATxmega128B3", "ATxmega64B1", "ATxmega64B3",
@@ -464,22 +464,22 @@ const char * const pickit5_pdi_chip_lut[] = {
"ATxmega64D3", "ATxmega64D4", "ATxmega16E5", "ATxmega32E5", "ATxmega8E5",
};
int get_pickit_pdi_script(SCRIPT *scr, const char* partdesc) {
if ((scr == NULL) || (partdesc == NULL)) {
int get_pickit_pdi_script(SCRIPT *scr, const char *partdesc) {
if((scr == NULL) || (partdesc == NULL)) {
return -1;
}
int namepos = -1;
for (int i = 0; i < 45; i++) {
if (strcmp(pickit5_pdi_chip_lut[i], partdesc) == 0) {
for(int i = 0; i < 45; i++) {
if(strcmp(pickit5_pdi_chip_lut[i], partdesc) == 0) {
namepos = i;
break;
}
}
if (namepos == -1) {
if(namepos == -1) {
return -2;
}
pickit_pdi_script_init(scr); // load common functions
pickit_pdi_script_init(scr); // Load common functions
switch (namepos) {
case 0: /* ATxmega128A1 */

View File

@@ -1,5 +1,5 @@
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
*/
/*
@@ -26,93 +26,93 @@
#include "pickit5_lut.h"
const unsigned char EnterProgMode_tpi_0[63] = {
0x9b, 0x00, 0x01, 0x1e, 0x20, 0x00, 0x9b, 0x00, 0x0f, 0x1e, 0x27, 0x00, 0x9b, 0x00, 0x02, 0x1e,
0x27, 0x00, 0x9b, 0x00, 0x02, 0x9b, 0x01, 0x04, 0x1e, 0x28, 0x00, 0x01, 0x6c, 0x02, 0x1e, 0x27,
0x02, 0x1e, 0x29, 0x45, 0xab, 0x89, 0x12, 0xff, 0x88, 0xd8, 0xcd, 0x9b, 0x00, 0x00, 0xa2, 0x1e,
0x27, 0x00, 0x6c, 0x02, 0xa5, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00,
const unsigned char EnterProgMode_tpi_0[63] = {
0x9b, 0x00, 0x01, 0x1e, 0x20, 0x00, 0x9b, 0x00, 0x0f, 0x1e, 0x27, 0x00, 0x9b, 0x00, 0x02, 0x1e,
0x27, 0x00, 0x9b, 0x00, 0x02, 0x9b, 0x01, 0x04, 0x1e, 0x28, 0x00, 0x01, 0x6c, 0x02, 0x1e, 0x27,
0x02, 0x1e, 0x29, 0x45, 0xab, 0x89, 0x12, 0xff, 0x88, 0xd8, 0xcd, 0x9b, 0x00, 0x00, 0xa2, 0x1e,
0x27, 0x00, 0x6c, 0x02, 0xa5, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00,
};
const unsigned char ExitProgMode_tpi_0[18] = {
0x9b, 0x00, 0x00, 0x9b, 0x01, 0x00, 0x1e, 0x28, 0x00, 0x01, 0x9b, 0x00, 0x00, 0x1e, 0x27, 0x00,
0x1e, 0x21,
const unsigned char ExitProgMode_tpi_0[18] = {
0x9b, 0x00, 0x00, 0x9b, 0x01, 0x00, 0x1e, 0x28, 0x00, 0x01, 0x9b, 0x00, 0x00, 0x1e, 0x27, 0x00,
0x1e, 0x21,
};
const unsigned char SetSpeed_tpi_0[1] = {
0x5a,
const unsigned char SetSpeed_tpi_0[1] = {
0x5a,
};
const unsigned char GetDeviceID_tpi_0[29] = {
0x9c, 0x00, 0x33, 0x00, 0x9b, 0x01, 0x00, 0x1e, 0x26, 0x00, 0x01, 0x9c, 0x00, 0xc0, 0x3f, 0xac,
0x03, 0x00, 0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa4,
const unsigned char GetDeviceID_tpi_0[29] = {
0x9c, 0x00, 0x33, 0x00, 0x9b, 0x01, 0x00, 0x1e, 0x26, 0x00, 0x01, 0x9c, 0x00, 0xc0, 0x3f, 0xac,
0x03, 0x00, 0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa4,
};
const unsigned char EraseChip_tpi_0[43] = {
0x9b, 0x00, 0x33, 0x9b, 0x01, 0x10, 0x1e, 0x26, 0x00, 0x01, 0x9c, 0x00, 0x01, 0x40, 0x9b, 0x01,
0xff, 0x1e, 0x23, 0x00, 0x01, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae,
const unsigned char EraseChip_tpi_0[43] = {
0x9b, 0x00, 0x33, 0x9b, 0x01, 0x10, 0x1e, 0x26, 0x00, 0x01, 0x9c, 0x00, 0x01, 0x40, 0x9b, 0x01,
0xff, 0x1e, 0x23, 0x00, 0x01, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae,
};
const unsigned char WriteProgmem_tpi_0[140] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x1d, 0x60, 0x05, 0x01, 0x66, 0x01, 0x01,
0x00, 0x00, 0x00, 0x60, 0x06, 0x01, 0x60, 0x01, 0x05, 0x67, 0x01, 0x01, 0x1e, 0x26, 0x02, 0x03,
0x9b, 0x07, 0x00, 0xf8, 0x01, 0x07, 0x66, 0x00, 0xfb, 0x2b, 0x00, 0xad, 0x01, 0x99, 0x02, 0x1e,
0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92,
0x00, 0x01, 0x00, 0x00, 0x00, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x9b, 0x07, 0x01, 0xf8, 0x06,
0x07, 0x66, 0x00, 0xfb, 0x8b, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0x1e, 0x23, 0x00, 0xff, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04,
0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x5a,
const unsigned char WriteProgmem_tpi_0[140] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x1d, 0x60, 0x05, 0x01, 0x66, 0x01, 0x01,
0x00, 0x00, 0x00, 0x60, 0x06, 0x01, 0x60, 0x01, 0x05, 0x67, 0x01, 0x01, 0x1e, 0x26, 0x02, 0x03,
0x9b, 0x07, 0x00, 0xf8, 0x01, 0x07, 0x66, 0x00, 0xfb, 0x2b, 0x00, 0xad, 0x01, 0x99, 0x02, 0x1e,
0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92,
0x00, 0x01, 0x00, 0x00, 0x00, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x9b, 0x07, 0x01, 0xf8, 0x06,
0x07, 0x66, 0x00, 0xfb, 0x8b, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00,
0x00, 0x00, 0x1e, 0x23, 0x00, 0xff, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04,
0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x5a,
};
const unsigned char ReadProgmem_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
const unsigned char ReadProgmem_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
};
const unsigned char WriteConfigmemFuse_tpi_0[189] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x0a, 0x33, 0x9b, 0x0b, 0x14, 0x1e, 0x26, 0x0a, 0x0b, 0x9c, 0x0a,
0x41, 0x3f, 0x9b, 0x0b, 0xff, 0x1e, 0x23, 0x0a, 0x0b, 0x90, 0x0e, 0x32, 0x00, 0x00, 0x00, 0xa2,
0x1e, 0x25, 0x0e, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x94,
0x32, 0x00, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x1d, 0x60, 0x05, 0x01, 0x66, 0x01, 0x01, 0x00, 0x00,
0x00, 0x60, 0x06, 0x01, 0x60, 0x01, 0x05, 0x67, 0x01, 0x01, 0x1e, 0x26, 0x02, 0x03, 0x9b, 0x07,
0x00, 0xf8, 0x01, 0x07, 0x94, 0x00, 0xfb, 0x59, 0x00, 0xad, 0x01, 0x99, 0x02, 0x1e, 0x23, 0x00,
0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01,
0x00, 0x00, 0x00, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x9b, 0x07, 0x01, 0xf8, 0x06, 0x07, 0x94,
0x00, 0xfb, 0xbc, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00,
0x1e, 0x23, 0x00, 0xff, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x94, 0x19, 0x00, 0x5a,
const unsigned char WriteConfigmemFuse_tpi_0[189] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x0a, 0x33, 0x9b, 0x0b, 0x14, 0x1e, 0x26, 0x0a, 0x0b, 0x9c, 0x0a,
0x41, 0x3f, 0x9b, 0x0b, 0xff, 0x1e, 0x23, 0x0a, 0x0b, 0x90, 0x0e, 0x32, 0x00, 0x00, 0x00, 0xa2,
0x1e, 0x25, 0x0e, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x94,
0x32, 0x00, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x1d, 0x60, 0x05, 0x01, 0x66, 0x01, 0x01, 0x00, 0x00,
0x00, 0x60, 0x06, 0x01, 0x60, 0x01, 0x05, 0x67, 0x01, 0x01, 0x1e, 0x26, 0x02, 0x03, 0x9b, 0x07,
0x00, 0xf8, 0x01, 0x07, 0x94, 0x00, 0xfb, 0x59, 0x00, 0xad, 0x01, 0x99, 0x02, 0x1e, 0x23, 0x00,
0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01,
0x00, 0x00, 0x00, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x9b, 0x07, 0x01, 0xf8, 0x06, 0x07, 0x94,
0x00, 0xfb, 0xbc, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00,
0x1e, 0x23, 0x00, 0xff, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x94, 0x19, 0x00, 0x5a,
};
const unsigned char WriteConfigmemLock_tpi_0[189] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x0a, 0x33, 0x9b, 0x0b, 0x14, 0x1e, 0x26, 0x0a, 0x0b, 0x9c, 0x0a,
0x41, 0x3f, 0x9b, 0x0b, 0xff, 0x1e, 0x23, 0x0a, 0x0b, 0x90, 0x0e, 0x32, 0x00, 0x00, 0x00, 0xa2,
0x1e, 0x25, 0x0e, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x94,
0x32, 0x00, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x1d, 0x60, 0x05, 0x01, 0x66, 0x01, 0x01, 0x00, 0x00,
0x00, 0x60, 0x06, 0x01, 0x60, 0x01, 0x05, 0x67, 0x01, 0x01, 0x1e, 0x26, 0x02, 0x03, 0x9b, 0x07,
0x00, 0xf8, 0x01, 0x07, 0x94, 0x00, 0xfb, 0x59, 0x00, 0xad, 0x01, 0x99, 0x02, 0x1e, 0x23, 0x00,
0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01,
0x00, 0x00, 0x00, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x9b, 0x07, 0x01, 0xf8, 0x06, 0x07, 0x94,
0x00, 0xfb, 0xbc, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00,
0x1e, 0x23, 0x00, 0xff, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x94, 0x19, 0x00, 0x5a,
const unsigned char WriteConfigmemLock_tpi_0[189] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x0a, 0x33, 0x9b, 0x0b, 0x14, 0x1e, 0x26, 0x0a, 0x0b, 0x9c, 0x0a,
0x41, 0x3f, 0x9b, 0x0b, 0xff, 0x1e, 0x23, 0x0a, 0x0b, 0x90, 0x0e, 0x32, 0x00, 0x00, 0x00, 0xa2,
0x1e, 0x25, 0x0e, 0xa5, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x94,
0x32, 0x00, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x1d, 0x60, 0x05, 0x01, 0x66, 0x01, 0x01, 0x00, 0x00,
0x00, 0x60, 0x06, 0x01, 0x60, 0x01, 0x05, 0x67, 0x01, 0x01, 0x1e, 0x26, 0x02, 0x03, 0x9b, 0x07,
0x00, 0xf8, 0x01, 0x07, 0x94, 0x00, 0xfb, 0x59, 0x00, 0xad, 0x01, 0x99, 0x02, 0x1e, 0x23, 0x00,
0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01,
0x00, 0x00, 0x00, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0xae, 0x9b, 0x07, 0x01, 0xf8, 0x06, 0x07, 0x94,
0x00, 0xfb, 0xbc, 0x00, 0x99, 0x02, 0x1e, 0x23, 0x00, 0x02, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00,
0x1e, 0x23, 0x00, 0xff, 0x90, 0x04, 0x32, 0x00, 0x00, 0x00, 0xa2, 0x1e, 0x25, 0x04, 0xa5, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x94, 0x19, 0x00, 0x5a,
};
const unsigned char ReadConfigmem_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
const unsigned char ReadConfigmem_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
};
const unsigned char ReadConfigmemFuse_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
const unsigned char ReadConfigmemFuse_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
};
const unsigned char ReadConfigmemLock_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
const unsigned char ReadConfigmemLock_tpi_0[27] = {
0x91, 0x00, 0x91, 0x01, 0x9b, 0x02, 0x33, 0x9b, 0x03, 0x00, 0x1e, 0x26, 0x02, 0x03, 0xad, 0x01,
0x1e, 0x22, 0x00, 0x9f, 0x92, 0x00, 0x01, 0x00, 0x00, 0x00, 0xae,
};
@@ -150,26 +150,26 @@ static void pickit_tpi_script_init(SCRIPT *scr) {
}
const char * const pickit5_tpi_chip_lut[] = {
const char * const pickit5_tpi_chip_lut[] = {
"ATtiny10", "ATtiny102", "ATtiny104", "ATtiny20", "ATtiny4", "ATtiny40", "ATtiny5", "ATtiny9",
};
int get_pickit_tpi_script(SCRIPT *scr, const char* partdesc) {
if ((scr == NULL) || (partdesc == NULL)) {
int get_pickit_tpi_script(SCRIPT *scr, const char *partdesc) {
if((scr == NULL) || (partdesc == NULL)) {
return -1;
}
int namepos = -1;
for (int i = 0; i < 8; i++) {
if (strcmp(pickit5_tpi_chip_lut[i], partdesc) == 0) {
for(int i = 0; i < 8; i++) {
if(strcmp(pickit5_tpi_chip_lut[i], partdesc) == 0) {
namepos = i;
break;
}
}
if (namepos == -1) {
if(namepos == -1) {
return -2;
}
pickit_tpi_script_init(scr); // load common functions
pickit_tpi_script_init(scr); // Load common functions
switch (namepos) {
case 0: /* ATtiny10 */

File diff suppressed because it is too large Load Diff

140
tools/linter.py Normal file
View File

@@ -0,0 +1,140 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# avrdude - A Downloader/Uploader for AVR device programmers
# Copyright (C) 2025 MX682X
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# this python skript provides a basic linting of the recently
# modified files (1 week). The rules are adjusted for avrdude specifically.
# The results are ot absolute, it just shows where to check things
import os
import pathlib
import time
# List of words that don't fllow normal writing conventions
c_keywords = ("if", "else", "do", "while", "for", "void", "unsigned", "char", "int", "return", "switch", "case", "default", )
other_keywords = ("debugWIRE", "debugWire", "UPDI", "MPLAB", "AVR", "PICkit")
chip_keywords = ("xMega", "CS", "RC", "HV")
def get_file_list(path):
return [f.path for f in os.scandir(path)
if f.name.endswith((".c", ".h")) # limit c and h files, 1 week old modification
if os.path.getmtime(f.path) > (time.time() - 7*24*3600)]
def check_slc(line, linenum, pos):
if line[0] != " " and line[0] != "/":
print(f"{linenum}:{pos+1} - missing space after '//'")
found_printable = False
for i in range(len(line)):
if line[i:i+2] == "//" and i > 2:
check_slc(line[i+2:], linenum, i + pos)
elif line[i] == " ":
continue
elif not found_printable:
if line[i].isprintable():
found_printable = True
if line[i].islower():
word = line[i:-1].split(" ", 1)[0]
if not (word in c_keywords or word in other_keywords):
if not any (x in word for x in ("->", ".", "_")):
print(f"{linenum+1}:{i+pos+1} - lower case '{word}' at beginning of '//'")
else:
continue
def check_console_output(line, linenumber):
try:
type, string = line.split("(")
word = string.split('"')[1].split(" ")[0]
if word[0].isupper(): # First letter is capital
if not word.isupper(): # Whole word capital is allowed, e.g. NOT
if not (word in other_keywords or word in chip_keywords): # reduce false positives
print(f"{linenumber+1} - {type} messages should start lower case: '{word}'")
except:
pass
def check_lines(lines):
mlc = 0 # multi-line comment
string = 0
for l, line in enumerate(lines):
for i in range(len(line)):
if mlc:
if line [i:i+2] == "*/": # ignore everything in multi-line comment
mlc = 0
continue
elif string: # ignore C strings
if line[i] == '"' and line[i-1] != "\\":
string = False
elif line [i] == "#":
break # skip preprocessor line
elif line [i:i+2] == "/*":
mlc = 1
elif line[i:i+2] == "//":
check_slc(line[i+2:], l, 2)
break # skip the rest of the single line comment
elif line[i] == '"':
string = True
elif line[i:i+4] == "if (":
print(f"{l+1}:{i+3} - found if space")
elif line[i:i+7] == "while (":
print(f"{l+1}:{i+6} - found while space")
elif line[i:i+5] == "for (":
print(f"{l+1}:{i+4} - found for space at")
elif line[i:i+4] == "char":
if line[i+4] == "*":
print(f"{l+1}:{i+5} - missing space between char and * ")
elif line[i+4:i+6] == " *":
if line[i+6] == " ":
if line[i+7:i+12] != "const":
print(f"{l+1}:{i+7} - space found between * and function/variable name")
elif line[i:i+3] == "int":
if line[i+3] == "*":
print(f"{l+1}:{i+4} - missing space between int and * ")
elif line[i+3:i+5] == " *":
if line[i+5] == " ":
if line[i+6:i+11] != "const":
print(f"{l+1}:{i+6} - space found between * and function/variable name")
elif line[i:i+4] == "msg_": # wildcarding pmsg/imsg, might pick up others though, careful there
check_console_output(line[i+4:], l)
if len(line) > 1 and line[-2:] == " \n":
print(f"{l+1} - Trailing whitespace found")
def main():
working_dir = pathlib.Path(__file__).parent.parent.resolve()
working_dir = os.path.join(working_dir, "src")
print("working dir:", working_dir)
files = get_file_list(working_dir)
for file in files:
print(file)
with open(file, "r") as f:
lines = f.readlines()
check_lines(lines)
main()

View File

@@ -105,8 +105,8 @@ print(cache_dir)
# Beginning of C and H Files
common_header = \
'''\
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
/* This file was auto-generated by scripts_decoder.py.
* Any changes will be overwritten on regeneration
*/
/*
@@ -148,7 +148,7 @@ struct avr_script_lut {
};
typedef struct avr_script_lut SCRIPT;
const unsigned char * get_devid_script_by_nvm_ver(unsigned char version);
const unsigned char *get_devid_script_by_nvm_ver(unsigned char version);
int get_pickit_dw_script(SCRIPT *scr, const char *partdesc);
int get_pickit_isp_script(SCRIPT *scr, const char *partdesc);
int get_pickit_jtag_script(SCRIPT *scr, const char *partdesc);
@@ -361,12 +361,12 @@ def convert_xml(xml_path, c_funcs):
func_length = len(func_bytes)
c_file.write("const unsigned char {0}_{1}_{2}[{3}]".format(
func_name, lower_prog_iface, array_iter, func_length) + " = {")
num_line = " "
num_line = ""
for (iter, byte) in enumerate(func_bytes): # go through every byte
if (iter % 16 == 0):
c_file.write(num_line) # new line after 16 bytes
num_line = "\n "
num_line += "0x{0:02x}, ".format(byte) # and generate String
num_line = "\n "
num_line += " 0x{0:02x},".format(byte) # and generate String
c_file.write(num_line + "\n};\n\n") # complete array
if len(func_array_bytes) == 1: # look for common function
@@ -374,22 +374,22 @@ def convert_xml(xml_path, c_funcs):
if (func_name == "ReadConfigmem") or (func_name == "WriteConfigmem"):
continue # XMEGA has the functions, but not the old JTAG
common_func.append(func_name)
struct_init_func += " scr->{0} = {0}_{1}_0;\n".format(func_name, lower_prog_iface)
struct_init_len += " scr->{0}_len = sizeof({0}_{1}_0);\n".format(func_name, lower_prog_iface)
struct_init_func += f" scr->{func_name} = {func_name}_{lower_prog_iface}_0;\n"
struct_init_len += f" scr->{func_name}_len = sizeof({func_name}_{lower_prog_iface}_0);\n"
# EOFL
c_file.write("\n\n\nstatic void pickit_{0}_script_init(SCRIPT *scr);\n".format(lower_prog_iface)) # declaration
c_file.write("static void pickit_{0}_script_init(SCRIPT *scr)".format(lower_prog_iface) + " {\n") # definition
c_file.write(f"\n\n\nstatic void pickit_{lower_prog_iface}_script_init(SCRIPT *scr);\n") # declaration
c_file.write(f"static void pickit_{lower_prog_iface}_script_init(SCRIPT *scr)" + " {\n") # definition
c_file.write(" memset(scr, 0x00, sizeof(SCRIPT)); // Make sure everything is NULL\n\n")
c_file.write(struct_init_func)
c_file.write("\n") # improve readability
c_file.write(struct_init_len)
c_file.write("}\n\n\n")
c_file.write("const char * const pickit5_{0}_chip_lut[]".format(lower_prog_iface) + " = {")
chip_line = " "
c_file.write(f"const char * const pickit5_{lower_prog_iface}_chip_lut[]" + " = {")
chip_line = ""
for (iter, chip_name) in enumerate(prog_mcu_list.keys()): # go through every chip
if (iter % 8 == 0):
c_file.write(chip_line) # new line after 8 Chips
@@ -399,22 +399,22 @@ def convert_xml(xml_path, c_funcs):
if (prog_iface == "UPDI"):
c_file.write("const unsigned char * get_devid_script_by_nvm_ver(unsigned char version) {\n")
c_file.write(" if (version >= '0') version -= '0'; // allow chars\n")
c_file.write(" if (version > 9) return NULL; // Not a valid number\n")
c_file.write(" if (version <= 3) // tiny, mega, DA, DB, DD, EA\n")
c_file.write("const unsigned char *get_devid_script_by_nvm_ver(unsigned char version) {\n")
c_file.write(" if(version >= '0') version -= '0'; // Allow chars\n")
c_file.write(" if(version > 9) return NULL; // Not a valid number\n")
c_file.write(" if(version <= 3) // Tiny, mega, DA, DB, DD, EA\n")
c_file.write(" return GetDeviceID_updi_0;\n")
c_file.write(" else // DU, EB\n")
c_file.write(" return GetDeviceID_updi_1;\n}\n\n")
c_file.write("int get_pickit_{0}_script(SCRIPT *scr, const char* partdesc)".format(lower_prog_iface) + " {\n")
c_file.write(" if ((scr == NULL) || (partdesc == NULL)) {\n return -1;\n }\n")
c_file.write("int get_pickit_{0}_script(SCRIPT *scr, const char *partdesc)".format(lower_prog_iface) + " {\n")
c_file.write(" if((scr == NULL) || (partdesc == NULL)) {\n return -1;\n }\n")
c_file.write(" int namepos = -1;\n")
c_file.write(" for (int i = 0; i < {0}; i++)".format(len(prog_mcu_list.keys())) + " {\n")
c_file.write(" if (strcmp(pickit5_{0}_chip_lut[i], partdesc) == 0)".format(lower_prog_iface) + " {\n")
c_file.write(" for(int i = 0; i < {0}; i++)".format(len(prog_mcu_list.keys())) + " {\n")
c_file.write(" if(strcmp(pickit5_{0}_chip_lut[i], partdesc) == 0)".format(lower_prog_iface) + " {\n")
c_file.write(" namepos = i;\n break;\n }\n }\n")
c_file.write(" if (namepos == -1) {\n return -2;\n }\n\n")
c_file.write(" pickit_{0}_script_init(scr); // load common functions\n\n".format(lower_prog_iface))
c_file.write(" if(namepos == -1) {\n return -2;\n }\n\n")
c_file.write(" pickit_{0}_script_init(scr); // Load common functions\n\n".format(lower_prog_iface))
case_list = []
case_func_list = []
@@ -441,8 +441,8 @@ def convert_xml(xml_path, c_funcs):
func_list = func_list.split("\n")[:-1] # Remove last Element that will be an empty string
for func in func_list:
func_name = func.split("_")[0]
c_file.write(" scr->{0} = {1};\n".format(func_name, func))
c_file.write(" scr->{0}_len = sizeof({1});\n".format(func_name, func))
c_file.write(f" scr->{func_name} = {func};\n")
c_file.write(f" scr->{func_name}_len = sizeof({func});\n")
c_file.write(" break;\n")
c_file.write(" }\n return namepos;\n}")