FreeRTOS stucks at prvPortStartFirstTask in s32k3xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FreeRTOS stucks at prvPortStartFirstTask in s32k3xx

108 Views
AntoZ
Contributor II

Hi Everyone , 

i am trying to run FreeRTOS run in S32k328, i created a single task and try to run it , at first time runs properly , but after that  code stuck at one

Hi Everyone , 

i am trying to run FreeRTOS run in S32k328, i created a single task and try to run it , at first time runs properly , but after that  code stuck at one prvPortStartFirstTask(), 

AntoZ_0-1759158821831.png

AntoZ_3-1759158949207.png

 

i changed the svc handler name in vector table , we got this error, posted the images for your reference, 

Screenshot 2025-09-29 203137.png

AntoZ_1-1759158884509.png

 

AntoZ_2-1759158900388.png

do anything needs to change?

(), 

AntoZ_0-1759158821831.png

AntoZ_3-1759158949207.png

 

i changed the svc handler name in vector table , we got this error, posted the images for your reference, 

Screenshot 2025-09-29 203137.png

AntoZ_1-1759158884509.png

 

AntoZ_2-1759158900388.png

do anything needs to change?

S32K3 

 

0 Kudos
Reply
1 Reply

58 Views
PavelL
NXP Employee
NXP Employee

Hello @AntoZ ,

Thank you for the additional information and screenshots.

From the register view, I can see that the VTOR (Vector Table Offset Register) is set to 0x20000000, which means the vector table is relocated to RAM. This is a valid configuration, but it requires that the vector table in RAM is correctly initialized, including the entry for the SVC_Handler.

Since you mentioned that you renamed the SVC_Handler, please ensure the following:

  1. The vector table in RAM at 0x20000000 must contain the correct address of your renamed SVC_Handler.
    If the table was copied from flash, make sure it reflects the updated symbol name.

  2. If you are using C++, ensure the handler is declared with extern "C" to avoid name mangling:

     
    extern "C" void My_SVC_Handler(void)
     
  3. Verify that the vector table is correctly copied to RAM before setting VTOR.
    This is typically done early in SystemInit() or main().

  4. Double-check that the renamed handler is correctly linked and not discarded by the linker.

If the issue persists, could you please share a minimal version of your project that reproduces the problem? This would help us analyze the vector table setup and handler linkage in more detail.

Best regards,

Pavel

0 Kudos
Reply