Hi experts,
I am working on an example of IPCF on S32G399A board IPCF_FreeRTOS_S32G399A_M7_0
I got the error shown in the attachment screenshot.
Versions:
IPCF: 4.10.0
BSP : 41
Hello @MohamedAbdelslam ,
Thank you for contacting NXP Tech Support. Kindly note that the versions of IPCF used by the M core and the A core must be consistent. Since the IPCF version you are using on the M core is 4.10.0, the A core should also employ version 4.10.0. However, the default IPCF in Linux BSP41 may not be this version. You need to manually compile IPCF 4.10.0 for Linux. The source code of IPCF for the A core is available at the following link: https://github.com/nxp-auto-linux/ipc-shm.
We hope the above information is of use to you.
Best Regards,
Celeste
Hello @Celeste_Liu
Is there an example or guide to compile a different or a new version of the IPCF on Linux? I tried to compile it but it seems needs a kernel source on HW, if you have another idea to do that
Hello @MohamedAbdelslam ,
Compiling Linux IPCF indeed requires kernel code. Regarding how to compile a specific version of Linux IPCF (taking Linux bsp40 and IPCF4.9.0 as an example) and perform the insertion operation, please refer to the following steps:
Compile Linux kernel
Refer to sections 3.2.3 and 3.2.3.1 - 3.2.3.2 of the bsp40 document for operation.
Clone the Linux repository and Perform compilation:
git clone https://github.com/nxp-auto-linux/linux
cd linux
git checkout bsp40.0-5.15.145-rt
ls
make ARCH=arm64 CROSS_COMPILE=/path/to/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- s32cc_defconfig
make ARCH=arm64 CROSS_COMPILE=/path/to/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
Compile IPCF modules
Set the cross-compilation tool path, clone the IPCF repository and compile the modules.
export CROSS_COMPILE=/path/to/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
git clone https://github.com/nxp-auto-linux/ipc-shm
cd ipc-shm
git checkout release/SW32G_IPCF_4.9.0_D2310
make -C./sample KERNELDIR=~/path/to/linux PLATFORM_FLAVOR=s32g3 modules
Copy the following image files to the FAT32 partition (boot_s32g27) of the SD card:
Power on
If everything is okay, you will get the A53 booting log on the terminal. After Kernel is up, enter root to login.
Copy the IPC module files and insert IPCF modules
$mkdir ipc
$mount /dev/mmcblk0p1./ipc
$cp./ipc/ipc-shm-* ~
$umount./ipc
$insmod ipc-shm-dev.ko
$insmod ipc-shm-sample.ko
Hope the above information is helpful to you.
Best Regards,
Celeste
Hello @Celeste_Liu
I have updated the IPC version in the image to 4.10 to be compatible with M core Version following the README file that existed in the ipc-shm repo, mainly adding those two lines
Please refer to the above steps, the kernel file also needs to be replaced.
HI @Celeste_Liu I used Yocto for building the image and IPCF, following BSB41 RM. Should I build the image manually?
Hello, I suggest using the pre-built images by NXP to isolate any compilation/configuration errors under your custom yocto build. The following community post provides information on regards of manually building the IPCF module and loading into a pre-built image by NXP:
Hello @Celeste_Liu Thanks for your continued support
I have done those steps, cloned the kernel and IPC repositories and build them and copied the image, dtb and IPCF .ko files to boot partition successfully and continued the steps of the example but when try to insert the module i got the following error.
root@s32g399ardb3:~# insmod /lib/modules/5.15.153-rt75+gadceb7e8fa72/extra/ipc-shm-dev.ko
insmod: ERROR: could not insert module /lib/modules/5.15.153-rt75+gadceb7e8fa72/extra/ipc-shm-dev.ko: Invalid module format
please suggest us how to resolve this error?
Hello,
How did you copy the IPC module? Is it through the way shown in the following screenshot? If so, you should use “insmod ipc-shm-dev.ko” instead of “insmod /lib/modules/5.15.153-rt75+gadceb7e8fa72/extra/ipc-shm-dev.ko”.
BRs,
Celeste
Hi @Celeste_Liu
Typically as the instructions you provided, I have copied the IPC files then at the end umount ipc directory but when I used “insmod ipc-shm-dev.ko” , I got the following error message below
root@s32g399ardb3:~# ls /run/media/boot_s32g3-mmcblk0p1/
Image s32g399a-rdb3.dtb s32g_pfe_class.fw
root@s32g399ardb3:~# ls /ipc
root@s32g399ardb3:~# ls ~/ipc-shm-*.ko
/home/root/ipc-shm-dev.ko /home/root/ipc-shm-sample.ko
root@s32g399ardb3:~# insmod ~/ipc-shm-dev.ko
insmod: ERROR: could not insert module /home/root/ipc-shm-dev.ko: Invalid module format
Please let me know what is your recommendation to resolve this error and initiate IPC between M Core and A core
Hello @MohamedAbdelslam ,
If possible, would you mind posting a new question? So that we can better support you. This question has been open for too long.
BRs,
Celeste
Also I want to make sure that the version (in the attached screenshot) of the ipc in Linux is correct?
I can't determine the version of ipcf from your screenshot. However, if this is in the prebuilt image of Linux BSP41, it is very likely not the ipcf 4.10.0 version.