1. ISE => new program => new source => embedded processor
2. XPS
2.1 create new xps program using BSB wizard => PLCsystem
2.1 base system builder => welcome => new design
board => custom board
system => single-processor system
processor =>
、
peripheral => add device => IO interface type => GPIO ;Device =>LEDS
GPIO Data Width => 8
cache => summary
XPS => project => export hardware design to SDK
export only
Done!
3. 返回ISE
右键 => add copy of source
data 下的 UCF 文件
打开并修改
选中
再RUN => generate top HDL souce
完成后 如图
export hardware design ti sdk with
4. Xilinx SDK
File => New =>application project
代码如下:
#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xparameters.h"
#include "xgpio.h"
#include "sleep.h"
int main()
{
char m=0x01;
//init_platform();
while(1){
for(m=0;m<8;m++){
XGpio_WriteReg(0x41200000,0,1<<m);
sleep(1);
}
//printf("Hello World!
%ld
",m);
}
return 0;
}
save
生成可执行文件
run configurations
RUN
//调试下载
//也可以从ISE下载
返回ISE 右键top文件 add copy source
bootloop下的 elf 文件
下载