-
学习~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
涨知识了 ,多谢楼主分享
-
万用表法也觉得不靠谱,之前有用过万用表测量晶振电压,如楼主所述在电源电压一般左右,但实际上晶振是坏的,还是用示波器实际测量一下,更可靠!
-
不错,学习了~~~~~~~~~
-
楼主这个问题解决了吗?我也遇到相同的问题
-
我知道需要调用这个,但是我不明白如何连接到它
-
重启之后输入 resize2fs mmcblk0p2
-
已解决,多谢!
-
多谢指点
-
本帖最后由 天一25 于 2016-5-4 10:03 编辑
Makefile文件
ifeq ($(KERNELRELEASE),)
#KERNELDIR ?= /your/target/source/directory/
KERNELDIR ?= ../linux-socfpga
PWD := $(shell pwd)
ARM ?=arm
CROSSS_COMPILE ?=arm-none-linux-gnueabi-
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *odule*
.PHONY: modules modules_install clean
else
obj-m := lab2_axi.o
endif
请问强调的部分该怎么改,试了好多种都不行
-
-
本帖最后由 天一25 于 2016-5-2 09:48 编辑
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "math.h"
#include "hwlib.h"
#include "socal/socal.h"
#include "socal/hps.h"
#include "vip_capture.h"
#include "lib_bitmap.h"
#define HW_REGS_BASE (ALT_STM_OFST )
#define HW_REGS_SPAN (0x04000000 )
#define HW_REGS_MASK (HW_REGS_SPAN - 1 )
#define BMP_WIDTH 640
#define BMP_HEIGHT 480
#define WRITE_COUNT_PILXEL 4
#define BMP_COUNT_PILXEL 3
#define BUFFER_SIZE BMP_WIDTH*BMP_HEIGHT*WRITE_COUNT_PILXEL
#define BMP_BUFFER_SIZE BMP_WIDTH*BMP_HEIGHT*BMP_COUNT_PILXEL
static volatile unsigned long *h2p_vip_capture_addr=NULL;
static unsigned int DEMO_VGA_FRAME0_ADDR=0x3f200000;
#define ALT_VIP_CAPTURE_BASE 0x00000000
void Capture_Start(uint32_t FRAME_BASE){
// stop
h2p_vip_capture_addr[REG_CONTROL]=0x00;
// set base addr
h2p_vip_capture_addr[REG_BASE_ADDRESS]=FRAME_BASE;
// start
h2p_vip_capture_addr[REG_CONTROL]=0x01;
return ;
}
bool Capture_Get( uint32_t Width, uint32_t Height){
bool bSuccess = false;
uint32_t Status32, PixelCnt;
do {
usleep(10000);
Status32=h2p_vip_capture_addr[REG_STATUS];
} while (Status32 != ST_SUCCESS && Status32 != ST_FIFO_OVERFLOW && Status32 != ST_BAD_FRAME );
// stop
// sleep(1);
h2p_vip_capture_addr[REG_CONTROL]=0x00;
if (Status32 == ST_SUCCESS){
PixelCnt=h2p_vip_capture_addr[REG_PIXEL_CNT];
if (PixelCnt == Width*Height){
printf("%d*%d pixel get \n",Width,Height);
bSuccess = true;
}else{
printf("[VIP_FC]invalid pixel count %d\r\n", (int)PixelCnt);
bSuccess = false;
}
}else{
bSuccess = false;
}
return bSuccess;
}
int main(int argc,char ** argv)
{
int fd;
unsigned char read_buffer[BUFFER_SIZE]={0};
unsigned char bmp_buffer[ BMP_BUFFER_SIZE]={0};
int retval;
int i,j;
void *lw_axi_virtual_base;
if( ( fd = open( "/dev/mem", ( O_RDWR | O_SYNC ) ) ) == -1 ) {
printf( "ERROR: could not open "/dev/mem"...\n" );
return( 1 );
}
lw_axi_virtual_base = mmap( NULL, HW_REGS_SPAN, ( PROT_READ | PROT_WRITE ), MAP_SHARED, fd, HW_REGS_BASE );
if( lw_axi_virtual_base == MAP_FAILED ) {
printf( "ERROR: mmap() failed...\n" );
close( fd );
return( 1 );
}
h2p_vip_capture_addr= lw_axi_virtual_base + ( ( unsigned long )( ALT_LWFPGASLVS_OFST + ALT_VIP_CAPTURE_BASE ) & ( unsigned long)( HW_REGS_MASK ) );
Capture_Start(DEMO_VGA_FRAME0_ADDR);
Capture_Get(BMP_WIDTH,BMP_HEIGHT);
close( fd);
fd = open("/dev/de1_soc_demo", O_RDWR);
if (fd == 1) {
perror("open error\n");
exit(-1);
}
retval = read(fd, read_buffer, BUFFER_SIZE);
if (retval == -1) {
perror("read error\n");
exit(-1);
}
j=0;
for(i=0;i
-
多谢各位的解答
-
看看,谢谢楼主分享
-
不是,通过路由器是可以连接的,就是输入账号名和密码,用的是校园网
-
多谢指点,我还是想问一下这个文件是自己编写的还是在quartus或者Qsys软件生成的
-
本帖最后由 paulhyde 于 2014-9-15 03:39 编辑 最讨厌造谣者!!!!!!,没有你们世界会更安宁
!
-
感谢分享@@@@@@@@@@@@@@@@@!!!!!!!!!!!!!!!!!!!!!1
-
:) :call: :victory: :victory: :Mad: :titter: :Sad:
-
不是谣言吧、?
、??
、