ipc-shm software package version for s32g3 kernel 5.10.158-rt77

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ipc-shm software package version for s32g3 kernel 5.10.158-rt77

ソリューションへジャンプ
6,233件の閲覧回数
fengxianeric
Contributor IV

Dear friends, about hardware platform s32g399a, I used kernel 5.10.158-rt77 from 

s32cc_defconfig, but failed to run sample module and got kernel crash with 2 ways,

#1 Method build without poll

step 1  insmod ipc-shm-dev.ko

step 2  insmod ipc-shm-sample.ko  ==> crash !

#2 Method build with poll

step 1  insmod ipc-shm-dev.ko

step 2  insmod ipc-shm-sample.ko  ==> crash !

--------------------


root@s32g274ardb2:~/release0511/poll# insmod ../ipc-shm-dev.ko
root@s32[ 23.991908] ipc_shm_dev: loading out-of-tree module taints kernel.
g274ardb2:~/release0511/poll# ls
ipc-shm-sample.elf ipc-shm-sample.ko ipc-shm-sample_multi-instance.ko
root@s32g274ardb2:~/release0511/poll# lsmod
Module Size Used by
ipc_shm_dev 40960 0
root@s32g274ardb2:~/release0511/poll# ./ipc-shm-sample.elf
ipc-shm-us-lib: ipc_os_init(): Can't open /home/eric/myspace/nxp/s32g3/modulesinstall/lib/modules/5.10.158-rt77/kernel/extra/ipc-shm-uio.ko module
root@s32g274ardb2:~/release0511/poll# mkdir -p /home/eric/myspace/nxp/s32g3/modulesinstall/lib/modules/5.10.158-rt77/kernel/extra/
root@s32g274ardb2:~/release0511/poll# cp ../ipc-shm-uio.ko /home/eric/myspace/nxp/s32g3/modulesinstall/lib/modules/5.10.158-rt77/kernel/extra/
root@s32g274ardb2:~/release0511/poll# ./ipc-shm-sample.elf
[ 65.459695] ipc-shm-uio 40198000.mscm: GIC Rx IRQ = 24
[ 65.459959] ipc-shm-uio 40198000.mscm: device ready
[ 65.460850] SError Interrupt on CPU7, code 0xbf000002 -- SError
[ 65.460861] CPU: 7 PID: 415 Comm: ipc-shm-sample. Tainted: G O 5.10.158-rt77 #13
[ 65.460867] Hardware name: NXP S32G399A-RDB3 (DT)
[ 65.460872] pstate: 60000000 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[ 65.460878] pc : 000000000040299c
[ 65.460880] lr : 0000000000402900
[ 65.460882] sp : 0000007feb637380
[ 65.460884] x29: 0000007feb637380 x28: 0000000000000000
[ 65.460894] x27: 0000000000000000 x26: 0000000000000000
[ 65.460901] x25: 0000000000000000 x24: 0000000000000000
[ 65.460906] x23: 0000000000000000 x22: 0000000000000000
[ 65.460912] x21: 0000000000401210 x20: 0000000000000000
[ 65.460917] x19: 0000000000404810 x18: 0000000000000000
[ 65.460924] x17: 0000007fb2fc9f40 x16: 0000007fb30a9f18
[ 65.460930] x15: 0000000000000000 x14: 0000000000000120
[ 65.460936] x13: 0000007fb3066108 x12: 0000007fb2cf8150
[ 65.460942] x11: 00000000003d0f00 x10: 0000007fb3086e24
[ 65.460948] x9 : 0000000001798470 x8 : 0000000000000087
[ 65.460953] x7 : 0000000000000000 x6 : 0000007fb2cf8220
[ 65.460959] x5 : 0000007fb2cf88e0 x4 : 00000000004161c8
[ 65.460964] x3 : 0000007fb2cf9008 x2 : 0000000000000000
[ 65.460971] x1 : 0000000000000000 x0 : 0000000000000048
[ 65.460978] Kernel panic - not syncing:
[ 65.460980] Asynchronous SError Interrupt
[ 66.461104] SMP: stopping secondary CPUs
[ 66.596970] Kernel Offset: disabled
[ 66.600436] CPU features: 0x00040022,2000200c
[ 66.604777] Memory Limit: none
[ 66.607819] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---

 

0 件の賞賛
返信
1 解決策
5,603件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

How are you setting your "project_parameters.mk" file? You are seeing that the specific file is not included under the include path.

Also, are you setting the flag to let EBT copy the project into its workspace?

DanielAguirre_0-1685133354057.png

If so, the generated files are not located at the IPCF example folder, but at the EB tresos folder. You can copy the generated files into the example folder (from EB/tresos/generate to Ipcf_TS_T40D11M40I0R0/examples/EBT/S32G3/Ipcf_Example_S32G399A_M7/generate), since the makefile of the project is configured to search in here, where the file that you are looking is located.

If you do not set the copy flag (as shown above), then your generate/include folder should look as follows:

DanielAguirre_1-1685133459583.png

Which, again, has the file that you are looking for.

Please, let us know.

元の投稿で解決策を見る

0 件の賞賛
返信
31 返答(返信)
2,735件の閲覧回数
fengxianeric
Contributor IV
No, I referred to tresos since description.txt mentioned that tool. and also I asked these 2 tools difference for software config or running ?
0 件の賞賛
返信
1,406件の閲覧回数
fengxianeric
Contributor IV
Thanks.
After our internal discussion and correct project variables, now single instance(main.bin) can be workable. Updated below for you,
-----------------------------------------------
[ 77.765958] ipc-shm-sample: starting demo...
[ 77.765974] ipc-shm-sample: ch 0 >> 20 bytes: SENDING MESSAGES: 10
[ 77.765984] ipc-shm-sample: ch 1 >> 32 bytes: #0 HELLO WORLD! from KERNEL
[ 77.766023] ipc-shm-sample: ch 1 << 32 bytes: #0 HELLO WORLD! from CORE 4
[ 77.766054] ipc-shm-sample: ch 2 >> 32 bytes: #1 HELLO WORLD! from KERNEL
[ 77.766087] ipc-shm-sample: ch 2 << 32 bytes: #1 HELLO WORLD! from CORE 4
[ 77.766112] ipc-shm-sample: ch 1 >> 32 bytes: #2 HELLO WORLD! from KERNEL
[ 77.766144] ipc-shm-sample: ch 1 << 32 bytes: #2 HELLO WORLD! from CORE 4
[ 77.766168] ipc-shm-sample: ch 2 >> 32 bytes: #3 HELLO WORLD! from KERNEL
[ 77.766199] ipc-shm-sample: ch 2 << 32 bytes: #3 HELLO WORLD! from CORE 4
[ 77.766222] ipc-shm-sample: ch 1 >> 32 bytes: #4 HELLO WORLD! from KERNEL
[ 77.766255] ipc-shm-sample: ch 1 << 32 bytes: #4 HELLO WORLD! from CORE 4
[ 77.766278] ipc-shm-sample: ch 2 >> 32 bytes: #5 HELLO WORLD! from KERNEL
[ 77.766311] ipc-shm-sample: ch 2 << 32 bytes: #5 HELLO WORLD! from CORE 4
[ 77.766334] ipc-shm-sample: ch 1 >> 32 bytes: #6 HELLO WORLD! from KERNEL
[ 77.766366] ipc-shm-sample: ch 1 << 32 bytes: #6 HELLO WORLD! from CORE 4
[ 77.766389] ipc-shm-sample: ch 2 >> 32 bytes: #7 HELLO WORLD! from KERNEL
[ 77.766422] ipc-shm-sample: ch 2 << 32 bytes: #7 HELLO WORLD! from CORE 4
[ 77.766445] ipc-shm-sample: ch 1 >> 32 bytes: #8 HELLO WORLD! from KERNEL
[ 77.766476] ipc-shm-sample: ch 1 << 32 bytes: #8 HELLO WORLD! from CORE 4
[ 77.766499] ipc-shm-sample: ch 2 >> 32 bytes: #9 HELLO WORLD! from KERNEL
[ 77.766531] ipc-shm-sample: ch 2 << 32 bytes: #9 HELLO WORLD! from CORE 4
[ 77.766552] ipc-shm-sample: exit demo
[ 77.766552] ipc-shm-sample: ch 0 << 20 bytes: REPLIED MESSAGES: 10
---------------------------
The next question is that I myself can build pass with design studio, why did it fail to run ? but multi-instances seem workable.
0 件の賞賛
返信
1,398件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

HI, 

Thanks for your feedback.

The Single Instance IPCF 4.8.0 example has a bug, which a patch was provided before.

Once the patch is implemented under the M7 application, you should be able to see it working no problem.

Please, let us know.

0 件の賞賛
返信
1,645件の閲覧回数
fengxianeric
Contributor IV

Now I am prepared for switching tresos studio method and not sure yet for compilation.

0 件の賞賛
返信
1,566件の閲覧回数
fengxianeric
Contributor IV
Hi, I got errors when making build,
-------------------
EricLi@Tomato MSYS /c/NXP/SW32G_IPCF_4.8.0_D2212/eclipse/plugins/Ipcf_TS_T40D11M40I0R0/examples/EBT/S32G3/Ipcf_Example_S32G399A_M7
$ make build
======================================================================
Creating directory for object files
Compiling src/main.c
In file included from D:/ipcfInstall/NXP/S32DS.3.5/S32DS/software/PlatformSDK_S32XX_4_0_0/RTD/Base_TS_T40D11M40I1R0/include/StandardTypes.h:51,
from D:/ipcfInstall/NXP/S32DS.3.5/S32DS/software/PlatformSDK_S32XX_4_0_0/RTD/Base_TS_T40D11M40I1R0/include/Mcal.h:60,
from src/main.c:19:
D:/ipcfInstall/NXP/S32DS.3.5/S32DS/software/PlatformSDK_S32XX_4_0_0/RTD/Base_TS_T40D11M40I1R0/include/Platform_Types.h:56:10: fatal error: PlatformTypes.h: No such file or directory
56 | #include "PlatformTypes.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:274:main.o] 错误 1

Thanks
0 件の賞賛
返信
1,417件の閲覧回数
fengxianeric
Contributor IV
Share my environment with you,
-------------------------------------------
#The path to the GCC installation dir
#GCC_DIR = C:/NXP/S32DS.3.5_S32K396/S32DS/build_tools/gcc_v9.2/gcc-9.2-arm32-eabi
GCC_DIR = D:/ipcfInstall/NXP/S32DS.3.5/S32DS/build_tools/gcc_v9.2/gcc-9.2-arm32-eabi

#The path to the EB Tresos installation dir
#TRESOS_DIR = C:/EB/tresos27
TRESOS_DIR = D:/EB/tresos
#The path to the T32 installation dir
T32_DIR = C:/NOT/CONFIGURED/PATH

#The path to the VDK installation dir
VDK_DIR = C:/NOT/CONFIGURED/PATH

#The path to the Tresos plugins directory
#PLUGINS_DIR = ../../../../..
PLUGINS_DIR = D:/EB/tresos/plugins
#The path to the Tresos add-on plugins directory
PLUGINS_DIR_ADDON = C:/NXP/SW32G_IPCF_4.8.0_D2212/eclipse/plugins

#The paths to the additional directories to be included at build phase
#ADDITIONAL_INCLUDE_DIRS = /d/EB/tresos/plugins/Ipcf_TS_T40D11M40I0R0/examples/EBT/S32G3/Ipcf_Example_S32G399A_M7/include
#ADDITIONAL_INCLUDE_DIRS = /d/cygwin64/usr/x86_64-w64-mingw32/sys-root/mingw/include/unicode/
#ADDITIONAL_INCLUDE_DIRS = /d/ipcfInstall/NXP/S32DS.3.5/S32DS/software/PlatformSDK_S32XX_4_0_0/RTD/Base_TS_T40D11M40I1R0/include
#ADDITIONAL_INCLUDE_DIRS = /d/ipcfInstall/NXP/S32DS.3.5/S32DS/software/PlatformSDK_S32XX_4_0_0/RTD/Base_TS_T40D11M40I1R0/generate_PC/include
#Loading project to ram or flash
LOAD_TO=

# ------------------------------------------------------------------------------------
#Example specific parameters - do not modify

#MCAL modules used
MCAL_MODULE_LIST := Base Mcu Os Platform Resource Rte

#MCAL modules used - only for examples based on 2 software products
MCAL_MODULE_LIST_ADDON :=

#The package name for the MCAL release
#AR_PKG_NAME = TS_T40D11M40I0R0
AR_PKG_NAME = Base_TS_T40D11M30I4R0
#The package name for the MCAL release - only for examples based on 2 software products
AR_PKG_NAME_ADDON =

#The derivative of the device
EXAMPLE_DERIVATIVE = S32G399A

#The core type of the device
EXAMPLE_CORE_TYPE = M7

#The name of the elf file
ELFNAME = main

#The test base address
TEST_BASE_ADDR = 0x34500000

# The test block size
TEST_BLOCK_SIZE = 255

#The name of the Tresos project
TRESOS_PROJECT_NAME = Ipcf_Example_S32G399A_M7

#The number of variants for the Tresos project
VARIANT_NO = 0

#Connection type of lauterbach
PBI = replace_pbi
0 件の賞賛
返信
5,604件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

How are you setting your "project_parameters.mk" file? You are seeing that the specific file is not included under the include path.

Also, are you setting the flag to let EBT copy the project into its workspace?

DanielAguirre_0-1685133354057.png

If so, the generated files are not located at the IPCF example folder, but at the EB tresos folder. You can copy the generated files into the example folder (from EB/tresos/generate to Ipcf_TS_T40D11M40I0R0/examples/EBT/S32G3/Ipcf_Example_S32G399A_M7/generate), since the makefile of the project is configured to search in here, where the file that you are looking is located.

If you do not set the copy flag (as shown above), then your generate/include folder should look as follows:

DanielAguirre_1-1685133459583.png

Which, again, has the file that you are looking for.

Please, let us know.

0 件の賞賛
返信
1,415件の閲覧回数
fengxianeric
Contributor IV
To be response to your questions,
1. Yes I did copy selection;
2. Yes I copied generate files;
3. I make build with errors below,
C:\NXP\SW32G_IPCF_4.8.0_D2212\eclipse\plugins\Ipcf_TS_T40D11M40I0R0\examples\EBT\S32G3\Ipcf_Example_S32G399A_M7>make build
====================================
Creating directory for object files
Compiling src/main.c
src/main.c:19:10: fatal error: Mcal.h: No such file or directory
19 | #include "Mcal.h"
| ^~~~~~~~
compilation terminated.
make: *** [Makefile:274: main.o] Error 1
0 件の賞賛
返信
1,411件の閲覧回数
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your feedback.

Since "Mcal.h" file is provided under the Base plugin, it seems the problem is the configuration you provided to the makefile. Image below shows the location of the "Mcal.h" file:

DanielAguirre_0-1685469244825.png

How are you configuring the "project_parameters.mk" file?

Please, let us know.

0 件の賞賛
返信
1,407件の閲覧回数
fengxianeric
Contributor IV
Yes attached such info above. Thanks very much.
0 件の賞賛
返信
1,434件の閲覧回数
fengxianeric
Contributor IV

Plus question: could you tell what it will influence by different compilation (ds/tresos), thanks

0 件の賞賛
返信