얕고 넓게

[FPGA] ZYBO Z7: Image Sensor to HDMI 본문

IT/FPGA

[FPGA] ZYBO Z7: Image Sensor to HDMI

블랙오닉스 2022. 2. 12. 15:25

0. Ref

https://rubber-tree.tistory.com/75?category=954288 

 

[Zybo z7-20 보드 실습] Pcam 5C 영상 출력 (MIPI - HDMI)

프로젝트 컨셉 이번에는 Zybo z7-20 보드로 해보고 싶었던 카메라 Pcam 5C 실습을 해보겠습니다 PCam 5C는 MIPI 통신을 사용하며 보드에 장착되어 있는 HDMI TX 포트를 이용하여 모니터에 촬영되는 영상을

rubber-tree.tistory.com

 

https://digilent.com/reference/learn/programmable-logic/tutorials/zybo-z7-pcam-5c-demo/start?_ga=2.155411774.408121669.1620950911-477770147.1617751612 

 

Zybo Z7 Pcam 5C Demo - Digilent Reference

 

digilent.com

https://github.com/Digilent/Zybo-Z7-20-pcam-5c/releases

 

Releases · Digilent/Zybo-Z7-20-pcam-5c

Contribute to Digilent/Zybo-Z7-20-pcam-5c development by creating an account on GitHub.

github.com

 


1. 다운로드

Github에서 최신 다운로드

* Source가 아닌 전체 다운로드, README.md에 자세한 설명

 

2. Vivado (2021.1)

*.xpr로 프로젝트 열기

bitstream을 생성하지 않고 바로 export

 

3. Vitis

xsa를 가지고 프로젝트 생성

empty -> import source -> sdk가 있는 디렉토리 지정

buitl -> xparamters.h 없다고 에러


4. 재검색

Vivado -> Vitis

https://digilent.com/reference/programmable-logic/guides/getting-started-with-ipi

 

Getting Started with Vivado and Vitis for Baremetal Software Projects - Digilent Reference

 

digilent.com

xparameters.h는 Vivido 에서 export할 때 생성됨??

xparameters.h  is a file generated during the process of exporting a platform from Vivado

=> Vitis Include path에 Vavado wrapper processor include 디렉코리 위치 추가

 

=> 우선 Application이 아닌 Platform을 먼저 빌드해야 할 것 같음, 하지만 에러

"Compiling MIPI_CSI_2_RX..." arm-xilinx-eabi-gcc.exe: error: *.c: Invalid argument arm-xilinx-eabi-gcc.exe: fatal error: no input files compilation terminated. make[3]: *** [Makefile:18: libs] Error 1 make[2]: *** [Makefile:46: ps7_cortexa9_0/libsrc/MIPI_CSI_2_RX_v1_0/src/make.libs] Error 2 make[1]: *** [Makefile:18: all] Error 2

구글에서 "Vitis MIP_CSI_2_RX error" 검색 결과

https://rightxlight.co.jp/achievements/zybo-z7-pcam-5c-demo%E3%82%92vivado-2020-02%E3%81%A7%E5%8B%95%E4%BD%9C%E3%81%95%E3%81%9B%E3%81%A6%E3%81%BF%E3%81%9F/

 

 

Zybo Z7 Pcam 5C DemoをVivado 2020.02で動作させてみた

とある業務の動作検証として、Zybo Z7 Pcam 5C DemoをVivado 2020.02で実行したのですが、推奨バージョンの違いから何点か詰ま

rightxlight.co.jp

 

6개 Makefile 수정

#OUTS = *.o
OUTS = $(addsuffix .o, $(basename $(wildcard *.c)))

=> 에러 => Vitisa 내에서 수정 => 에러


https://qiita.com/kan573/items/b095f9e93eb48bcf3874

 

1500円ZYNQ基板とPiCamV2でZyboのPcam5Cデモを動かす(前編) - Qiita

(2021.5.21 更新) 8-2. Digilent 製 IP のアップグレード の項目を追加しました。 これをやらないと、エクスポートした .xsa に含まれるドライバの makefile が古い物になり、プロットフォームプロジ...

qiita.com

Digilent Vivado IP 다운로드후

Zybo-Z7-20-pcam-5c-2019.1\vivado_proj\Zybo-Z7-20-pcam-5c.ipdefs\repo_0\vivado-library\ip 복사

(직접 다운 받은 버젼의 Makefile은 OBJECTS=... 로 변경되어 있음 @2022/02/12)

 

=> 직접 복사하면 Managing Output Products 에서 끝나지 않음


VPG에서 문제가 있는 것 같음

https://support.xilinx.com/s/question/0D52E00006hpYEVSA2/vivado-20202-generate-block-design-does-not-become-finish?language=en_US 

 

Vivado 2020.2 => Generate Block Design does not become finish

 

support.xilinx.com

우선 빌드에서 문제가 잇는 MIPI_D_PHY, MIPI_CSI의 Makefile만 수정 -> Generate Output Product (중간에 Cancel) -> Export -> Vitis -> Makefile이 수정이 안되어 있음

 

Vivado IP library에서 Makefile의 내용 전체를 Vitis에서 직접 붙여넣기 해서 정상 적으로 빌드.

* 프로젝트의 센서 (OV5640)와 Raspberry Pi 용 센서가 달라 Error 발생

Connected to COM5 at 115200
terminate called after throwing an instance of 'digilent::OV5640::HardwareError'
  what():  Got 00 1a. Expected 56 40

OV5640.h를 수정하여 Sensor ID확인을 막음

	void init()
	{
		uint8_t id_h, id_l;
		readReg(reg_ID_h, id_h);
		readReg(reg_ID_l, id_l);
		if (0) //(id_h != dev_ID_h_ || id_l != dev_ID_l_)

화면은 깨지지만 일단 출력됨

'IT > FPGA' 카테고리의 다른 글

[FPGA] ZYBO Z7: HDMI Pass Through  (0) 2022.02.13
[FPGA] ZYBO Z7: OV5647 (라즈베리파이 )  (0) 2022.02.13
[FPGA] ZYBO Z7: UART @PS  (0) 2022.02.12
[FPGA] ZYBO Z7: UART with Pmod IPs  (0) 2022.02.12
[FPGA] ZYBO Z7: UART (Pmod USBUART)  (2) 2022.02.12