Skip to main content
Graduate
December 12, 2024
Solved

STM32H757 / RTOS / OpenAMP / Memory "._user_heap_stack " Size Saturation

  • December 12, 2024
  • 2 replies
  • 889 views

 

Hello

 

I'm developing RTOS environment of dual-core in STM32H757.

I could refer to the examples provided by STM32, and I read the application note AN5617.

 

I checked that the error is a exception "err1" under the function "rproc_virtio_create_vdev" in the remoteproc_vrtio.c file. it was caused by the saturation of the memory "._user_heap_stack". Please refers to debugging results and the memory map.

How can I resolve this error?

Is it because I didn't add memory flush logic?

 

Task ICP(Inter Core Processing) in RTOS handles communication between CM7 and CM4.

the task that is applied HSEM synchronization repeatedly runs from the functions "MAILBOX_Init" and "MX_OPENAMP_Init" to the function "OPENAMP_DeInit".

 

# PICTURE1. The err1 under the function "rproc_virtio_create_vdev" in the remoteproc_virtio.c file

StrangeTau_0-1733978901462.png StrangeTau_1-1733978913828.png

+) The function "virtqueue_allocate" codes

StrangeTau_0-1733981182149.png

+) The function "metal_free_memory" codes

StrangeTau_7-1733979947860.png

# PICTURE2. The debugging results

1)  Hexadecimal conversion

StrangeTau_6-1733979705090.png

2) Test end point

StrangeTau_4-1733979646256.png

3) Test start point

StrangeTau_5-1733979689519.png

# PICTURE3. STM32H757 referece manual (RM0399)

StrangeTau_2-1733979195403.png

# PICTURE4. STM32CubeIDE build analyzer results

StrangeTau_3-1733979342933.png

 

Friendly regards, Tau

 

    This topic has been closed for replies.
    Best answer by StrangeTau

    Hello,

     

    I solved the issue.

    The cause of that was the repetitive calls of the functions in an infinite loop during RTOS Scheduling, and I was wrong, so I modified the functions to be called only once during RTOS Scheduling.

    I previously thought the memory was freed by the calls to functions like "MAILBOX_Init" and "OPENAMP_DeInit".

     

    Friendly regards,

    Tau

    2 replies

    Graduate
    December 16, 2024

    Hello @SofLit

    Is my post generally ambigious to get replies, by any chance?

    How to get an answer to my problem? I'm wondering what things are needed to get an answer to my question.

    Technical Moderator
    December 16, 2024

    Hello,

    You can contact the ST online support over this link: https://ols.st.com/

    StrangeTauAuthorAnswer
    Graduate
    January 6, 2025

    Hello,

     

    I solved the issue.

    The cause of that was the repetitive calls of the functions in an infinite loop during RTOS Scheduling, and I was wrong, so I modified the functions to be called only once during RTOS Scheduling.

    I previously thought the memory was freed by the calls to functions like "MAILBOX_Init" and "OPENAMP_DeInit".

     

    Friendly regards,

    Tau