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:
May I ask where the question is? Thank you for answering.
Solved! Go to Solution.
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:
I attached this modified example.
Best regards,
Dan
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:
My Partial interrupt vector:
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
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!
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:
I attached this modified example.
Best regards,
Dan