cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between Cores with FreeRTOS on STM32H747i-Discovery, How can I adjust the example "FreeRTOS_AMP_Dual-RTOS", which is designed for the STM32H745-Dicovery board?

JSchn.4
Associate III

Hi there,

I am experimenting with the H747i-DISCO board to get the communication between two cores up and running. The mentioned example (github) is written for a slightly different board, the STM32H745-Discovery, so it should be not too difficult to adjust this example to the STM32H747-Discovery. But I am fairly new to the STM32 board and especially to the STM32CubeIDE.

So, your advice will be highly appreciated!

Greetings from Hannover, Germany!

Johannes

22 REPLIES 22

Hi @Ons KOOLI​ ,

thanks for your idea, which I have picked up, but unfortunately have not got too far. Here is what I did and where I got stuck:

With the mentioned example (github) I had two challenges: switch to another target (from STM32H745 to STM32H747) and to port it into the STM32Cube (creating a .ioc).

Therefore I switched to another example which is related to the target I am using. The example I am using now is the OpenAMP_RTOS_Pingpong.

Porting the code is still quite challenging for me, since the example seems to be using CMSISV1 and I need to use CMSIS_V2. Within my application, I do not want to go back to V1, since I am using the new ThreadFlags quite a lot and they have increased the speed of my application.

So I managed to get the Semaphores to work fine, but the function MAILBOX_Poll is not compiling.

I wonder if I am the only one utilising the examples to step into a new functional area. AMP is a totally new area to me, and I really appreciate the examples provided. Wouldn't it make sense to update this example so that it works with the new CMSIS Version 2 and is compliant to the code generated by STM32CubeMX (STM32CubeIDE)?

Thank you very much for your help!

Johannes

Hi @JSchn.4​ ,

For migrating the application from System Workbench / TrueSTUDIO to STM32CubeIDE, I recommend to refer to the following documents:

  • UM2579: Migration guide from System Workbench to STM32CubeIDE (link)
  • UM2578: Migration guide from TrueSTUDIO® to STM32CubeIDE (link)

Other useful documents:

  • Integrated development environment for STM32 products (link)
  • UM2553: STM32CubeIDE quick start guide (link)

Concerning your question about migrating from CMSIS-V1 to CMSIS-V2, I do not really have quite idea about it, I can ask internally for this and then provide you with the solution. I looked on the Internet and found it is possible.

This document can be useful.

I hope that my response help you.

Best Regards,

Ons.

JSchn.4
Associate III

Hi @Ons KOOLI​ ,

thanks again for your quick response.

Unfortunately the migration does not work for Multikernel Projects (see UM2579, Section 2).

The migration from V1 to V2 seemed to be easier than expected. There was just one function (OsSemaphoreWait) which needed to be replaced.

Nevertheless, I still did not get the example to work. I have a clean compile, but the M7 core never receives any messages from M7. MAILBOX_Poll just does not get any interrupts.

I wonder if someone could have a look at my conversion.

Thanks a lot!

Johannes

Hi @JSchn.4​ ,

Can you correct this:

>but the M7 core never receives any messages from M7.

Best Regards,

Ons.

Oh, sorry, the M7 core never receives any messages from M4.

MAILBOX_Poll returns errornr 11 "No more processes".

Thanks for your help!

Johannes

@Ons KOOLI​ 

Did you have a chance to look into my project file "jsc04"?

Would really appreciate it!

Johannes

Hi @JSchn.4​ ,

I am raising the issue internally since I am in home office and have no access to the STM32H747I-DISCO.

Best Regards,

Ons.

Hi @Ons KOOLI​ ,

I found a hint in this release not on page 16.

  •  OpenAMP under STM32CubeIDE need linker file update:
  • – The following lines must be added under the .ld file:
  • /* Specify the memory areas */
  • MEMORY { ... m_ipc_shm (RW) : ORIGIN = 0x38000400, LENGTH = 63K }
  • /* Symbols needed for OpenAMP to enable rpmsg */
  • __OPENAMP_region_start__=ORIGIN(m_ipc_shm);
  • __OPENAMP_region_end__=ORIGIN(m_ipc_shm)+LENGTH(m_ipc_shm)

But even though the behaviour is still the same.

Might be helpful for your colleagues taking care of this now.

Cheers

Johannes

Hi @JSchn.4​ ,

Okay, I added this also in my raise.

Best Regards,

Ons.

Hi @Ons KOOLI​ ,

any news from your team?

Don't want to be too pushy, but we are really waiting for an answer.

Thanks a lot!

Johannes