S32KOS sample "S32K_AUTOSAR_OS_4_0_98_RTM_1_0_0" shutdown

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

S32KOS sample "S32K_AUTOSAR_OS_4_0_98_RTM_1_0_0" shutdown

ソリューションへジャンプ
1,202件の閲覧回数
decoski
Contributor II

Hello:

I am using an example of s32k autosar SDK "\AUTOSAR\AAS32K_AUTOSAR_OS_4_0_98_RTM_1_0_0\sample\standard\sc1" ,

All files have been generated and compiled.

development environment: S32DS 3.5

startup file :startup_S32K144.S 

linker file: S32K144_64_flash.ld. 

I use this. s and. ld(not changed) because the relevant files in the SDK(startup_gcc.s,vector_gcc.ssample1_fls.gld) cannot be compiled to generate a normal size .elf.

Clock initialization has been performed :

CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);

Then routine always jump to OSShutdownOS afterwards,Prompt for stack overflow. shown below:acv.png

May I ask where the question is? Thank you for answering.

 

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,016件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hi @decoski,

I imported your project into S32DS v3.4 and I saw errors as you said.

I modified your project as below and it ran OK.

1. In the OSInterruptDispatcher (void) function: change " ldr r0, [r13,#0x24] \n\r" to " ldr r0, [r13,#0x20] \n\r"

2. Modify compiler properties as below images:

nxf78987_0-1683804233979.pngnxf78987_1-1683804284536.pngnxf78987_2-1683804309714.png

nxf78987_3-1683804385666.png

I attached this modified example.

Best regards,

Dan

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,131件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hi @decoski,

Could you send me your example?

Best regards,

Dan

0 件の賞賛
返信
1,060件の閲覧回数
decoski
Contributor II

Thank you for your reply. These days I adjusted my program and modified the interrupt vector table so that interrupts can run normally to OSInterruptDispatcher1, but eventually they will enter HardFaultException as shown in the figure:屏幕截图 2023-05-10 205501.png

My Partial interrupt vector:

 

屏幕截图 2023-05-10 211204.png屏幕截图 2023-05-10 211358.png

I checked the MSP stack and couldn't find any errors. I need your help.The attachment has been uploaded. Please refer to and assist in resolving my issue.Thank you! @nxf78987 

0 件の賞賛
返信
1,055件の閲覧回数
decoski
Contributor II

I also made one modification, which was xpsr. I observed that he saved the PC value instead of xpsr, so I changed its direction(#0x24), as shown in the figure. I don't know if it is correct, because the final result of the program is HardFaultException.These contents are all in the attachment I uploaded, please correct them,Thank you for your help!屏幕截图 2023-05-10 213829.png

0 件の賞賛
返信
1,017件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hi @decoski,

I imported your project into S32DS v3.4 and I saw errors as you said.

I modified your project as below and it ran OK.

1. In the OSInterruptDispatcher (void) function: change " ldr r0, [r13,#0x24] \n\r" to " ldr r0, [r13,#0x20] \n\r"

2. Modify compiler properties as below images:

nxf78987_0-1683804233979.pngnxf78987_1-1683804284536.pngnxf78987_2-1683804309714.png

nxf78987_3-1683804385666.png

I attached this modified example.

Best regards,

Dan

0 件の賞賛
返信