Hi,
I have this m4-side (Zephyr 3.39) project in github:
https://github.com/neuberfran/pico_pi_m4
Device tree from Yocto Hardknott (A7-Side) files:
https://gist.github.com/neuberfran/64d3b164f43bdc752b01031a8e2d6689
Note: 1) Basically, my entire remoteproc project in imx7d-pico is based on the final moments (black terminal screen) of the video below:
https://www.youtube.com/watch?v=4XiDmpRY51Q
I prepare remoteproc with this commands:
Result with issue:
echo start > /sys/class/remoteproc/remoteproc0/state
[ 99.210565] remoteproc remoteproc0: powering up imx-rproc
[ 99.230771] remoteproc remoteproc0: Booting fw image rproc-imx-rproc-fw, size 424264
[ 99.238567] remoteproc remoteproc0: No resource table in elf
[ 99.244674] 8<--- cut here ---
[ 99.247777] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 99.256138] pgd = 66bdc478
[ 99.258864] [00000000] *pgd=00000000
[ 99.262616] Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
[ 99.268541] Modules linked in: ov5640_camera_mipi_v2 mxc_mipi_csi mx6s_capture snd_soc_tfa98xx(O)
[ 99.277443] CPU: 0 PID: 258 Comm: sh Tainted: G O 5.10.72-2.2.0-next+g000eb85263cb #1
[ 99.286574] Hardware name: Freescale i.MX7 Dual (Device Tree)
[ 99.292326] PC is at 0x0
[ 99.294868] LR is at rproc_elf_load_segments+0x1a8/0x298
[ 99.300181] pc : [<00000000>] lr : [<808fd8e8>] psr: 40090013
[ 99.306448] sp : 852cfe28 ip : 0000000c fp : 00000000
[ 99.311674] r10: 00000000 r9 : 84699000 r8 : 00000000
[ 99.316900] r7 : 00000001 r6 : 00002c14 r5 : 00002c14 r4 : c0891054
[ 99.323429] r3 : 00002c14 r2 : c08910d4 r1 : c0948000 r0 : 84699000
[ 99.329959] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 99.337096] Control: 10c5387d Table: 85ad806a DAC: 00000051
[ 99.342845] Process sh (pid: 258, stack limit = 0x8f72951e)
[ 99.348419] Stack: (0x852cfe28 to 0x852d0000)
[ 99.352781] fe20: 00002c14 846c4a80 00000000 00000005 00000001 00000020
[ 99.360964] fe40: c08910d4 1fff8000 c0948000 84da5440 c0891000 84699020 808fe084 84699000
[ 99.369146] fe60: 00000000 84699020 84da5440 84699020 84da5440 846c4a80 00000000 80c83d8c
[ 99.377329] fe80: 84699000 00000000 846991f8 84699204 84699020 808fb1bc 84da5440 81205fc8
[ 99.385511] fea0: 84699020 84da5080 00000006 84699000 8478aa10 00000000 00000000 808fc920
[ 99.393694] fec0: 00000006 84da5080 8478aa00 852cff30 8478aa10 802f0d60 00000000 00000000
[ 99.401876] fee0: 852c8780 00000000 00000006 00000000 852cff80 00000004 00000000 80259ce0
[ 99.410058] ff00: 00000006 85ad8028 85ad8028 00000000 00a6c4f0 00000006 00000005 00000000
[ 99.418240] ff20: 00000000 852cff18 00000000 852cffb0 852c8780 00000000 00000000 00000000
[ 99.426422] ff40: 00000000 00000000 00000000 00000000 00000000 00000000 646416bd 81205fc8
[ 99.434604] ff60: 18f5f673 852c8780 852c8780 00000000 00000000 80100264 852ce000 80259f60
[ 99.442787] ff80: 00000000 00000000 00000000 81205fc8 00000014 00000006 00a6c4f0 76f8d480
[ 99.450969] ffa0: 00000004 80100060 00000006 00a6c4f0 00000001 00a6c4f0 00000006 00000000
[ 99.459151] ffc0: 00000006 00a6c4f0 76f8d480 00000004 76f1bc60 00000000 004ecc00 00000000
[ 99.467333] ffe0: 00000004 7ecb19d8 76eb84bf 76e44386 40010030 00000001 00000000 00000000
[ 99.475528] [<808fd8e8>] (rproc_elf_load_segments) from [<80c83d8c>] (rproc_start+0x24/0x154)
[ 99.484063] [<80c83d8c>] (rproc_start) from [<808fb1bc>] (rproc_boot+0x494/0x4ac)
[ 99.491553] [<808fb1bc>] (rproc_boot) from [<808fc920>] (state_store+0x40/0xc8)
[ 99.498872] [<808fc920>] (state_store) from [<802f0d60>] (kernfs_fop_write_iter+0x10c/0x1cc)
[ 99.507320] [<802f0d60>] (kernfs_fop_write_iter) from [<80259ce0>] (vfs_write+0x318/0x44c)
[ 99.515591] [<80259ce0>] (vfs_write) from [<80259f60>] (ksys_write+0x64/0xe4)
[ 99.522734] [<80259f60>] (ksys_write) from [<80100060>] (ret_fast_syscall+0x0/0x54)
[ 99.530391] Exception stack(0x852cffa8 to 0x852cfff0)
[ 99.535447] ffa0: 00000006 00a6c4f0 00000001 00a6c4f0 00000006 00000000
[ 99.543630] ffc0: 00000006 00a6c4f0 76f8d480 00000004 76f1bc60 00000000 004ecc00 00000000
[ 99.551809] ffe0: 00000004 7ecb19d8 76eb84bf 76e44386
[ 99.556868] Code: bad PC value
[ 99.561373] ---[ end trace 2a8ab4c62ec4b5eb ]---
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:21 UTC):
kernel[249]: [ 99.348419] Stack: (0x852cfe28 to 0x852d0000)
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:21 UTC):
kernel[249]: [ 99.352781] fe20: 00002c14 846c4a80 00000000 00000005 00000001 00000020
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:21 UTC):
kernel[249]: [ 99.360964] fe40: c08910d4 1fff8000 c0948000 84da5440 c0891000 84699020 808fe084 84699000
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:21 UTC):
kernel[249]: [ 99.369146] fe60: 00000000 84699020 84da5440 84699020 84da5440 846c4a80 00000000 80c83d8c
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:21 UTC):
kernel[249]: [ 99.377329] fe80: 84699000 00000000 846991f8 84699204 84699020 808fb1bc 84da5440 81205fc8
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:22 UTC):
kernel[249]: [ 99.385511] fea0: 84699020 84da5080 00000006 84699000 8478aa10 00000000 00000000 808fc920
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:22 UTC):
kernel[249]: [ 99.393694] fec0: 00000006 84da5080 8478aa00 852cff30 8478aa10 802f0d60 00000000 00000000
Broadcast message from systemd-journald@scorpion (Tue 2023-05-16 23:50:22 UTC):
kernel[249]: [ 99.401876] fee0: 852c8780 00000000 00000006 00000000 852cff80 00000004 00000000 80259ce0
TechNexion i.MX Release Distro 5.10-hardknott scorpion ttymxc4
scorpion login: root
Solved! Go to Solution.
Unfortunately, this issue (different from what I had said and thought) has not yet been completely resolved.
What happens is the following:
I have two linux distributions here:
The first is ubuntu 22.04 which produced a yocto-kirkstone image, where indeed this issue was resolved.
Next is ubuntu 20.04 which produced a yocto-hardknott image where this issue remains.
Below is what I said when I thought this issue had been resolved:
I solved When I change Device Tree in the Yocto-A7-Side and enable in DTS RPMsg options
Tks
Cheers
Hi @neuberfran ,
I hope you're doing great. Could you let me know what BSP version are you using?
Also, I'd like to know if you have reviewed the following Application Note AN5317.pdf (nxp.com) (see section 9 for setting up Linux Remote Processor (RPROC) Framework).
Best regards,
Hector.
@hector_delgado Thank you for now
Regarding your question, I can build the Yocto image in either of the two ways below and it always gives the error:
repo init -u https://github.com/TechNexion/tn-imx-yocto-manifest.git -b kirkstone_5.15.y-next -m imx-5.15.52-2.1.0.xml
repo sync -j8
DISTRO=fsl-imx-wayland MACHINE=pico-imx7 BASEBOARD=pi source tn-setup-release.sh -b build-wayland-pico-imx7
bitbake imx-image-full
repo init -u https://github.com/TechNexion/tn-imx-yocto-manifest.git -b hardknott_5.10.y-next -m imx-5.10.52-2.1.0.xml
repo sync -j8
DISTRO=fsl-imx-x11 MACHINE=pico-imx7 BASEBOARD=pi source tn-setup-release.sh -b build-x11-pico-imx7
bitbake core-image-base
Regarding AN5317 chapter 9 I'm studying a lot about it, but if you want to propose changes to the github code below, I would be grateful:
https://github.com/neuberfran/pico_pi_m4
I still don't know if I have to put a resource table in the device tree (according to the website and photo). Especially because in Marcel's yt video (quoted in the post) the logs show a resource table error, but the project worked anyway:
https://docs.kontron-electronics.de/sw/yocto/build-ktn-imx/cortex-m4-mx8mm.html
https://postimg.cc/Lh5C0tY7
Note.:
https://www.youtube.com/watch?v=z9PzPP7TEYQ
https://www.youtube.com/watch?v=2VZWySnnd3Y
As per the videos above, I have RPMsg running on hardknott and kirskstone Yocto.
In this case, the RTOS is FreeRTOS.
Questions:
1) To do remoteproc (as done in the aforementioned video) must I first do RPMsg in U-boot? Or it is not necessary.
2) For remoteproc, is it better to use Zephyr OR FreeRTOS?
Unfortunately, this issue (different from what I had said and thought) has not yet been completely resolved.
What happens is the following:
I have two linux distributions here:
The first is ubuntu 22.04 which produced a yocto-kirkstone image, where indeed this issue was resolved.
Next is ubuntu 20.04 which produced a yocto-hardknott image where this issue remains.
Below is what I said when I thought this issue had been resolved:
I solved When I change Device Tree in the Yocto-A7-Side and enable in DTS RPMsg options
Tks
Cheers