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

📄 system.c.bak

📁 xilinx fpga x3s500e芯片从flashboot的程序代码
💻 BAK
字号:
#include "xbasic_types.h"#include "xparameters.h"#include "xutil.h"#include "xgpio.h"#include "xgpio_l.h"#include "xuartlite.h"#include "Flashoperation.h"#include "xuartlite.h"int main(){	const Xuint16 * flash_base = (Xuint16 *)XPAR_GENERIC_EXTERNAL_MEMORY_MEM0_BASEADDR;	const Xuint16 * flash_high = (Xuint16 *)XPAR_GENERIC_EXTERNAL_MEMORY_MEM0_HIGHADDR;	Xuint32 i;	Xuint16 add; 	int num = 65500;	Xuint32 counter1 = 0;	Xuint32 counter2 = 0;	Xuint32 counter3 = 0;	Xuint8 ch1;	//////////////////init flash x16	print("initializint flash\r\n");	initialize_flash();	/////////////get flash id//print("print out the information of the flash\r\n");//	Get_FlashInfo_16(flash_base);/////////////////// erase flash	print("Begin erasing the whole flash.....\r\n");	cfi_erase_whole_flash_16(flash_base);	print("Erase complete!");	////////////////////validate flash  0xff//////////////	for(i = 0x0;i < 0x200000;i++)	{		if(flash_base[i]!=0xFFFF)			break;	}	print("flash erease is ok\r\n");	putnum(i);	wait();/////////////////////boot *.bin download/////////////////	long program_flash(flash_base_addr16,long total_bytes);long program_flash_down(flash_base_addr16,long total_bytes,Xuint32 offset);	return 0;}

⌨️ 快捷键说明

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