VF61: rpmsg_pingpong doesn't work after sync with FreeRTOS 1.0.1 release

Trying to fix the issues described in this discussion, the open-amp part for VF61 has been syncronized with the i.MX 7 FreeRTOS 1.0.1 release (http://git.toradex.com/cgit/freertos-toradex.git/log/?h=colibri-vf61-m4-freertos-v8).
I pulled this version from the git repository and I built it with GNU ARM Embedded Toolchain as described here.
When I load this firmware from WinCE 6 (inside the Rpmsg_Demo example supplied with Toradex CE Libraries 2.0-20170524) the example doesn’t work as expected:

  • A5 sends the first message (number 0) to M4 core
  • M4 receives it (and prints to UART), increments by 1 and sends the message (number 1) to A5 core
  • A5 receives it, prints to screen, increments by 1 and sends the message (number 2) to M4 core
  • M4 doesn’t receive anything more

I double check before asking, but if I rebuild the previous version (tag Colibri-VF61-M4_FreeRTOS_1.2-20170407 in Toradex git repository) with the same toolchain, the firmware works as expected.

Couls someone from Toradex (maybe @stefan.tx) check this, please?

We verified it against the last Linux release with which it worked. This is something which needs investigation from the WinCE side.

Hi @vix,

Thank you for your patience. We have to do an update on the Rpmsg lib to sync with FreeRTOS 1.0.1 updates.
Please download updated RPMSG library preliminary release from here.

Hi @raja.tx,
I deleted my old messages because after a new investigation I prefer to summarize the situation in this new post.

  • First of all, I downloaded updated RPMSG library preliminary release ToradexCeLibraries_2.0b4057-20171006

  • I tried the firmware rpmsg_pingpong_example.bin included in the library, but it doesn’t work. On UART2 I see the following debug messages

    Starting RPMSG PingPong Demo…

    RPMSG PingPong FreeRTOS RTOS API Demo…
    RPMSG Init as Remote
    Name service handshake is done, M4 has setup a rpmsg channel [0 —> 1]

Looking inside pingpong.c source file, this means that app_chnl->src is 0

  • I rebuilt the firmware pulled from Toradex git repository with GNU ARM Embedded Toolchain, and I get a .bin file different from the one included in the preliminary library.
    Do you confirm this?

  • I run this firmware with the preliminary library and it doesn’t work.

  • I tried the previous version of the firmware (tag Colibri-VF61-M4_FreeRTOS_1.2-20170407) with the preliminary library. Basically it works, but at the beginning of the messages from UART2 I see

    Starting RPMSG PingPong Demo…
    RPMSG PingPong Demo…
    RPMSG Init as Remote
    init M4 as REMOTE
    Name service handshake is done, M4 has setup a rpmsg channel [1 —> 1]
    Get Data From A5 : 1936552050
    Get Data From A5 : 0
    Get Data From A5 : 2
    Get Data From A5 : 4
    Get Data From A5 : 6

I understand the Data values from 0 to 100, but I don’t see where the first “dirty” value of 1936552050 comes from.

Do you see the same behavior too?

Is there some pending CPU2CPU interrupt not cleared?

Could you investigate and see if a fix is needed (either in firmware for M4 or in WinCE library/Rpmsg_Demo example)?

@vix,
Thank you for your detailed inputs. Please wait for some days. I will look this on Monday and reply to you.

@vix, I have tested preliminary release firmware binary and Rpmsg demo, it works with 1.5 b2 WinCE image release.

Please refer below M4 debug message logs:
Starting RPMSG PingPong Demo…
RPMSG PingPong FreeRTOS RTOS API Demo…
RPMSG Init as Remote
Name service handshake is done, M4 has setup a rpmsg channel [0 —> 1]
Get Data From Master Side : 0
Get Data From Master Side : 2
Get Data From Master Side : 4

I didn’t observe dirty first value.

Let us know which WinCE image release you have used?

@raja.tx, I use 1.5 b2 WinCE 6 release with the firmware included in preliminary release you linked (which is 2.0b4057-20171006).
So this should be the same configuration that you used too.
As an additional information, the MD5 of rpmsg_pingpong_example.bin I use is 233BFB45717934513D1496425E9E0610 (calculated uploading the file to http://onlinemd5.com/).

When I build, deploy and run the example Rpmsg_Demo (included in the same preliminary release of the library), this is what I get from UART2:

Starting RPMSG PingPong Demo...

RPMSG PingPong FreeRTOS RTOS API Demo...
RPMSG Init as Remote
Name service handshake is done, M4 has setup a rpmsg channel [0 ---> 1]

On the command window opened in WinCE I see

Rpmsg_Open returns SUCCESS

and nothing else.

Did you use some newer preliminary library?

Check sum is matching with my test setup.

I made another preliminary release on that same version, could you please try that and let me know your feedback.

  1. Vybrid image version 1. 5 beta 2 OS and bootloader.
  2. ToradexCeLibraries_2.0b4057-20171017 library.

I double checked the version of OS and bootloader and I confirm it is 1.5 beta 2. When I upgraded the OS I had the problem described here, but I solved as described in the same thread.
I downloaded ToradexCeLibraries_2.0b4057-20171017 and tested, with the same result described in my previous post (it doesn’t work).

I want to clarify some points:

  • I build, deploy and debug using VS2008 and the supplied solution file. But I must change two things in the solution file (otherwise the deploy and debug is impossible)
  • Configuration Properties >> Deployment >> Additional files must be changed to “rpmsg_pingpong_example.bin|$(ProjectDir)\src|\flashdisk|0”
  • Configuration Properties >> Debugging >> Remote executable must be changed to “\FlashDisk\Rpmsg_Demo.exe”

Do you confirm the above changes?
Do you use VS2008 too or other systems to build, deploy and run?

I tried to build with VS2008 and to copy manually the files to the device. If I run the example with double click from Win CE 6 the behavior is the same.
No differences if I build Debug or Release configuration.

The version of my Colibri module is V1.2A. Does this make difference?

I attach the two exe files (debug and release) that I built with VS2008.
Could you copy them inside \FlashDisk\ folder together with the bin and run them? Do they work on your Colibri module?

exe files

@vix,
Your application is running perfectly at my place. I am wondering what would be the problem. Could you please log WinCE debug messages and verify with mine. Shall we do skype call + screen sharing?

Just for testing, could you run update tool and verify few of its features are working?

Maybe you can try to run few Toradex CE library demo applications and verify it is running?

Please download my build files and put the files into \FlashDisk and then test it.

@raja.tx, I did the tests you seggested, together with other test but the behavior on my colibri module never changed. Both with the binaries recompiled by me and with those recompiled by you, on the command window I see

Rpmsg_Open returns SUCCESS

and nothing else.
I uploaded my WinCE debug messages in three different conditions:

  • myVybDebug_02.txt is the file in the original situation of my Colibri module and Evaluation Board (without connection between X29 and my PC)
  • myVybDebug_07.txt is the file after I plugged for the first time a CR2032 battery and set the RTC (never done in the past on my Evaluation Board)
  • myVybDebug_08.txt is what I get after having removed the RTC battery and having waited for the discharge of C92 and C93 capacitors on Evaluation board

I noticed some differences between my and your log file:

  • hardware version of colibri module (1.2A vs 1.1B)
  • line “Registry - registry is empty.” missing from my logs
  • “Waiting for flash disk \FlashDisk for xxx seconds” where xxx is 300 in your file and 60 in mine
  • a different number of OEMSetAlarmTime entries

After I plugged the RTC battery for the first time, some of the entries in the log have been “swapped” and the didn’t get back to the original order (even after removal of the battery and discharge of capacitors).
This is quite strange for me, but maybe you have an explanation.

I tested successfully other Toradex CE library demo applications (Gpio_Demo, Pwm_Demo, Spi_Demo)
I’m available for a skype call + screen sharing (we can exchange credential in private).

We are discussing on mail. Once we arrived solution, will post here.

The problem has been fixed in V2.1 release of Toradex CE Libraries.