init_platform和cleanup_platform函数定义如下: 图1.4.6 init_platform和cleanup_platform函数定义 可以看到init_platform函数的作用是使能caches和初始化uart;cleanup_platform函数的作用是取消使能caches。实际上这两个函数在该工程中并没有启动任何作用,因为这两个函数是针对于特定平台如Microblaze的,对于我们使用的ZYNQ...
编辑 修改main.c文件 修改main.c文件为如下:#include <stdio.h> #include "xparameters.h"#include "netif/xadapter.h"#include "platform.h"#include "platform_config.h"#include "lwipopts.h"#include "xil_printf.h"#include "sleep.h"#include "lwip/priv/tcp_priv.h"#include "lwip/init.h"#incl...
#include "netif/xadapter.h" #include "platform.h" #include "platform_config.h" #include "lwipopts.h" #include "xil_printf.h" #include "sleep.h" #include "lwip/priv/tcp_priv.h" #include "lwip/init.h" #include "lwip/inet.h" #if LWIP_IPV6==1 #include "lwip/ip6_addr.h" #inc...
简介:基于ZYNQ7010制作的开发板,具有和树莓派相同的尺寸和接口 该板子具有和树莓派一样的接口,四USB2.0,一千兆以太网,一HDMI,一电源接口,一调试串口,一烧录口,一SD卡接口,一组GPIO。 开源协议 : CC-BY-NC-SA 3.0 创建时间:2022-06-30 14:34:59更新时间:2022-08-25 09:36:45 ...
--init_platform函数,将ps7_init()函数的comment去掉, --包含头文件#include "ps7_init.h" 12. 编译代码->project->Clean->OK 13. 生成boot.bin启动文件 右击helloword工程->Create boot Image->Create Image。 注意:helloword.elf 前面的bootloader一定要出现,表示该文件是bootloader,启动后运行的第一个文件,...
init_platform(); //初始化GPIOPS,将ConfigPtrPS与硬件绑定 ConfigPtrPS = XGpioPs_LookupConfig(0); XGpioPs_CfgInitialize(&emio, ConfigPtrPS, ConfigPtrPS->BaseAddr); //设置EMIO的方向,并使能EMIO XGpioPs_SetDirectionPin(&emio, EMIO_54, 1); ...
step into(快捷键F5)进入init_platform(),看看这个函数做了什么。 stop over(快捷键F6)跳过enable_caches(),因为看到了init_uart(),从名字来看,应该是串口初始化函数,果断F5,结果发现直接跳至init_uart()结束位置:它什么都没做…… 从程序上来看,显然是由于我们没有#define STDOUT_IS_16550。F6返回上一层的in...
init_platform();while(1) { print("CPU 0 : Hello World\r\n"); sleep(2); } cleanup_platform();return0; } //app_cpu1.c为以下代码#include<stdio.h>#include"platform.h"#include"xil_printf.h"#include"sleep.h"intmain(){ init_platform();while(1) ...
修改helloword/src/platform.c --init_platform函数,将ps7_init()函数的comment去掉, --包含头文件#include "ps7_init.h" 12. 编译代码->project->Clean->OK 13. 生成boot.bin启动文件 右击helloword工程->Create boot Image->Create Image 注意,helloword.elf前面的bootloader一定要出现,表示该文件是bootloader...
init_platform(); printf("hello \n"); for(;;) { Status = XDcfgPolled(&DcfgInstance,DCFG_DEVICE_ID); if (Status != XST_SUCCESS) { xil_printf("Dcfg Polled Example Test Failed\r\n"); return XST_FAILURE; } xil_printf("Successfully ran Dcfg Polled Example Test\r\n"); ...