⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global_variables.h

📁 wince的boot程序下载:并口JFlashmm源代码。 VC6.0编译。如果用新的flash芯片需要修改源代码后编译。
💻 H
字号:
/**********************************************************************************  COPYRIGHT (C) 2000, 2001, 2002 Intel Corporation.****  The information in this file is furnished for informational use **  only, is subject to change without notice, and should not be construed as **  a commitment by Intel Corporation. Intel Corporation assumes no **  responsibility or liability for any errors or inaccuracies that may appear **  in this document or any software that may be provided in association with **  this document. ****  FILENAME:       Global_Variables.h****  PURPOSE:        declares all global varibales used by the Jflash software****  LAST MODIFIED:  $Modtime: 2/18/04 3:22p $******************************************************************************//********************************************************************************Globals********************************************************************************/int lpt_address;									// Global variable assigned to parallel port addressint lpt_ECR;										// global for LPT extended control registerint lpt_CTL;										// global for the LPT control portint lpt_STAT;										// global for LPT status registerDWORD MILLISECOND_COUNT = 0;						// global to keep an approx loop count for a msint block_number = 0;								// Global variable for determining the block numberchar filename[MAX_IN_LENGTH] = "download.bin";		// Global variable for storing the file namechar data_filename[MAX_IN_LENGTH] = "DBPXA250";     // Global variable for the platform data filechar flash_data_filename[MAX_IN_LENGTH] = "Flash_18_2_32.dat";     // Global variable for the flash data filechar int_data_filename[MAX_IN_LENGTH] = "DBPXA250_INTEGRITY.DAT"; // global integrity data filechar VERSION_LOCK[11] =       "VL00000001";char FLASH_VERSION_LOCK[11] = "VLF0000001";CABLE_TYPES CableType = Insight_Jtag;				// Global variable for specifying the Cable typeDWORD ChipSelect0		= 0;						// Global variable for chip select 0DWORD ChipSelect1		= 0;						// Global variable for chip select 1DWORD ChipSelect2		= 0;						// Global variable for chip select 2DWORD ChipSelect3		= 0;						// Global variable for chip select 3DWORD ChipSelect4		= 0;						// Global variable for chip select 4DWORD ChipSelect5		= 0;						// Global variable for chip select 5DWORD OutputEnable		= 0;    // Global variable for output enableDWORD WriteEnable		= 0;    // Global variable for write enableDWORD MdUpperControl	= 0;    // Global variable for MD upper controlDWORD MdLowerControl	= 0;    // Global variable for MD lower controlDWORD ReadWriteMode		= 0;    // Global variable for Read Write access modeDWORD IR_Idcode		= 0;	    // Global variable for the IDCODE instruction of the IRDWORD IR_Bypass		= 0;	    // Global variable for the BYPASS instruction of the IRDWORD IR_Extest		= 0;	    // Global variable for the EXTEST instruction of the IRDWORD ChainLength	= 0;		// Global variable for the chain length of the selected platformDWORD UnlockFlashCtrl1 = 0;		// unlock flash control pin 1DWORD UnlockFlashCtrl1Lev = 0;	// unlock flash control pin 1 level for unlockDWORD LockFlashCtrl1Lev = 0;	// lock1 flash levelDWORD UnlockFlashCtrl2 = 0;		// unlock flash control pin 2DWORD UnlockFlashCtrl2Lev = 0;	// unlock flash control pin 2 level for unlockDWORD LockFlashCtrl2Lev = 0;	// lock2 flash levelDWORD UnlockFlashCtrl3 = 0;		// unlock flash control pin 3DWORD UnlockFlashCtrl3Lev = 0;	// unlock flash control pin 3 level for unlockDWORD LockFlashCtrl3Lev = 0;	// lock3 flash levelDWORD UnlockFlashCtrl4 = 0;		// unlock flash control pin 4DWORD UnlockFlashCtrl4Lev = 0;	// unlock flash control pin 4 level for unlockDWORD LockFlashCtrl4Lev = 0;	// lock4 flash levelDWORD CSR_LADDR[6];				// array of chip select region low addresses DWORD CSR_HADDR[6];				// array of chip select regions high addressesDWORD CSR1 = 6;	// the chip select for region 1. 6 is illegal and is here to flag an error if not defined.DWORD CSR2 = 6;	// the chip select for region 2DWORD CSR3 = 6;	// the chip select for region 3DWORD CSR4 = 6;	// the chip select for region 4DWORD CSR5 = 6;	// the chip select for region 5DWORD CSR6 = 6;	// the chip select for region 6// some flash related globalsDWORD BlockEraseTime = 10;DWORD FlashBufferSize = 32;DWORD FlashDeviceSize = 0;bool  REGION_STATUS[10];		// array of region statusDWORD REGION_NUM_BLOCKS[10];	// number of blocks in the  regionDWORD REGION_BLOCKSIZE[10];		// The size of the blocks in that  regionDWORD REGION_START_ADDR[10];	// The start address of the regionDWORD REGION_END_ADDR[10];		// the end address of the regionDWORD BLOCK_ADDRESS[512];		// up to 512 unique block addressesint ADDR_MULT = 4;				// addressing multiplier or divider for flashint WorkBufSize	= 0;		    // Global variable for setting the work buffer sizeint IrLength   	= 0;			// Global variable for setting the correct IR length// Chain device databool  DEVICESTATUS[5];	  // enabled or disabledDWORD DEVICEIRLENGTH[5];  // length of IR to set bypassbool  DEVICETYPE[5];	  // true if controllerbool  DEVICEISLAST[5];int DEVICE_CONTROLLER = 0; // which device is the controller int DEVICES_BEFORE = 0;int DEVICES_AFTER = 0;int DEVICES_IN_CHAIN = 0;#define MAX_HANDLER_SIZE 0x200bool PlatformIs16bit = false;						// Global variable for diferentiating between 16bit and 32bit platformsbool PlatformIsBulverdeOrDimebox = true;			// Global variable to determine if the selected platform is bulverde or dimeboxbool PlatformIsBulverdeDimeboxShortChain = false;	// Global variable for determining whether it's a short chain or notbool PlatformIsBulverdeDimeboxLongChain = true;		// Global variable for determining whether it's a long chain or notbool Debug_Mode = false;bool UsageShown = false;bool AskQuestions = true;bool K3_STABILITY_FIX_ENABLE = false;// Globals for flash commands and query codes. Assumes 32 bit as defaultDWORD F_READ_ARRAY = 		0x00FF00FFL;DWORD F_READ_IDCODES =   	0x00900090L;DWORD F_READ_QUERY =     	0x00980098L;DWORD F_READ_STATUS =    	0x00700070L;DWORD F_CLEAR_STATUS =   	0x00500050L;DWORD F_WRITE_BUFFER =   	0x00E800E8L;DWORD F_WORDBYTE_PROG =  	0x00400040L;DWORD F_BLOCK_ERASE =    	0x00200020L;DWORD F_BLOCK_ERASE_2ND =	0x00D000D0L; DWORD F_BLK_ERASE_PS =       0x00B000B0L;DWORD F_BLK_ERASE_PR =       0x00D000D0L;DWORD F_CONFIGURATION =      0x00B800B8L;DWORD F_SET_READ_CFG_REG =   0x00600060L;DWORD F_SET_READ_CFG_REG_2ND = 0x00030003L;DWORD F_SET_BLOCK_LOCK =      0x00600060L;DWORD F_SET_BLOCK_LOCK_2ND =  0x00010001L;DWORD F_CLEAR_BLOCK_LOCK =    0x00600060L;DWORD F_CLEAR_BLOCK_LOCK_2ND =0x00D000D0L;DWORD F_PROTECTION =          0x00C000C0L;DWORD F_ATTR_Q =              0x00510051L;DWORD F_ATTR_R =              0x00520052L;DWORD F_ATTR_Y =              0x00590059L;DWORD F_BLOCK_LOCKED =        0x00010001L;DWORD F_STATUS_READY =        0x00800080L;DWORD F_STATUS_READY_MASK =   0x00FF00FFL;FILE *in_file;FILE *data_file_pointer;FILE *flash_file_pointer;FILE *intercom_file_pointer;FILE *int_data_file_pointer;int out_dat[MAX_DR_SIZE];bool UNLOCKBLOCK = false;bool HASLOCKCONTROLS = false;	// Is there external locking for the flash?unsigned long MAX_DATA = 230;unsigned long MAX_FLASH_DATA = 60;char WORDARRAY[230][132];  // the capture of all strings from the data filechar FLASHWORDARRAY[60][132];  // the capture of all strings from the data fileDWORD addr_order[27];DWORD input_dat_order[33];DWORD dat_order[33];DWORD pin[1000]; // max JTAG boundary length of 1000 bits//Integrity check arrays char  INT_DATA_ARRAY[1200][132]; // the full data array from the parsed data fileDWORD INT_OUT_ARRAY[300]; // the output pin offsets for the integrity checkDWORD INT_IN_ARRAY[300];  // the input pin offsets for the integrity checkchar  INT_NAME_ARRAY[300][132]; // the names of the pins that will be integrity checkedDWORD INT_CONTROL_ARRAY[300]; // control lines required to set the pinsDWORD DebugProgress 	=	0x0; // bits indicate progress markers to assist in debugging problems// define data points for progress#define foundFlashID 		0x1#define foundProcID 		0x2#define unlockedFlash		0x4#define firstWordVerified 	0x8#define eraseSuccess		0x10#define lastWordVerified	0x20// Position of data in the platform data file#define p_processor 	0#define p_devsys		1#define p_dataver		2#define p_verlock		3#define p_blength		4#define p_irlength		5#define p_extest		6#define p_idcode		7#define p_bypass		8#define p_cs0			9#define p_cs1			10#define p_cs2			11#define p_cs3			12#define p_cs4			13#define p_cs5			14#define p_nOE_OUT		15#define p_nWE_OUT	   	16#define p_mdupper_ctrl	17#define p_mdlower_ctrl	18#define p_RD_nWR_OUT	19#define	p_cp1			20#define	p_a0			21#define	p_a1			22#define	p_a2			23#define	p_a3			24#define	p_a4			25#define	p_a5			26#define	p_a6			27#define	p_a7			28#define	p_a8			29#define	p_a9			30#define	p_a10			31#define	p_a11			32#define	p_a12			33#define	p_a13			34#define	p_a14			35#define	p_a15			36#define	p_a16			37#define	p_a17			38#define	p_a18			39#define	p_a19			40#define	p_a20			41#define	p_a21			42#define	p_a22			43#define	p_a23			44#define	p_a24			45#define	p_a25			46#define	p_d0in			47#define	p_d1in			48#define	p_d2in			49#define	p_d3in			50#define	p_d4in			51#define	p_d5in			52#define	p_d6in			53#define	p_d7in			54#define	p_d8in			55#define	p_d9in			56#define	p_d10in			57#define	p_d11in			58#define	p_d12in			59#define	p_d13in			60#define	p_d14in			61#define	p_d15in			62#define	p_d16in			63#define	p_d17in			64#define	p_d18in			65#define	p_d19in			66#define	p_d20in			67#define	p_d21in			68#define	p_d22in			69#define	p_d23in			70#define	p_d24in			71#define	p_d25in			72#define	p_d26in			73#define	p_d27in			74#define	p_d28in			75#define	p_d29in			76#define	p_d30in			77#define	p_d31in			78#define	p_d0out			79#define	p_d1out			80#define	p_d2out			81#define	p_d3out			82#define	p_d4out			83#define	p_d5out			84#define	p_d6out			85#define	p_d7out			86#define	p_d8out			87#define	p_d9out			88#define	p_d10out		89#define	p_d11out		90#define	p_d12out		91#define	p_d13out		92#define	p_d14out		93#define	p_d15out		94#define	p_d16out	   	95#define	p_d17out		96#define	p_d18out		97#define	p_d19out		98#define	p_d20out		99#define	p_d21out		100#define	p_d22out		101#define	p_d23out		102#define	p_d24out		103#define	p_d25out		104#define	p_d26out		105#define	p_d27out		106#define	p_d28out		107#define	p_d29out		108#define	p_d30out		109#define	p_d31out		110#define p_cp2			111#define	p_datawidth		112#define	p_m_reg1_low	113#define	p_m_reg1_high	114#define	p_m_reg1_cs		115#define	p_m_reg2_low	116#define	p_m_reg2_high	117#define	p_m_reg2_cs		118#define	p_m_reg3_low	119#define	p_m_reg3_high	120#define	p_m_reg3_cs		121#define	p_m_reg4_low	122#define	p_m_reg4_high	123#define	p_m_reg4_cs		124#define	p_m_reg5_low	125#define	p_m_reg5_high	126#define	p_m_reg5_cs		127#define	p_m_reg6_low	128#define	p_m_reg6_high	129#define	p_m_reg6_cs		130#define	p_proc_id		131#define	p_proc_mfg		132#define	p_proc_std		133#define	p_CID0			134#define	p_CID1			135#define	p_CID2			136#define	p_CID3			137#define	p_CID4			138#define	p_CID5			139 #define	p_CID6			140#define	p_CID7			141#define	p_CID8			142#define	p_CID9			143#define	p_CID10			144#define	p_CID11			145#define	p_CID12			146#define	p_CID13			147#define	p_CID14			148#define	p_CID15			149#define	p_nh1			150#define	p_nh2			151#define	p_nh3			152#define	p_nh4			153#define	p_nh5			154#define	p_nh6			155#define	p_nh7			156#define	p_nh8			157#define	p_nh9			158#define	p_nh10			159#define	p_nh11			160#define	p_nh12			161#define	p_nh13			162#define	p_nh14			163#define	p_nh15			164#define	p_nh16			165#define	p_nh17			166#define	p_nh18			167#define	p_nh19			168#define	p_nh20			169#define	p_nh21			170#define	p_nh22			171#define	p_nh23			172#define	p_nh24			173#define	p_nh25			174#define	p_nh26			175#define	p_nh27			176#define	p_nh28			177#define	p_nh29			178#define	p_nh30			179#define	p_nh31			180#define	p_nh32			181#define	p_nh33			182#define	p_nh34			183#define	p_nh35			184#define	p_nh36			185#define	p_nh37			186#define	p_nh38			187#define	p_nh39			188#define	p_nh40			189#define	p_nh41			190#define	p_nh42			191#define	p_nh43			192#define	p_nh44			193#define	p_nh45			194#define	p_nh46			195#define	p_nh47			196#define	p_dev1_stat		197#define	p_dev1_bits		198#define	p_dev1_type		199#define	p_dev1_islast	200#define	p_dev2_stat		201#define	p_dev2_bits		202#define	p_dev2_type		203#define	p_dev2_islast	204#define	p_dev3_stat		205#define	p_dev3_bits		206#define	p_dev3_type		207#define	p_dev3_islast	208#define	p_dev4_stat		209#define	p_dev4_bits		210#define	p_dev4_type		211#define	p_dev4_islast	212#define	p_dev5_stat		213#define	p_dev5_bits		214#define	p_dev5_type		215#define	p_dev5_islast	216#define	p_unlctl1		217#define	p_unlctl1_lev	218#define	p_unlctl2		219#define	p_unlctl2_lev	220#define	p_unlctl3		221#define	p_unlctl3_lev	222#define	p_unlctl4		223#define	p_unlctl4_lev	224#define	p_cp3			225#define p_fdevsacross	226#define p_nsdcas		227#define P_progmode		228// position of data in the flash data file#define pf_type			0#define pf_dataver		1#define pf_verlock		2#define pf_ertime		3#define pf_bufsize		4#define pf_reg0status 	5#define pf_reg0number	6#define pf_reg0blsize	7#define pf_reg0start	8#define pf_reg0end		9#define pf_reg1status 	10#define pf_reg1number	11#define pf_reg1blsize	12#define pf_reg1start	13#define pf_reg1end		14#define pf_reg2status 	15#define pf_reg2number	16#define pf_reg2blsize	17#define pf_reg2start	18#define pf_reg2end		19#define pf_reg3status 	20#define pf_reg3number	21#define pf_reg3blsize	22#define pf_reg3start	23#define pf_reg3end		24#define pf_reg4status 	25#define pf_reg4number	26#define pf_reg4blsize	27#define pf_reg4start	28#define pf_reg4end		29#define pf_reg5status 	30#define pf_reg5number	31#define pf_reg5blsize	32#define pf_reg5start	33#define pf_reg5end		34#define pf_reg6status 	35#define pf_reg6number	36#define pf_reg6blsize	37#define pf_reg6start	38#define pf_reg6end		39#define pf_reg7status 	40#define pf_reg7number	41#define pf_reg7blsize	42#define pf_reg7start	43#define pf_reg7end		44#define pf_reg8status 	45#define pf_reg8number	46#define pf_reg8blsize	47#define pf_reg8start	48#define pf_reg8end		49#define pf_reg9status 	50#define pf_reg9number	51#define pf_reg9blsize	52#define pf_reg9start	53#define pf_reg9end		54#define pf_cp1			55// integrity data file definitions#define in_blength		0#define in_irlength		1#define in_extest		2#define in_idcode		3#define in_bypass		4/*   since the rest of the file can be quite arbitrary   the names are not important. The data is assumed to be    in the order of:		Pin_name_string		output_offset	input_offset 	control_offset   There may be up to 300 lines defined and those that are not   define should be denoted by the 9999 flag.*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -