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.

CCS/AM5728: Application error

Part Number: AM5728


Tool/software: Code Composer Studio

Hi All,

    Am trying to run sys/bios based application on A15 core  but getting an error Illegal instruction (core dumped) while running .out file generated by using code composer studio version 8.3.

    Board is build up with ti-processor-sdk-linux-am57xx-evm-05.01.00.11

    Compiler am using is GNU v7.2.1 (Linaro), to cross compile my application. 

    Is there something am missing ?? Or there is any other way to run TI-RTOS based application on A15 core.

    Regards,

    Geek13

  • Hi Geek13,

    Geek13 said:
    Am trying to run sys/bios based application on A15 core

    Please follow below user guide:

    Geek13 said:
    Board is build up with ti-processor-sdk-linux-am57xx-evm-05.01.00.11

    Geek13 said:
    Or there is any other way to run TI-RTOS based application on A15 core.

    PSDK Linux is used for Linux application on Cortex-A15 core  and SYS/BIOS on DSP and Cortex-M4 IPU cores. While for SYS/BIOS application on Cortex-A15 core, you need to use PSDK RTOS.

    Check below user guide for details:

    Regards,
    Pavel

  • Hi Pavel ,

     Actually I want to run USB on bulk generic device mode on A15 core to communicate with HOST PC. Is there any other way to achieve this. SYS/BIOS supported by M4 core but there am getting an MMU fault error while loading application from linux side using remoteproc. 

    [ 1420.485499] remoteproc remoteproc0: powering up 58820000.ipu
    [ 1420.495727] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 3607080
    [ 1420.506125] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 1420.513625] alloc_contig_range: [9d004, 9d007) PFNs busy
    [ 1420.525264] omap-iommu 58882000.mmu: iommu fault: da 0x372b1608 flags 0x0
    [ 1420.532082] remoteproc remoteproc0: crash detected in 58820000.ipu: type mmufault
    [ 1420.539604] omap-iommu 58882000.mmu: 58882000.mmu: errs:0x00000002 da:0x372b1608 pgd:0xed3e8dc8 *pgd:px00000000
    [ 1420.552830] alloc_contig_range: [9d040, 9d080) PFNs busy
    [ 1420.559404] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 1420.566659] remoteproc remoteproc0: registered virtio0 (type 7)
    [ 1420.572687] remoteproc remoteproc0: remote processor 58820000.ipu is now up
    [ 1420.580048] remoteproc remoteproc0: handling crash #12 in 58820000.ipu
    root@am57xx-evm:~# [ 1420.588057] remoteproc remoteproc0: recovering 58820000.ipu
    [ 1420.600538] remoteproc remoteproc0: stopped remote processor 58820000.ipu
    [ 1420.608775] remoteproc remoteproc0: powering up 58820000.ipu
    [ 1420.618740] remoteproc remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 3607080
    [ 1420.627848] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [ 1420.634875] alloc_contig_range: [9d004, 9d007) PFNs busy
    [ 1420.646511] omap-iommu 58882000.mmu: iommu fault: da 0x372b1608 flags 0x0
    [ 1420.653329] remoteproc remoteproc0: crash detected in 58820000.ipu: type mmufault
    [ 1420.660843] omap-iommu 58882000.mmu: 58882000.mmu: errs:0x00000002 da:0x372b1608 pgd:0xed3e8dc8 *pgd:px00000000
    [ 1420.674665] alloc_contig_range: [9d040, 9d080) PFNs busy
    [ 1420.680508] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 1420.686386] remoteproc remoteproc0: registered virtio0 (type 7)
    [ 1420.692407] remoteproc remoteproc0: remote processor 58820000.ipu is now up

    Although am able to run UART application on M4 as suggested by user guide using remoteproc.

    Tried with similar resource table and configuration for USB, but its not working. 

    Regards,

    Geek13

  • Geek13,

    Are you trying to load and run USB rtos application out file on Cortex-A15 MPU which is running Linux? If yes, I don't think this is possible.

    Regards,
    Pavel

  • Hi Pavel,

     Am agree with your point. So am trying to run that application on M4 and now its successfully loaded without any error using remoteproc, but application not working. 

    While running through debugger USB immediately recognize by system and then am able to communicate with my host PC. 

    See my current log while using remoteproc for loading application from Linux

    [ 823.311366] remoteproc remoteproc1: powering up 55020000.ipu
    [ 823.322426] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 4480932
    [ 823.332355] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [ 823.356506] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 823.362161] remoteproc remoteproc1: registered virtio0 (type 7)
    [ 823.368231] remoteproc remoteproc1: remote processor 55020000.ipu is now up

    USB should detect on system after this and some message has to be print on terminal.

    Regards,

    Geek13

     

  • Geek13,

    From what I understand, your IPC remoteproc is working fine, and you have issues with USB RTOS application out file.

    I would suggest you to go through the below user guide:

    Regards,
    Pavel

  • Hi Pavel,

    getting below error when trying to run USB application on M4 core
    root@am57xx-evm:~# ./USBRun.sh [ 34.514979] remoteproc remoteproc1: powering up 55020000.ipu [ 34.525047] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3185636 [ 34.533148] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1 [ 34.558487] virtio_rpmsg_bus virtio0: rpmsg host is online [ 34.564078] ------------[ cut here ]------------ [ 34.564145] remoteproc remoteproc1: registered virtio0 (type 7) [ 34.564151] remoteproc remoteproc1: remote processor 55020000.ipu is now up [ 34.581647] WARNING: CPU: 0 PID: 940 at /oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work-shared/am57xx-evm/kernel-source/drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x254/0x370 [ 34.599365] 44000000.ocp:L3 Custom Error: MASTER IPU2 TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access [ 34.611584] Modules linked in: bc_example(O) xhci_plat_hcd xhci_hcd pru_rproc pruss_intc dwc3 udc_core pruss snd_soc_simple_card snd_soc_simple_card_utils snd_soc_omap_hdmi_audio pvrsrvkm(O) ahci_platform libahci_platform libahci omap_aes_driver omap_sham pruss_soc_bus libata omap_wdt scsi_mod ti_vpe ti_sc ti_csc ti_vpdma dwc3_omap omap_des rtc_omap des_generic snd_soc_tlv320aic3x crypto_engine omap_crypto rtc_ds1307 at24 rtc_palmas extcon_palmas omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel uio_module_drv(O) uio ftdi_sio usbserial usbcore usb_common gdbserverproxy(O) cryptodev(O) cmemk(O) [ 34.666108] CPU: 0 PID: 940 Comm: systemd-udevd Tainted: G W O 4.14.67-gd315a9bb00 #1 [ 34.674927] Hardware name: Generic DRA74X (Flattened Device Tree) [ 34.681042] Backtrace: [ 34.683502] [<c020b5bc>] (dump_backtrace) from [<c020b8a0>] (show_stack+0x18/0x1c) [ 34.691103] r7:00000009 r6:600f0193 r5:00000000 r4:c1053a10 [ 34.696787] [<c020b888>] (show_stack) from [<c092b128>] (dump_stack+0x90/0xa4) [ 34.704042] [<c092b098>] (dump_stack) from [<c022b780>] (__warn+0xec/0x104) [ 34.711030] r7:00000009 r6:c0bd9760 r5:00000000 r4:ec525bf0 [ 34.716714] [<c022b694>] (__warn) from [<c022b7d8>] (warn_slowpath_fmt+0x40/0x48) [ 34.724226] r9:00000006 r8:ee9ca850 r7:c0bd9b54 r6:00000000 r5:c0bd968c r4:c0bd9730 [ 34.732001] [<c022b79c>] (warn_slowpath_fmt) from [<c051ab3c>] (l3_interrupt_handler+0x254/0x370) [ 34.740906] r3:ee9ca6c0 r2:c0bd9730 [ 34.744491] r4:80080003 [ 34.747035] [<c051a8e8>] (l3_interrupt_handler) from [<c027f104>] (__handle_irq_event_percpu+0x6c/0x134) [ 34.756552] r10:c105540d r9:ee9c8500 r8:00000017 r7:ec525d14 r6:00000000 r5:ee9c8500 [ 34.764410] r4:ee9cabc0 [ 34.766952] [<c027f098>] (__handle_irq_event_percpu) from [<c027f1f0>] (handle_irq_event_percpu+0x24/0x60) [ 34.776643] r10:ecfd5f68 r9:ec524000 r8:ee808000 r7:00000000 r6:c10093ac r5:ee9c8500 [ 34.784502] r4:ee9c8500 [ 34.787044] [<c027f1cc>] (handle_irq_event_percpu) from [<c027f26c>] (handle_irq_event+0x40/0x64) [ 34.795953] r5:ee9c8564 r4:ee9c8500 [ 34.799541] [<c027f22c>] (handle_irq_event) from [<c0282b80>] (handle_fasteoi_irq+0xac/0x160) [ 34.808098] r7:00000000 r6:c10093ac r5:ee9c8564 r4:ee9c8500 [ 34.813779] [<c0282ad4>] (handle_fasteoi_irq) from [<c027e354>] (generic_handle_irq+0x2c/0x3c) [ 34.822423] r7:00000000 r6:00000000 r5:00000017 r4:c0e64afc [ 34.828105] [<c027e328>] (generic_handle_irq) from [<c027e8dc>] (__handle_domain_irq+0x64/0xbc) [ 34.836839] [<c027e878>] (__handle_domain_irq) from [<c0201474>] (gic_handle_irq+0x44/0x80) [ 34.845222] r9:ec524000 r8:fa213000 r7:fa212000 r6:ec525dd0 r5:fa21200c r4:c1004000 [ 34.852997] [<c0201430>] (gic_handle_irq) from [<c020c478>] (__irq_svc+0x58/0x8c) [ 34.860507] Exception stack(0xec525dd0 to 0xec525e18) [ 34.865575] 5dc0: 00000000 00000003 ec8dbedc 00000000 [ 34.873787] 5de0: ec8dbe30 ec8dbe80 c0a0e780 c0a0e780 00080060 00000001 ecfd5f68 ec525e34 [ 34.881994] 5e00: ec525e20 ec525e20 c03569dc c0356a84 600f0013 ffffffff [ 34.888633] r9:ec524000 r8:00080060 r7:ec525e04 r6:ffffffff r5:600f0013 r4:c0356a84 [ 34.896409] [<c03569c8>] (__destroy_inode) from [<c0357894>] (destroy_inode+0x24/0x5c) [ 34.904355] r5:ec8dbe80 r4:ec8dbe30 [ 34.907942] [<c0357870>] (destroy_inode) from [<c03579e0>] (evict+0x114/0x168) [ 34.915192] r5:ec8dbe80 r4:ec8dbe30 [ 34.918780] [<c03578cc>] (evict) from [<c0357d28>] (iput+0x13c/0x1c4) [ 34.925245] r7:c0a0e780 r6:ec8dbe80 r5:ec8dbe30 r4:eeb6d800 [ 34.930929] [<c0357bec>] (iput) from [<c035205c>] (dentry_unlink_inode+0xf4/0xfc) [ 34.938439] r7:00080040 r6:ecfd5fb8 r5:ec8dbe30 r4:ecfd5f68 [ 34.944121] [<c0351f68>] (dentry_unlink_inode) from [<c0353598>] (__dentry_kill+0xd4/0x180) [ 34.952503] r5:00000000 r4:ecfd5f68 [ 34.956091] [<c03534c4>] (__dentry_kill) from [<c0353e10>] (dput.part.5+0x258/0x2ac) [ 34.963863] r7:00080040 r6:ecfd5fb8 r5:c0bbbb80 r4:ecfd5f68 [ 34.969543] [<c0353bb8>] (dput.part.5) from [<c0353e7c>] (dput+0x18/0x1c) [ 34.976360] r10:ec8dbe30 r9:00000010 r8:00000000 r7:eeb60510 r6:ecfd5f68 r5:ec8dbe30 [ 34.984218] r4:ed440c00 [ 34.986760] [<c0353e64>] (dput) from [<c033d094>] (__fput+0x134/0x1dc) [ 34.993313] [<c033cf60>] (__fput) from [<c033d19c>] (____fput+0x10/0x14) [ 35.000039] r10:00000000 r9:ed440c00 r8:ed02a050 r7:c1059544 r6:ed029b00 r5:ed02a034 [ 35.007897] r4:00000000 [ 35.010439] [<c033d18c>] (____fput) from [<c0246e74>] (task_work_run+0x98/0xb8) [ 35.017779] [<c0246ddc>] (task_work_run) from [<c020afb8>] (do_work_pending+0xc0/0xc4) [ 35.025727] r9:ec524000 r8:c0207e64 r7:00000006 r6:ec525fb0 r5:c0207e64 r4:ffffe000 [ 35.033501] [<c020aef8>] (do_work_pending) from [<c0207ce4>] (slow_work_pending+0xc/0x20) [ 35.041711] r7:00000006 r6:005688a0 r5:00568658 r4:beb33058 [ 35.047390] ---[ end trace 0be4d07f48e9131c ]---

    with same .cfg file am able to run UART HelloWorld application using remoteproc successfully.  

    Regards,

    Geek13

  • Hello,

    Geek13 said:

    [ 1420.646511] omap-iommu 58882000.mmu: iommu fault: da 0x372b1608 flags 0x0
    [ 1420.653329] remoteproc remoteproc0: crash detected in 58820000.ipu: type mmufault
    [ 1420.660843] omap-iommu 58882000.mmu: 58882000.mmu: errs:0x00000002 da:0x372b1608 pgd:0xed3e8dc8 *pgd:px00000000

    This error usually indicates the application is trying to access a region that is not mapped, i.e. not defined in the resource table.

    The following documents should help you determine the cause of the fault.

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_how_to_guides.html#ipc-debugging-tools-and-techniques-on-am57xx

    http://processors.wiki.ti.com/index.php/IPC_MMU_fault_debug

    Regards,
    Sahin

  • Also, as a quick test could you please try the attached resource table?

    I added an MMU mapping (TYPE_DEVMEM) for the PCIE SS2 which I believe is mapped to USB by default.

    3324.rsc_table_vayu_ipu.h

  • Hi Sahin, I tried with your attached resource table file, but still getting below error: 

    cat /sys/kernel/debug/remoteproc/remoteproc1/trace0 [0][ 0.000] [t=0x00026af9] ti.sysbios.family.arm.m3.Hwi: ERROR: line 1121: E_hardFault: FORCED [0][ 0.000] ti.sysbios.family.arm.m3.Hwi: line 1121: E_hardFault: FORCED [0][ 0.000] [t=0x00051f01] ti.sysbios.family.arm.m3.Hwi: ERROR: line 1198: E_busFault: IMPRECISERR: Delayed Bus Fault, exact addr unknown, address: 48036048 [0][ 0.000] ti.sysbios.family.arm.m3.Hwi: line 1198: E_busFault: IMPRECISERR: Delayed Bus Fault, exact addr unknown, address: 48036048 [0][ 0.000] Exception occurred in background thread at PC = 0x0000d890. [0][ 0.000] Core 0: Exception occurred in ThreadType_Main. [0][ 0.000] Main name: main(), handle: 0x0. [0][ 0.000] Main stack base: 0x80034020. [0][ 0.000] Main stack size: 0x20000. [0][ 0.000] R0 = 0x00000010 R8 = 0x00000020 [0][ 0.000] R1 = 0x00000000 R9 = 0x0001415c [0][ 0.000] R2 = 0x80056488 R10 = 0x800566bc [0][ 0.000] R3 = 0x80056488 R11 = 0x80053fc4 [0][ 0.000] R4 = 0x80053ee4 R12 = 0xe00fffe0 [0][ 0.000] R5 = 0x48036000 SP(R13) = 0x80053e98 [0][ 0.000] R6 = 0x00000010 LR(R14) = 0x0000d887 [0][ 0.000] R7 = 0x00000000 PC(R15) = 0x0000d890 [0][ 0.000] PSR = 0x61000200 [0][ 0.000] ICSR = 0x00400803 [0][ 0.000] MMFSR = 0x00 [0][ 0.000] BFSR = 0x86 [0][ 0.000] UFSR = 0x0000 [0][ 0.000] HFSR = 0x40000000 [0][ 0.000] DFSR = 0x00000000 [0][ 0.000] MMAR = 0x48036048 [0][ 0.000] BFAR = 0x48036048 [0][ 0.000] AFSR = 0x00000000 [0][ 0.000] Terminating execution...

    Regards,

    Geek13

  • Hi Sahin,

    Just one thing I want to confirm about dmtimer . Where that dmtimer/timer related settings need to be done. As I can see inside my dts file, timer 3 is setup for IPU2 and timer 4 & 9 are set as watchdog timer.

    If in .cfg file timer setting need to do, that it should be removed from dts side. What's your suggestion.

     

    Regards,

    Geek13

  • Hello,

    If you are initializing a timer on the IPU side you should remove it from the dts. Please see if the following thread helps.

    https://e2e.ti.com/support/processors/f/791/t/732566?RTOS-AM5728-base-on-am5728-print-periodically-on-ipu1

    Regards,
    Sahin

  • Hi Sahin,

     Can you please share one .cfg file that can be use as reference for USB on M4 core.

      As there must be some configuration issue, that am missing due to which not able to run my application on M4 core.

      And my dts file configuration is like as follows for IPU2: 

    ipu@55020000 {
    compatible = "ti,dra7-ipu";
    reg             = <0x55020000 0x10000>;
    reg-names = "l2ram";
    ti,hwmods  = "ipu2";
    iommus      = <0xbe>;
    ti,rproc-standby-info = <0x4a008920>;
    status         = "okay";
    mboxes      = <0xbf 0xc0>;
    #timers      = <0xc1>;                               
    #watchdog-timers = <0xc2 0xc3>;
    memory-region = <0xc4>;
    };

     Here timer and watchdog timer I comment out. Timer(3) and for watchdog timer9 & timer4.

      Is that correct & what else required from dts side.

    Regards,

    Geek13