MCC for FreeRTOS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCC for FreeRTOS

11,599 Views
imanolallende
Contributor III

I have the IMX6SoloX SABRESD board. I have seen that there is a MCC example for MQX which achieve communication between both cores sharing a section of the RAM memory. However, for FreeRTOS there is only available the pingpong example which achieve communication through the MU. Is this correct?

I would like to achieve communication through the shared RAM but in FreeRTOS. Does someone know where I can founf the code?

Labels (1)
25 Replies

573 Views
radimkratochvil
NXP Employee
NXP Employee

Hi Imanol,

 

I set the addresses 0x91F000 and 0x91F800 as you suggested.

Radim.

0 Kudos
Reply

573 Views
imanolallende
Contributor III

Hi Radim,

Which kernel do you use? I modify just those two files but I do not get it.

0 Kudos
Reply

573 Views
radimkratochvil
NXP Employee
NXP Employee

Hi Imanol,

 

I used 3.14.52-1.1.0_ga. You can try to load binary with original address to M4 and if it will work, than we will know, that problem is in the Linux. You can also try to change the addresses to 0x908000 and 0x909000

 

Radim.

0 Kudos
Reply

573 Views
imanolallende
Contributor III

Hi Radim,

It still does not work. I changed to 3.14.52-1.1.0_ga.

  1. With the default value in M4 and the default value in imx_rpmsg.c and works.
  2. With the default value in M4 and the MODIFIED value in imx_rpmsg.c and DOES NOT work.
  3. With the MODIFIED value in M4 and the MODIFIED value in imx_rpmsg.c and DOES NOT work.

I use the imx6sx-sdb-m4.dtb and I copy the rpmsg_str_echo_freertos_example.bin and the Linux zImage its time I compile.

Imanol

0 Kudos
Reply

573 Views
b50844
NXP Employee
NXP Employee

Hi Imanol,

As you can see in the original hardcoded version, the VRING addresses are spaced by 0x8000 (32kB) and not 0x800 (2kB). The reason is that the size of one vring is (with the default configuration) 3*4096B = 12kB. 
If you still want to use your layout, you will also need to change  RPMSG_NUM_BUFS and/or RPMSG_BUF_SIZE so that your VRING fits into 2048.. But even if you do it like this, it will not work, since the VRING must take at least one page size, which is 4kB (> 2kB (0x800)). Also, if you change RPMSG_NUM_BUFS or RPMSG_BUF_SIZE, you need to do the same changes analogically on the M4/FreeRTOS side.

My recommendation is you use the same spacing as in the default case (0x8000), if you are not much size constrained.
I would also recommend you to have a look here: GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices . It is a repository, where I tried to show, how to use RPMsg Lite + FreeRTOS vs. RPMsg in Linux on i.MX6SX SDB board.

Regards,
Marek NOVAK