New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample: openamp: add support for stm32h747i_disco board #38322
Conversation
@galak @hubertmis Hi, Did you have meet booting problem when working with open-amp and rpmsg_service samples? On stm32h747i_disco board, when run openamp and rpmsg_service sample, M4 are not boot. stm32h747i_disco have a M7(master) and M4(remote). M4 not support openocd debug, I add led blinky to it's main function, but it's not blink. I have check the M4 image on flash and zephyr.bin file, it's same. |
0e02b86
to
6b969e9
Compare
@cameled just to let you know there is a discussion going on whether we want to deprecate rpmsg_service in favour of ipc_service. |
@cameled Is that specific to those samples ? |
@carlescufi Thanks for you mentioning. open-amp raw interface are not friendly for end user, |
@erwango I get once time M4 boot success case with this PR, no matter power-down or reset, M4 will always boot success. After I re-flash the M4 board with the same image, boot failed happened again. Looks there has some deeper issues that I can't find out. |
@ABOSTM, can you check this is the expected configuration? |
Another issue, shared memory not work fine. If write val1 to sram4(0x38000000) on CM7,
then read val2 from sram4(0x38000000) on CM4.
val1 and val2 are not equal ;-) |
Cache? |
Yes, looks like it's a cache issue. |
@erwango Finally, open-amp and rpmsg_service samples work fine. There have two issue block this PR.
|
For (2) you want to take a look at OpenAMP/open-amp#293 |
It is not the expected behavior, it should work with BCM4 enabled (especially as it is the default configuration out of the box), and it used to work when I worked on this dualcore. So it sounds like a regression |
There have some unknown areas, why open-amp not running code(POST_KERNEL and main) can affect the CM4 booting process. |
b9eb86b
to
a653bf8
Compare
the pull request is not counting ? @cameled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments else LGTM
samples/subsys/ipc/rpmsg_service/boards/stm32h747i_disco_m7.overlay
Outdated
Show resolved
Hide resolved
4b6bb57
to
4eec821
Compare
@cameled I've had a try on my board and unfortunately I can't get it working.
On M4:
Trying to debug (m7 side), it seems to be doing right, waiting in |
Quick fix: |
\o/ working fine now! Thanks |
@carlocaione have merged the openamp cache helpers OpenAMP/open-amp#293 to Zephyr. But there have an interface missing issue report by @lenghonglin #38322 (comment). |
What about adding CONFIG_NOCACHE_MEMORY with a note specifying this is a temp workaround waiting the issue to be fixed ? Otherwise I'd prefer we avoid to merge current PR if not working as is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about adding CONFIG_NOCACHE_MEMORY with a note specifying this is a temp workaround waiting the issue to be fixed ? Otherwise I'd prefer we avoid to merge current PR if not working as is.
Agreed
How CONFIG_NOCACHE_MEMORY is working? |
From ARM Cortex-M7 Reference Manual, section "4.1.3 Initializing and enabling the L1 cache", L1 cache are disabled by default. stm32h7 enable this at soc_m7.c file with CONFIG_NOCACHE_MEMORY check.
|
4eec821
to
d74fe90
Compare
This part is indeed uncorrect and I hope #40146 should help providing a better solution. |
Will update at this weekend. |
Sorry for the delay. After check the ipc_service sample, I find there have an ipm channel number requirement. |
d74fe90
to
8e968ba
Compare
That's fine. You can use just one single channel for tx/rx. |
This add openamp sample run on stm32h747i_disco board. The CM7 on stm32h747 support memory cache. If the cache enabled on CM7, CM4 will receive incorrect data. This just disable the memory cache on CM7, future user may want to use more flexible way to fix it. Signed-off-by: HaiLong Yang <cameledyang@pm.me>
8e968ba
to
928b82f
Compare
Remove rpmsg_service sample support. Not support ipc_service, it based on mbox api, stm32h747 current not support it. This just disable the memory cache on CM7, future user may want to use more flexible way to fix it. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Close this PR. |
NOTE: This PR currently are not ready, still have some problem with M4 booting.[EDIT] how to using test this sample on openamp sample