Skip to content
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

Rpc fixes take 2 #58

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Rpc fixes take 2 #58

wants to merge 5 commits into from

Conversation

facchinm
Copy link
Member

@facchinm facchinm commented Nov 6, 2024

To debug from inside the X8 linux side:

adb push STM32H747AII6_CM7.elf /home/fio/
adb push STM32H747AII6_CM7.bin /home/fio/

One adb shell

cp STM32H747AII6_CM7.bin /usr/lib/firmware/arduino/stm32h7-fw/STM32H747AII6_CM7.bin && /usr/arduino/extra/program.sh
openocd -f /usr/arduino/extra/openocd_script-imx_gpio.cfg

On another adb shell

gdb STM32H747AII6_CM7.elf
target remote :3333

Enabling them crashes the m7 fw with this stacktrace

 #0  HardFault_Handler () at src/stm32h7xx_it.c:47
 #1  <signal handler called>
 #2  0x08004770 in __metal_mutex_acquire (mutex=0x24003318 <rvdev+88>)
    at libraries/openamp_arduino/src/metal/system/generic/mutex.h:60
 #3  metal_mutex_acquire (mutex=0x24003318 <rvdev+88>)
    at libraries/openamp_arduino/src/metal/mutex.h:59
 #4  rpmsg_virtio_rx_callback (vq=0x240070d0)
    at libraries/openamp_arduino/src/rpmsg_virtio.c:548
 #5  0x080041da in rproc_virtio_notified (vdev=0x24007058,
    notifyid=notifyid@entry=0)
    at libraries/openamp_arduino/src/remoteproc_virtio.c:341
 #6  0x08003b48 in MAILBOX_Poll (vdev=<optimized out>)
    at libraries/openamp_arduino/src/mailbox_hsem_if.c:122
 #7  0x08003d1e in OPENAMP_check_for_message ()
    at libraries/openamp_arduino/src/openamp.c:166
 #8  0x080013e2 in HSEM1_IRQHandler () at src/rpc.c:116
 #9  <signal handler called>
 #10 0x080013a8 in serial_rpc_ready () at src/rpc.c:97
 #11 0x08003596 in try_execute_m4_app () at src/m4_util.c:74
 #12 0x0800088a in main () at src/main.c:124

Investigate a proper fix
Copy link
Contributor

@MaxPayne86 MaxPayne86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marqdevx
Copy link
Member

marqdevx commented Jan 15, 2025

Hi, I have tried the patch

https://docs.arduino.cc/tutorials/portenta-x8/python-arduino-data-exchange/
Using the container provided on the tutorial
and the sketch from lmp-manifest repo

v746
Docker cannot build

v787
Works

v881 and v889
Not getting data from M4
After uploading the STM32 binary from the drive, it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants