FC2カウンター FPGAの部屋 Vitis 2019.2 の組み込みプロセッサ プラットフォームの開発をやってみる2(ソフトウェア・コンポーネントの作成1)
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

Vitis 2019.2 の組み込みプロセッサ プラットフォームの開発をやってみる2(ソフトウェア・コンポーネントの作成1)

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
Vitis_Platform_16_191107.png

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) を選択した。
Vitis_Platform_17_191107.png

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

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

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

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

カーネルの petalinux-config を行って、設定をしていく。
petalinux-config -c kernel

端末の別タブに設定画面が表示された。
設定を行う。
Device Drivers -> Generic Driver Options -> Size in MB(1024)に変更した。
Vitis_Platform_23_191107.png

Device Drivers -> Staging drivers (ON) はすでにON されていた。

Device Drivers -> Staging drivers -> Xilinx APF Accelerator driver (ON) した。
Vitis_Platform_24_191107.png

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

CPU Power Management -> CPU idle -> CPU idle PM support (OFF)
Vitis_Platform_26_191107.png

CPU Power Management -> CPU Frequency scaling -> CPU Frequency scaling (OFF)
Vitis_Platform_27_191107.png

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

Root FS を設定する。
petalinux-config -c rootfs

Filesystem Packages -> misc -> gcc-runtime -> libstdc++ (ON)
Vitis_Platform_29_191107.png

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

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

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

#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ドライバを含めた。
Vitis_Platform_31_191107.png

Vitis_Platform_63_191113.png

/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 を有効にする。
Vitis_Platform_64_191113.png

Vitis_Platform_65_191113.png

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

コメント

コメントの投稿


管理者にだけ表示を許可する

トラックバック URL
https://marsee101.blog.fc2.com/tb.php/4698-58578d0f
この記事にトラックバックする(FC2ブログユーザー)