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.

AM5728: ICSS_EMAC_BasicExample missing memory map

Part Number: AM5728
Other Parts Discussed in Thread: TIDEP0074

When trying to compile the example "ICSS_EMAC_BasicExample_idkAM572x_wSoCFile_m4Testproject", I run into errors:

  • #10625 no valid memory range(NULL) available for placement of "PRU0_REV1_DMEM" (and all others; PRU0_REV1_EXT, imem, rev2dmem, etc.)
  • #10099-D Program will not fit into available memory. run placement with alignment fails for section "PRUn_REVm_DMEM/EXT/IMEM" size 0x1000/0x2000

I'm wondering why I can't compile and run examples as I haven't touched anything installed by "SDK RTOS AM57xx evm 05.01.00.11". So, in theory, it should be able to compile, since everything is directly downloaded from TI.

I setup the environment using "pdksetupenv.bat", and created project files using "pdkProjectCreate.bat" (pdkProjectCreate.bat AM572x all little icss_emac all m4). Why do I need to manually add resource table to define map for PRU firmwares (icss_dualemac_PRUn.bin). If I have to manually add, would you be so kind and point me in the right direction

examples are from pdk_am572xx_1_0_12.

If there's an easier way to get ethernet ports to work from IPU over PRUs, I would love to hear it. Hardware is confirmed to be working, since we can ping both ethernet interfaces (eth2 and eth3) and communicate via ssh with Linux distro. Now we want to use eth2 and eth3 for GOOSE messaging, but don't have any starting point (tidep0074 GOOSE forwarding example fails to turn on the ethernet interfaces, so we just want to get working ethernet interfaces and start from there)

Kind regards,

Ivan

  • Hi Ivan,

    SDK RTOS AM57xx evm 05.01.00.11

    This is a three year old release. Can you try this on latest release?

    Regards,
    Parth 

  • Tried building icss_emac example from PDK_1_0_17 and it builds successfully. Will it cause any problem if we use pdk1_0_17 on IPU core, and pdk1_0_12 on DSP core (problems regarding messageQ, sharedMemory, CMEM, etc)?

    But new error arises when trying to load IPU with said example via remoteproc:

    [ 622.103033] remoteproc remoteproc0: Failed to find resource table
    [ 622.114077] remoteproc remoteproc0: Boot failed: -22

  • If I try to load the program via debugger, this happens:

    CCS console:
    Cortex_M4_IPU1_C0: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.1.0.00012)
    Cortex_M4_IPU1_C0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.1.0.00012)

    . . . . . . .
    Cortex_M4_IPU1_C0: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.1.0.00012)
    Cortex_M4_IPU1_C0: Trouble Halting Target CPU: (Error -2064 @ 0x0) Unable to read device status. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 8.1.0.00012)
    Cortex_M4_IPU1_C0: Unable to determine target status after 20 attempts
    Cortex_M4_IPU1_C0: Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

    dmesg output:

    [ 1420.263256] omap-iommu 58882000.mmu: iommu fault: da 0x813040f8 flags 0x0
    [ 1420.270084] remoteproc remoteproc0: crash detected in 58820000.ipu: type mmufault
    [ 1420.277608] omap-iommu 58882000.mmu: 58882000.mmu: errs:0x00000002 da:0x813040f8 pgd:0xec05e04c *pgd:px00000000
    [ 1420.291117] remoteproc remoteproc0: handling crash #1 in 58820000.ipu
    [ 1420.297641] remoteproc remoteproc0: recovering 58820000.ipu
    [ 1420.308626] remoteproc remoteproc0: failed to unmap 5242880/0
    [ 1420.319761] remoteproc remoteproc0: stopped remote processor 58820000.ipu
    [ 1420.319771] remoteproc remoteproc0: powering up 58820000.ipu
    [ 1420.319842] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [ 1420.319852] remoteproc remoteproc0: request_firmware failed: -2

  • Ivan,

    Tried building icss_emac example from PDK_1_0_17 and it builds successfully. Will it cause any problem if we use pdk1_0_17 on IPU core, and pdk1_0_12 on DSP core (problems regarding messageQ, sharedMemory, CMEM, etc)?

    You can run two RTOS binaries from different versions of PDK on different cores as long as there is no memory conflict. 

    But new error arises when trying to load IPU with said example via remoteproc:

    But you can't run different versions when loading the via remoteproc. You should make sure that you are using the same Linux release as the RTOS release from which you intent to load the binary.

    Regards,
    Parth

  • Hi Parth,

    Thank you for your answer. So successful build of the example from pdk1_0_17 doesn't mean anything, since I have to use pdk1_0_12. which brings me to my first question:
    Why is example from pdk1_0_12 unbuildable, and how to fix the memory address issues regarding PRU firmware bins. I tried hexdumping the binary file, and storing hex values in an array. Then, loading it on PRU cores via PRUICSS_pruWriteMemory function but nothing happened. 

    edit: I'm unable to load the example from pdk1_0_17 via CCS debug session. If I try to load it through CCS, this happens:

    [25120.952954] ------------[ cut here ]------------
    [25120.952977] WARNING: CPU: 0 PID: 0 at /mnt/sdb1/zlucic/opt/PHYTEC_BSPs/yocto_ti/build/arago-tmp-external-linaro-toolchain/work-shared/am572x-pcm-057-41300111i/kernel-source/drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x25c/0x36c
    [25120.952984] 44000000.ocp:L3 Custom Error: MASTER IPU1 TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access
    [25120.952988] Modules linked in: rpmsg_proto cmemk(O) pvrsrvkm(O) pru_rproc pruss_intc pruss dwc3 cbc ecb sha512_generic xfrm_user sha512_arm xfrm4_tunnel ipcomp xfrm_ipcomp esp4 sha256_generic ah4 af_key xfrm_algo hmac md5 sha1_generic sha1_arm_neon sha1_arm debugss_kmodule(O) omap_aes_driver pruss_soc_bus omap_sham omap_des des_generic dwc3_omap omap_rng extcon_palmas crypto_engine extcon_core rng_core omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc virtio virtio_ring sch_fq_codel uio_module_drv(O) uio gdbserverproxy(O) cryptodev(O) [last unloaded: cmemk]
    [25120.953153] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.9.41-g61a65e1-BSP-Yocto-TISDK-AM57xx-PD18.2.0 #97
    [25120.953158] Hardware name: Generic DRA74X (Flattened Device Tree)
    [25120.953161] Backtrace:
    [25120.953180] [<c020b300>] (dump_backtrace) from [<c020b5bc>] (show_stack+0x18/0x1c)
    [25120.953188] r7:00000009 r6:600f0193 r5:00000000 r4:c102f6d0
    [25120.953199] [<c020b5a4>] (show_stack) from [<c04c03c8>] (dump_stack+0x8c/0xa0)
    [25120.953212] [<c04c033c>] (dump_stack) from [<c022ca20>] (__warn+0xec/0x104)
    [25120.953219] r7:00000009 r6:c0bd1678 r5:00000000 r4:c1001d10
    [25120.953229] [<c022c934>] (__warn) from [<c022ca78>] (warn_slowpath_fmt+0x40/0x48)
    [25120.953237] r9:00000006 r8:eea1abd0 r7:c0bd1a90 r6:00000000 r5:c0bd15a4 r4:c0bd1648
    [25120.953248] [<c022ca3c>] (warn_slowpath_fmt) from [<c04ed84c>] (l3_interrupt_handler+0x25c/0x36c)
    [25120.953253] r3:eea1aa40 r2:c0bd1648
    [25120.953258] r4:80080003
    [25120.953270] [<c04ed5f0>] (l3_interrupt_handler) from [<c027bf18>] (__handle_irq_event_percpu+0xb4/0x138)
    [25120.953277] r10:c101a27f r9:eea2e100 r8:00000017 r7:c1001e34 r6:00000000 r5:eea2e100
    [25120.953281] r4:eea1af40
    [25120.953292] [<c027be64>] (__handle_irq_event_percpu) from [<c027bfc0>] (handle_irq_event_percpu+0x24/0x60)
    [25120.953300] r10:c0e54e38 r9:c1000000 r8:ee808000 r7:00000000 r6:c1008f6c r5:eea2e100
    [25120.953304] r4:eea2e100
    [25120.953314] [<c027bf9c>] (handle_irq_event_percpu) from [<c027c03c>] (handle_irq_event+0x40/0x64)
    [25120.953319] r5:eea2e160 r4:eea2e100
    [25120.953329] [<c027bffc>] (handle_irq_event) from [<c027f6e0>] (handle_fasteoi_irq+0xc0/0x1a4)
    [25120.953334] r7:00000000 r6:c1008f6c r5:eea2e160 r4:eea2e100
    [25120.953343] [<c027f620>] (handle_fasteoi_irq) from [<c027b140>] (generic_handle_irq+0x2c/0x3c)
    [25120.953349] r7:00000000 r6:00000000 r5:00000017 r4:c0e54d40
    [25120.953359] [<c027b114>] (generic_handle_irq) from [<c027b6c8>] (__handle_domain_irq+0x64/0xbc)
    [25120.953368] [<c027b664>] (__handle_domain_irq) from [<c0201500>] (gic_handle_irq+0x40/0x7c)
    [25120.953375] r9:c1000000 r8:fa213000 r7:fa212000 r6:c1001ef0 r5:fa21200c r4:c1003418
    [25120.953383] [<c02014c0>] (gic_handle_irq) from [<c020c0f8>] (__irq_svc+0x58/0x8c)
    [25120.953388] Exception stack(0xc1001ef0 to 0xc1001f38)
    [25120.953395] 1ee0: 00000001 00000000 fe600000 00000000
    [25120.953402] 1f00: c1000000 c1003034 00000001 c100309c 00000000 00000000 c0e54e38 c1001f4c
    [25120.953407] 1f20: c1001f2c c1001f40 c021f760 c0208774 600f0013 ffffffff
    [25120.953415] r9:c1000000 r8:00000000 r7:c1001f24 r6:ffffffff r5:600f0013 r4:c0208774
    [25120.953432] [<c020874c>] (arch_cpu_idle) from [<c0860974>] (default_idle_call+0x28/0x34)
    [25120.953447] [<c086094c>] (default_idle_call) from [<c026cc7c>] (cpu_startup_entry+0x120/0x1f4)
    [25120.953457] [<c026cb5c>] (cpu_startup_entry) from [<c085bc54>] (rest_init+0x8c/0x90)
    [25120.953461] r7:ffffffff
    [25120.953474] [<c085bbc8>] (rest_init) from [<c0e00d74>] (start_kernel+0x3d4/0x3e0)
    [25120.953479] r5:00000000 r4:c1053040
    [25120.953487] [<c0e009a0>] (start_kernel) from [<80008090>] (0x80008090)
    [25120.953492] ---[ end trace 7d68f36dd7141376 ]---
    [25122.169112] omap-iommu 58882000.mmu: iommu fault: da 0x813a6cf8 flags 0x0
    [25122.175938] remoteproc remoteproc0: crash detected in 58820000.ipu: type mmufault
    [25122.183461] omap-iommu 58882000.mmu: 58882000.mmu: errs:0x00000002 da:0x813a6cf8 pgd:0xed14204c *pgd:px00000000
    [25122.196786] remoteproc remoteproc0: handling crash #1 in 58820000.ipu
    [25122.203260] remoteproc remoteproc0: recovering 58820000.ipu
    [25122.213870] remoteproc remoteproc0: failed to unmap 5242880/0
    [25122.224703] remoteproc remoteproc0: stopped remote processor 58820000.ipu
    [25122.224713] remoteproc remoteproc0: powering up 58820000.ipu
    [25122.224788] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [25122.224798] remoteproc remoteproc0: request_firmware failed: -2

    Kind regards,

    Ivan 

  • Hi Ivan,

    Apologies for dely. Is this issue still open?
    If yes, can you please highlight the current state of the issue?

    Regards,
    Parth