”
Vitis 2019.2 の組み込みプロセッサ プラットフォームの開発をやってみる1(ハードウェア・コンポーネントの作成)”の続き。
前回は、Vivado 2019.2 の組み込みプロセッサ プラットフォームを作ってみようということで、SDx 2019.1 用に作ったハードウェア・プラットフォーム用のVivado 2019.2 のプロジェクトをVivado 2019.2 にアップグレードして、XSA ファイルを生成した。今回は、”
Vitis Unified Software Development Platform Documentation”の”
Embedded Processor Platform Development”の”
Creating the Software Component”を参照しながら、Vitis 2019.2 のソフトウェア・コンポーネントを作成していこう。
(2019/11/14:追記) XRT についての作業を追加した。最初にキーを押すのを間違えて、ソフトウェア・コンポーネントの作成中にUbuntu 18.04 を再起動してしまったので、ログが消えてしまった。。。orz
よって、コマンドの貼り付けるログはほとんど無い。
最初に、PetaLinux のUltra96V2_Platform1 プロジェクトを作成しよう。
petalinux-create --type project --template zynqMP --name Ultra96V2_Platform1
xsa ファイルを指定して petalinux-config を行う。
cd Ultra96V2_Platform1
petalinux-config --get-hw-description=~/HDL/Ultra96/Vitis_platform/2019.2/Ultra96V2_Platform1/設定画面が開く。
Image Packaging Configuration -> Root filesystem type で EXT (SD/eMMC/QSPI/SATA/USB) を選択した。

Yocto Settings -> Enable Debug Tweaks を有効にする (Spaceキーを押す)

Subsystem AUTO Hardware Settings -> Serial Settings -> Primary stdin/stdout を psu_uart_1 に変更する。

設定をセーブして、設定画面を終了した。

エラーが出なかった。PetaLinux 2019.2 から Python 3.6 対応になったようだ。

カーネルの petalinux-config を行って、設定をしていく。
petalinux-config -c kernel端末の別タブに設定画面が表示された。
設定を行う。
Device Drivers -> Generic Driver Options -> Size in MB(1024)に変更した。

Device Drivers -> Staging drivers (ON) はすでにON されていた。
Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver (ON) した。

Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver -> Xilinx APF DMA engines support (ON)

CPU Power Management -> CPU idle -> CPU idle PM support (OFF)

CPU Power Management -> CPU Frequency scaling -> CPU Frequency scaling (OFF)

設定をセーブして、設定画面を終了した。

Root FS を設定する。
petalinux-config -c rootfsFilesystem Packages -> misc -> gcc-runtime -> libstdc++ (ON)

設定をセーブして、Exit した。

XRT を組み込む。
Ultra96V2_Platform1/project-spec/meta-user/conf/user-rootfsconfig を編集する。

CONFIG_xrt
CONFIG_xrt-dev
CONFIG_zocl
CONFIG_opencl-clhpp-dev
CONFIG_opencl-headers-dev
CONFIG_packagegroup-petalinux-opencv
を追加した。

#Note: Mention Each package in individual line
#These packages will get added into rootfs menu entry
CONFIG_gpio-demo
CONFIG_peekpoke
CONFIG_xrt
CONFIG_xrt-dev
CONFIG_zocl
CONFIG_opencl-clhpp-dev
CONFIG_opencl-headers-dev
CONFIG_packagegroup-petalinux-opencv
Ultra96V2_Platform1/project-spec/meta-user/recipes-bsp/device-tree/files ディレクトリの system-user.dtsi を編集した。その際に、zoclドライバを含めた。


/include/ "system-conf.dtsi"
/ {
xlnk {
compatible = "xlnx,xlnk-1.0";
};
};
&amba {
zyxclmm_drm {
compatible = "xlnx,zocl";
status = "okay";
reg = <0x0 0xA0000000 0x0 0x10000>;
};
};
&sdhci0 {
disable-wp;
};
なお、参考にした”
Creating the Software Component”の通りに zocl ドライバの追加を system-user.dtsi に書くと petalinux-build でエラーになってしまう。ネットで検索して、”
zynq zcu102 opencl linux”を見つけて、
reg = <0x0 0xA0000000 0x0 0x10000>;
を追加した。
もう一度、Root FS を設定する。
petalinux-config -c rootfs追加した user Packages を有効にする。


プロジェクトをビルドする。
petalinux-build
- 2019年11月09日 06:52 |
- Vitis
-
| トラックバック:0
-
| コメント:0