This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/DRA829V: Feasibility is there to get Memory dump or stack trace when code crash

Part Number: DRA829V
Other Parts Discussed in Thread: DRA829

Tool/software: TI C/C++ Compiler

Hi,

We are using  DRA829  SoC and psdk_rtos_auto_j7_06_02_00_21,

In MCU1_0 R5F core when we try to access some register, core is crashing. 

we want to get the memory dump when code was crashed. 

Is there any feasibility to get the memory dump/stack crashes logs after crashing.

Thanks,

Muthu

  • Hi Muthu,

    I need further details to understand the scenario of this crash - is it during normal run or when you are connected to the debugger that this crash occurs?

    If you not already tried,  can you try connecting to the CCS and check the PC and LR?

    Regards

    Karthik

  • Hi Karthik,

    Thanks for the response,

    Crashing is happened due to wrongly accessing of register from our implementation.

    For example, we wrongly used the Wdg_App_Startup.c file from mcu1_0 to mcu2_1, Its our mistake but mcu2_1 core is struck at Wdg_Init. 

    When we start debugging , we did not get any information from debug logs. Because no logs after wdg_init.

    We dont have JTAG to debug using CCS. Is there any possibility to get the core dump logs/stack back traces ?

    it will be useful for debug if any crash happen?

  • Hi Muthu,

    Are you running LInux on the A72? If yes, we can check the remoteproc tracebuffer.

    Please confirm your environment and we can provide clear instructions.

    Regards

    Karthik

  • Hi Karthik,

    Yeah, We are running Linux on A72 Processor. 

    can you please share the instruction to get the core dump file

    Thanks,

    Muthu

  • Hi Muthu,

    You can use the sysfs entries to check this.

    For example, here I'm showing you that firstly you can find out the remoteproc from the dmesg

    # dmesg | grep remoteproc
    [   10.495017] k3-dsp-rproc 4d80800000.dsp: configured DSP for remoteproc mode
    [   10.780094] remoteproc remoteproc0: 4d80800000.dsp is available
    [   11.058167] remoteproc remoteproc0: powering up 4d80800000.dsp
    [   11.064025] remoteproc remoteproc0: Booting fw image j7-c66_0-fw, size 192416
    [   11.158139]  remoteproc0#vdev0buffer: assigned reserved memory node c66-dma-memory@a7000000
    [   11.177350]  remoteproc0#vdev0buffer: registered virtio0 (type 7)
    [   11.193959] remoteproc remoteproc0: remote processor 4d80800000.dsp is now up
    [   11.246745] k3-dsp-rproc 4d81800000.dsp: configured DSP for remoteproc mode
    [   11.581363] remoteproc remoteproc2: 4d81800000.dsp is available
    [   11.598339] remoteproc remoteproc1: 41000000.r5f is available
    [   11.730452] remoteproc remoteproc2: powering up 4d81800000.dsp
    [   11.736398] remoteproc remoteproc1: powering up 41000000.r5f
    [   11.742059] remoteproc remoteproc1: Booting fw image j7-mcu-r5f0_0-fw, size 95552
    [   11.749713] remoteproc remoteproc2: Booting fw image j7-c66_1-fw, size 192416
    [   11.782478]  remoteproc1#vdev0buffer: assigned reserved memory node r5f-dma-memory@a0000000
    [   11.791817]  remoteproc2#vdev0buffer: assigned reserved memory node c66-dma-memory@a6000000
    [   11.819763]  remoteproc1#vdev0buffer: registered virtio1 (type 7)
    [   11.826434]  remoteproc2#vdev0buffer: registered virtio2 (type 7)
    [   11.847180] remoteproc remoteproc1: remote processor 41000000.r5f is now up
    [   11.854162] remoteproc remoteproc2: remote processor 4d81800000.dsp is now up
    [   11.925543] k3-dsp-rproc 64800000.dsp: configured DSP for remoteproc mode
    [   11.941385] remoteproc remoteproc3: 64800000.dsp is available
    [   11.979900] remoteproc remoteproc4: 5c00000.r5f is available
    [   12.153258] platform 5d00000.r5f: configured R5F for remoteproc mode
    [   12.280741] remoteproc remoteproc4: powering up 5c00000.r5f
    [   12.286452] remoteproc remoteproc3: powering up 64800000.dsp
    [   12.292165] remoteproc remoteproc4: Booting fw image j7-main-r5f0_0-fw, size 1669948
    [   12.299941] remoteproc remoteproc3: Booting fw image j7-c71_0-fw, size 10489904
    [   12.336109]  remoteproc3#vdev0buffer: assigned reserved memory node c71-dma-memory@a8000000
    [   12.361564]  remoteproc4#vdev0buffer: assigned reserved memory node r5f-dma-memory@a1000000
    [   12.370071]  remoteproc3#vdev0buffer: registered virtio3 (type 7)
    [   12.378283] remoteproc remoteproc3: remote processor 64800000.dsp is now up
    [   12.393687]  remoteproc4#vdev0buffer: registered virtio4 (type 7)
    [   12.400717] remoteproc remoteproc4: remote processor 5c00000.r5f is now up
    [   12.477672] remoteproc remoteproc5: 5d00000.r5f is available
    [   12.613742] remoteproc remoteproc5: powering up 5d00000.r5f
    [   12.619423] remoteproc remoteproc5: Booting fw image j7-main-r5f0_1-fw, size 95476
    [   12.642008] platform 5e00000.r5f: configured R5F for remoteproc mode
    [   12.648505]  remoteproc5#vdev0buffer: assigned reserved memory node r5f-dma-memory@a3000000
    [   12.665658]  remoteproc5#vdev0buffer: registered virtio5 (type 7)
    [   12.675754] remoteproc remoteproc5: remote processor 5d00000.r5f is now up
    [   12.930310] remoteproc remoteproc6: 5e00000.r5f is available
    [   13.010463] remoteproc remoteproc6: powering up 5e00000.r5f
    [   13.022429] remoteproc remoteproc6: Booting fw image j7-main-r5f1_0-fw, size 95476
    [   13.047803] platform 5f00000.r5f: configured R5F for remoteproc mode
    [   13.067830]  remoteproc6#vdev0buffer: assigned reserved memory node r5f-dma-memory@a4000000
    [   13.099787]  remoteproc6#vdev0buffer: registered virtio6 (type 7)
    [   13.111656] remoteproc remoteproc6: remote processor 5e00000.r5f is now up
    [   13.229935] remoteproc remoteproc7: 5f00000.r5f is available
    [   13.251113] remoteproc remoteproc8: b034000.pru is available
    [   13.271460] remoteproc remoteproc7: powering up 5f00000.r5f
    [   13.280425] remoteproc remoteproc7: Booting fw image j7-main-r5f1_1-fw, size 95476
    [   13.313185]  remoteproc7#vdev0buffer: assigned reserved memory node r5f-dma-memory@a5000000
    [   13.335806]  remoteproc7#vdev0buffer: registered virtio7 (type 7)
    [   13.351750] remoteproc remoteproc7: remote processor 5f00000.r5f is now up
    [   13.597898] remoteproc remoteproc9: b004000.rtu is available
    [   13.813902] remoteproc remoteproc10: b00a000.txpru is available
    [   13.894378] remoteproc remoteproc11: b038000.pru is available
    [   13.982587] remoteproc remoteproc12: b006000.rtu is available
    [   14.095351] remoteproc remoteproc13: b00c000.txpru is available
    [   14.145615] remoteproc remoteproc14: b134000.pru is available
    [   14.198918] remoteproc remoteproc15: b104000.rtu is available
    [   14.308556] remoteproc remoteproc16: b10a000.txpru is available
    [   14.360655] remoteproc remoteproc17: b138000.pru is available
    [   14.393420] remoteproc remoteproc18: b106000.rtu is available
    [   14.479197] remoteproc remoteproc19: b10c000.txpru is available
    root@j7-evm:~# [  130.630698] Initializing XFRM netlink socket
    [  132.677327] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
    [  132.694339] Bridge firewalling registered
    

    Next, since you are interested in the R5F cores. You can check the corresponding cores as shown below.

    root@j7-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc1/name
    41000000.r5f
    root@j7-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc1/trace0
    IPC_echo_test (core : mcu1_0) .....
    IPC Driver Revision: 01.00.00.01
    
    
    root@j7-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc5/name
    5d00000.r5f
    root@j7-evm:~# cat /sys/kernel/debug/remoteproc/remoteproc5/trace0
    IPC_echo_test (core : mcu2_1) .....
    IPC Driver Revision: 01.00.00.01
    mcu2_1 <--> C66X_1, Ping- 10000, pong - 10000 completed
    mcu2_1 <--> C66X_2, Ping- 10000, pong - 10000 completed
    mcu2_1 <--> C7X_1, Ping- 10000, pong - 10000 completed
    mcu2_1 <--> mcu3_0, Ping- 10000, pong - 10000 completed
    mcu2_1 <--> mcu3_1, Ping- 10000, pong - 10000 completed

    Here these are running the default examples and therefore you see the IPC test traces, you should see the traces for your binary if you have modified and if there are any crashes, they will also appear here.

    Regards

    Karthik

  • Thanks a lot Karthik,

    We will test in our bench and get back to you 

    Thanks,

    Muthu