使用vivado2019.2和petalinux 2019.2制作带无线wifi的ultra96v2

使用vivado2019.2和petalinux 2019.2制作带无线wifi的ultra96v2的BSP软件包

目 录

一、使用vivado设计带wifi的ultra96v2硬件平台

二、使用vitis设计hello程序,验证平台

三、用户设备树:修改system-user.dtsi无线SD,增加有关virtIO的openamp.dtsi

四、u-boot:增加recipes-bsp/u-boot文件,platform.h指示装载kernel device tree位置和有关DHCP的bsp.cfg

五、用户应用:增加蓝牙无线recipes-bsp/ultra96-misc和wilc3000-fw

六、kernel:增加recipes-kernel文件,有关USB和SPI的 bsp.cfg,无线上电复位patch,直接配置有关APF和CMA的user.cfg

七、根文件模块:创建和编译led-brightness 和wilc模块

八、根文件配置:拷贝rootfs_config文件,直接配置根文件

九、根文件库:应用sds-lib创建、库拷贝、编译

十、第八步 根文件通配:网卡启动recipes-core, 鼠标键盘屏幕recipes-graphics和网络及启动配置recipes-utils

十一、根文件用户配置:直接增加上一步配置user-rootfsconfig和改变petalinuxbsp.conf

十二、启动Kernel panic分析解决

以下所有软件硬件代码均可从下面的网址下载:

xilinx petalinux2019.2开发的ultra96v2 BSP,含硬件设计和软件配置.docx-Linux代码类资源-CSDN下载

https://download.csdn.net/download/u010879745/12307621

一、 使用vivado设计带wifi的ultra96v2硬件平台

加AXI Interconnect、RST、GPIO、UART16650、BRAM IP模块并按照下图连接:

建立限制文件:

set_property PACKAGE_PIN B5 [get_ports BT_HCI_CTS]

set_property PACKAGE_PIN B7 [get_ports BT_HCI_RTS]

/# Fan control

/# Bank 65

set_property PACKAGE_PIN F4 [get_ports FAN_PWM]

set_property DRIVE 8 [get_ports FAN_PWM]

/# Low-speed expansion connector

/# Bank 65

set_property PACKAGE_PIN D7 [get_ports {HD_GPIO[0]}]

set_property PACKAGE_PIN F8 [get_ports {HD_GPIO[1]}]

set_property PACKAGE_PIN F7 [get_ports {HD_GPIO[2]}]

set_property PACKAGE_PIN G7 [get_ports {HD_GPIO[3]}]

set_property PACKAGE_PIN F6 [get_ports {HD_GPIO[4]}]

set_property PACKAGE_PIN G5 [get_ports {HD_GPIO[5]}]

set_property PACKAGE_PIN A6 [get_ports {HD_GPIO[6]}]

set_property PACKAGE_PIN A7 [get_ports {HD_GPIO[7]}]

set_property PACKAGE_PIN G6 [get_ports {HD_GPIO[8]}]

set_property PACKAGE_PIN E6 [get_ports {HD_GPIO[9]}]

set_property PACKAGE_PIN E5 [get_ports {HD_GPIO[10]}]

set_property PACKAGE_PIN D6 [get_ports {HD_GPIO[11]}]

set_property PACKAGE_PIN D5 [get_ports {HD_GPIO[12]}]

set_property PACKAGE_PIN C7 [get_ports {HD_GPIO[13]}]

set_property PACKAGE_PIN B6 [get_ports {HD_GPIO[14]}]

set_property PACKAGE_PIN C5 [get_ports {HD_GPIO[15]}]

/# Set the bank voltage for IO Bank 26 to 1.8V

set_property IOSTANDARD LVCMOS18 [get_ports -of_objects [get_iobanks 26]]

/# Set the bank voltage for IO Bank 65 to 1.2V

set_property IOSTANDARD LVCMOS12 [get_ports -of_objects [get_iobanks 65]]

导入项目:

编译运行:

二、 使用vitis设计hello程序,验证平台

打开vitis

选择第一步生成的硬件文件

改变BSP

修改成psu_uart_1

编译运行

创建应用程序

选择刚建的硬件平台

选择应用程序

编译应用程序

如果出现下面的问题,是因为你的硬件平台未编译

如果出现下面的乱码,说明你的串口未正确配置

出现下面的问题,说明你的库文件路径未能正确配置

Release 2019.2 Mar 25 2020 - 21:27:59

PMU-FW is not running, certain applications may not be supported.

正确输出:

[email protected]:~/ultra96v2_1-master$ petalinux-create --type project --template zynqMP --name ultra96v2_1OS

[email protected]:~/ultra96v2_1-master/ultra96v2_1OS$ petalinux-config --get-hw-description ./

?Subsystem AUTO Hardware Settings → Serial Settings → Primary stdin/stdout → (psu_uart_1)

?DTG Settings → MACHINE_NAME → (avnet-ultra96-rev1)

?u-boot Configuration → u-boot config target → (avnet_ultra96_rev1_defconfig)

?Image Packaging Configuration → Root filesystem type → (SD card)

?Yocto Settings → YOCTO_MACHINE_NAME → (ultra96-zynqmp)

三、 用户设备树:修改system-user.dtsi无线SD,增加有关virtIO的openamp.dtsi

system-user.dtsi增加内容:WILC3000无线与SD设备

增加openamp.dtsi文件:openamp库提供虚拟模块共享内存IO标准(virtIO: OpenAMP library implements virtIO standard for shared memory management),增加AMBA (Advanced Microcontroller Bus Architecture) protocols, 高级微处理器总线 power demain电源域和reserved-memory保留内存

device-tree.bbappend增加内容:file://openamp.dtsi

SDHC interface node for the ATWILC3000 chip:

&sdhci1 {

bus-width= <0x4>;

disable-wp;

max-frequency = <50000000>;

/delete-property/cap-power-off-card;

mmc-pwrseq = ;

status = “okay”;

#address-cells = <1>;

#size-cells = <0>;

[email protected] {

compatible = “microchip,wilc3000”, “microchip,wilc3000”;

reg = <0>;

bus-width= <0x4>;

status = “okay”;

};

// Remove TI child node from U96 V1 DT

/delete-node/[email protected];

};

SD card slot:

/* SD0 only supports 3.3V, no level shifter */

&sdhci0 {

no-1-8-v;

disable-wp;

};

四、 u-boot:增加recipes-bsp/u-boot文件,platform.h指示装载kernel device tree位置和有关DHCP的bsp.cfg

增加platform.h(指示装载kernel device tree) 和bsp.cfg(DHCP选项),修改bbappend文件。

platform.h file to tell u-boot where to load the kernel and device tree from after the first stage boot loader passes control off to u-boot. A bsp.cfg file enables a few more options needed by the Ultra96 such as DHCP and ping mode.

五、 用户应用:增加蓝牙无线recipes-bsp/ultra96-misc和wilc3000-fw

/project-spec/meta-user/recipes-bsp/ directory wilc3000-fw and ultra96-misc directories

六、 kernel:增加recipes-kernel文件,有关USB和SPI的 bsp.cfg,无线上电复位patch,直接配置有关APF和CMA的user.cfg

增加 the bsp.cfg和fix_u96v2_pwrseq_simple.patch文件,前者为USB和SPI配置使能,后者为 WILC3000上电复位顺序,增加user.cfg配置文件,省略petalinux-config -c kernel时间

按照下面的指令配置kernel:

解释:user.cfg 中的active power filter (APF)

[email protected]:~/ultra96v2_1-master/ultra96v2_1OS$ petalinux-config -c kernel

NOTE: Executing RunQueue Tasks

Currently 1 running tasks (373 of 373) 99% |####################################### |

0: linux-xlnx-4.19-xilinx-v2019.2+git999-r0 do_menuconfig - 2005s (pid 20124)

如果你发现未打开kernel config,很可能它已经在另一个tab里已经打开,详见

https://forums.xilinx.com/t5/Embedded-Linux/quot-petalinux-config-c-kernel-quot-stuck-and-config-window/td-p/1027178

将文件bsp.cfg和fix_u96v2_pwrseq_simple.patch拷到/project-spec/meta-user/recipes-kernel/linux/linux-xlnx

前者为USB和SPI配置使能,后者为 ATWILC3000的上电复位顺序

七、 根文件模块:创建和编译led-brightness 和wilc模块

petalinux-create -t modules --name led-brightness --enable

petalinux-create -t modules --name wilc –enable

只有led-brightness需要拷贝源程序

petalinux-build -c wilc

petalinux-build -c led-brightness

八、 根文件配置:拷贝rootfs_config文件,直接配置根文件

九、 根文件库:应用sds-lib创建、库拷贝、编译

[email protected]:~/ultra96v2_1-master/ultra96v2_1OS$ petalinux-build -c sds-lib

十、 第八步 根文件通配:网卡启动recipes-core, 鼠标键盘屏幕recipes-graphics和网络及启动配置recipes-utils

拷贝recipes-core(网卡启动), recipes-graphics(鼠标键盘屏幕)和 recipes-utils(网络及启动配置)拷入 /project-spec/meta-user/。

十一、 根文件用户配置:直接增加上一步配置user-rootfsconfig和petalinuxbsp.conf 改变

将文件user-rootfsconfig拷入/project-spec/meta-user/conf。

在petalinuxbsp.conf增加以下内容:

MACHINE_FEATURES_remove_ultra96-zynqmp = “mipi”

DISTRO_FEATURES_append = " bluez5 dbus"

PREFERRED_VERSION_wilc-firmware = “15.2”

IMAGE_INSTALL_remove = “ultra96-ap-setup”

存盘退出

[email protected]:~/ultra96v2_1-master/ultra96v2_1OS$ petalinux-config

[INFO] generating Kconfig for project

[INFO] menuconfig project

*** End of the configuration.

*** Execute ‘make’ to start the build or try ‘make help’.

[INFO] sourcing bitbake

[INFO] generating plnxtool conf

[INFO] generating meta-plnx-generated layer

[INFO] generating user layers

[INFO] generating workspace directory

[INFO] generating bbappends for project . This may take time !

[INFO] generating u-boot configuration files

[INFO] generating kernel configuration files

[INFO] generating kconfig for Rootfs

[INFO] silentconfig rootfs

[INFO] generating petalinux-user-image.bb

编译build the project as a whole:

petalinux-build

打包

petalinux-package --boot --fsbl ./images/linux/zynqmp_fsbl.elf --fpga ./images/linux/system.bit --pmufw ./images/linux/pmufw.elf --u-boot

十二、 启动Kernel panic分析解决

拷入SD,启动后发现Kernel panic

[ 22.987830] Starting init: /bin/sh exists but couldn’t execute it (error -13)

[ 22.994963] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.

[ 23.056710] —[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]—

经过漫长的原因查找后,发现是由于解压缩至SD卡时,发生了libc-2.28.so文件错误,

技术教程图

改正后:

另一文件,同样发生拷贝错误

改正后:

自动获得了IP地址:

已能通过无线wifi和MobaXterm操作ultra96v2上的文件系统:

实物照片,可以看到wifi灯和blue灯正常点亮:

使用vivado2019.2和petalinux 2019.2制作带无线wifi的ultra96v2相关教程

zynq linux打印乱码,使用vivado2019.2和petalinux 2019.2制作带无线wifi的ultra96v2相关推荐

  1. 使用vivado2019.2和petalinux 2019.2制作带无线wifi的ultra96v2的BSP软件包

    目 录 一. 使用vivado设计带wifi的ultra96v2硬件平台 二. 使用vitis设计hello程序,验证平台 三. 用户设备树:修改system-user.dtsi无线SD,增加有关vi ...

  2. 集多功能为一体的智能WiFi模块Linux多线程处理器openwrt开发板工业4G路由器网口有线转无线WiFi

    集多功能为一体的智能WiFi模块Linux多线程处理器openwrt开发板工业路由器网口有线转无线WiFi双路RS485/RS232串口透传 RMS7688A集多功能为一体的智能WiFi模块,能跑Li ...

  3. HP LaserJet 400 color M451nw打印机打印乱码

    原因: 打印文件异常,无法自动清理,持续打印乱码. 解决方法: 1.断开数据传输线(无线.网线.数据线): 2.关闭打印机,重启: 3.将发送异常打印文件删除,彻底删除C:\Windows\Syste ...

  4. zynq+linux固化程序,如何在 Zynq UltraScale+ MPSoC 上实现 Linux UIO 设计

    原标题:如何在 Zynq UltraScale+ MPSoC 上实现 Linux UIO 设计 简介 作者: Alex He (何晔), 赛灵思高级嵌入式应用工程师 这里的 UIO 即 Userspa ...

  5. ZYNQ Linux 移植:包含petalinux移植和手动移植debian9

    问题: 1.ZYNQ Linux启动流程: BOOTROM→FSBL→Uboot→Kernel→RootFS 环境: 虚拟机ubuntu16.04 petalinux2018.3 vivado2018 ...

  6. Zynq Linux 使用 SPI ADC (ADS8332)

    目录 参考文章 一.ADS8332介绍 1. ADS8332通道选择模式 2. ADS8332转换开始(CONVST)控制 3. ADS8332转换结束(EOC)状态 4. ADS8332 TAG模式 ...

  7. linux vlc乱码,一劳永逸解决VLC播放中文字幕乱码问题

    VLC对于Mac/Ubuntu用户来说算得上是必备软件.其相当于PC机上的"暴风影音",但Mac/Ubuntu的新手使用VLC播放avi时都会碰 到字幕乱码的问题.avi字幕的格式 ...

  8. 转载:ZYNQ+linux网口调试笔记(1)PS-GEM0

    ZYNQ+linux网口调试笔记(1)PS-GEM0 转载原文:https://www.jianshu.com/p/a4e25e8b2f5e 开发环境 Windows SDK 2017.4 Ubunt ...

  9. linux ps-pl中断,zynq linux驱动之PL-PS中断

    PC:Windows 10 虚拟机:ubuntu 16.04 vivado:2017.04 PetaLinux:2017.04 开发板:黑金AX7010 根文件系统:debian8 --------- ...

最新文章

  1. Web API路由和动作选择
  2. JAVA的WebService规范JAX-WS
  3. java原生的编译软件_Java 转原生平台代码 RoboVM
  4. CSS外边距(margin)重叠及防止方法
  5. npcap loopback adapter是什么意思_抖音限流是什么意思? 抖音为什么突然限流?
  6. JNDI配置原理详解
  7. 你好,未来! | 2018腾讯“云+未来”峰会五月启幕
  8. Bagging与Boosting的区别与联系
  9. 以太坊 ERC EIP是什么
  10. 分类和聚类有什么区别?
  11. VMware虚拟机Mac OS X 扩展内存方法
  12. Moore-Penrose广义逆矩阵
  13. html5 浮标,【钓鱼技巧】主说调与钓 附5个实战技巧
  14. 大学web基础期末大作业~仿品优购页面制作(HTML+CSS+JavaScript)
  15. 北大计算机辅助翻译专业考研,【最新权威版】2019年北京大学计算机辅助翻译CAT考研难度解析—报录比...
  16. 多线程设计模式-主仆模式
  17. 【乐逍遥网站设计】2022年网站设计与UI元素的趋势
  18. 使用Java的讯飞语音识别示例
  19. Broadbandits 网络盗匪 | 经济学人中英双语对照精读笔记
  20. win7摄像头软件_菜鸟记400旧手机当摄像头,网课直播设备不用愁

热门文章

  1. 智能合约及其web3共识机制
  2. MyBatis 使用 Redis 缓存
  3. 【Java 8 新特性】Java 8 BigDecimal求和
  4. 在Mac上打pxl的安装包
  5. 15种分类变量编码方法
  6. 2012情人节祝福语
  7. Linux 账号和权限管理
  8. 阿里敏捷教练如何优化优酷需求分析流程?
  9. Movavi Screen Recorder for Mac(专业屏幕录像编辑软件)
  10. xen html音乐挂件,教你在越狱后用挂件美化锁屏界面