IMX7的双核通信例子问题(rpmsg)

来源:互联网 发布:linux怎么建立文件 编辑:程序博客网 时间:2024/06/05 06:21

IMX7的双核通信例子问题(rpmsg)

首先在主机Ubuntu上完成对colibri imx7的rpmsg例子的编译,并下载到SD卡中,在硬件连接为UART_A和UART_B的开发板上,通过Xshell连接连个COM口,然后在控制端口的U-BOOT环境下,输入:

\# fatload mmc 0:1 0x7F8000 rpmsg_pingpong\_example.bin\# dcache flush\# bootaux

完成对rpmsg_pingpong_example.bin程序的加载,使得M4内核开始执行remote的工作,之后在U-BOOT环境下,输入:
\# boot
进入A7内核的linux环境下,然后输入:
\# modporbe imx_rpmsg_pingpong
使得A7内核开始执行master端的工作,正常情况下,应该出现如下情况:
这里写图片描述
实际出现的情况如下:
这里写图片描述
错误提示是MU超时,但在检查了”xSemaphoreTake(app_sema, portMAX_DELAY)“函数之后,发现不会是这个问题,因为时间设置的是无限。在编译运行另一个程序rpmsg_str_echo_example.bin仍没得出正确输出之后,确定了不是超时的问题,根据输出的错误提示跟usb设备有关,在参考“FreeRTOS BSP i.MX 7Dual Demo Application User’s Guide”手册之后,发现可能是UART_A的连接问题,原指导步骤如下:

1. Connect a USB cable between the PC host and the Debug UART port on the board.2. Open two serial terminals with these settings for each of the virtual serial instances:115200 baud rate• 8 data bits• No parity• One stop bit• No flow control3. Load the demo binary to target board using U-Boot.4. Boot auxiliary ARM Cortex-M4 Core to begin running the demo.5. Boot the Linux kernel, and run the pingpong master side demo.

但现在仍没找到正确的解决方法,后续补之。。。

问题解决方案

通过查阅相关社区论坛后,发现其他人也有此类问题,解决方案是给IMX7的板子重新刷一遍系统(Colibri IMX7 PingPong example issue),帖子中的解决方法刷的是
Colibri_iMX7_LinuxImageV2.6Alpha1_20160315.tar.bz2
系统,我是用的系统是
Colibri_iMX7_LinuxImageV2.6Beta2_20160630.tar.bz2
系统,不过20160630版的系统,必须使用the master-1.0.1 branch的FreeRTOS压缩包,不然会出现UART_B端口不能正常显示输出信息的错误,相关问题和解决方案(HelloWorld demo doesn’t work with FreeRTOS on Colibri i.MX7),最后附上刷新系统的方法:
Flashing Embedded Linux to iMX7 Modules
(注意,帖子中的format_sd.sh文件在VF系列的内核压缩包中可以找到,在IM7系列的内核压缩包中是没有的,并且需要进行相关修改才能使用)
至此,关于IMX7的双核通信例子问题得以解决。

0 0
原创粉丝点击