FreeRTOS Task Not Created on CM4 in MIMXRT1176 Dual-Core Setup

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

FreeRTOS Task Not Created on CM4 in MIMXRT1176 Dual-Core Setup

763 Views
meetbhatt2113
Contributor II

Hello NXP Community,

I am working with the MIMXRT1176 and trying to run the same application on both the CM7 and CM4 cores using FreeRTOS.

I used these SDK examples as the base for my code:
evkbmimxrt1170_hello_world_secondary_core_boot_primary_core_cm7
evkbmimxrt1170_hello_world_secondary_core_boot_secondary_core_cm4

On the CM7 core, the FreeRTOS task is created and runs successfully.
However, when I run the same application logic on the CM4 core, the FreeRTOS task creation fails and the task does not start.

I am not sure what is causing this difference between CM7 and CM4.
Could this be related to memory allocation, linker script settings, heap or stack size, or any CM4-specific FreeRTOS or clock initialization requirements?

I would appreciate your guidance on what I should check next or how to resolve this issue.

Thank you for your support.

Tags (2)
0 Kudos
Reply
2 Replies

631 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @meetbhatt2113,

When debugging, do you see if the CM4 core was booted successfully? How do you see the task creation failed? What parameters are you using to create the task on each core?

BR,
Edwin.

0 Kudos
Reply

507 Views
meetbhatt2113
Contributor II

@EdwinHz 

On the CM7 core, I added a debug print before starting the secondary core. That message appears correctly on the terminal, which confirms that CM7 is running as expected.

Then I switch the debugger to the CM4 core. I added a print statement at the beginning of the CM4 code, and that message also appears successfully on the terminal. This confirms that the CM4 core is booted and executing code properly.

After this initial print on CM4, I attempt to create a FreeRTOS task. At this point, the task creation fails, and an error message is printed on the terminal. The task never enters the running state.

I have attached a snapshot of the terminal output showing the successful CM4 boot message followed by the task creation failure.

cm4_task_fail.png

Tags (2)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2296011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFreeRTOS%20Task%20Not%20Created%20on%20CM4%20in%20MIMXRT1176%20Dual-Core%20Setup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20Community%2C%3C%2FP%3E%3CP%3EI%20am%20working%20with%20the%20MIMXRT1176%20and%20trying%20to%20run%20the%20same%20application%20on%20both%20the%20CM7%20and%20CM4%20cores%20using%20FreeRTOS.%3C%2FP%3E%3CP%3EI%20used%20these%20SDK%20examples%20as%20the%20base%20for%20my%20code%3A%3CBR%20%2F%3Eevkbmimxrt1170_hello_world_secondary_core_boot_primary_core_cm7%3CBR%20%2F%3Eevkbmimxrt1170_hello_world_secondary_core_boot_secondary_core_cm4%3C%2FP%3E%3CP%3EOn%20the%20CM7%20core%2C%20the%20FreeRTOS%20task%20is%20created%20and%20runs%20successfully.%3CBR%20%2F%3EHowever%2C%20when%20I%20run%20the%20same%20application%20logic%20on%20the%20CM4%20core%2C%20the%20FreeRTOS%20task%20creation%20fails%20and%20the%20task%20does%20not%20start.%3C%2FP%3E%3CP%3EI%20am%20not%20sure%20what%20is%20causing%20this%20difference%20between%20CM7%20and%20CM4.%3CBR%20%2F%3ECould%20this%20be%20related%20to%20memory%20allocation%2C%20linker%20script%20settings%2C%20heap%20or%20stack%20size%2C%20or%20any%20CM4-specific%20FreeRTOS%20or%20clock%20initialization%20requirements%3F%3C%2FP%3E%3CP%3EI%20would%20appreciate%20your%20guidance%20on%20what%20I%20should%20check%20next%20or%20how%20to%20resolve%20this%20issue.%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20support.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2296011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EBoot%20ROM%7CBooting%20%7C%20Flash%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPackage%20and%20IO%7CGPIO%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2299439%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FreeRTOS%20Task%20Not%20Created%20on%20CM4%20in%20MIMXRT1176%20Dual-Core%20Setup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2299439%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F256480%22%20target%3D%22_blank%22%3E%40meetbhatt2113%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EWhen%20debugging%2C%20do%20you%20see%20if%20the%20CM4%20core%20was%20booted%20successfully%3F%20How%20do%20you%20see%20the%20task%20creation%20failed%3F%20What%20parameters%20are%20you%20using%20to%20create%20the%20task%20on%20each%20core%3F%3C%2FP%3E%0A%3CP%3EBR%2C%3CBR%20%2F%3EEdwin.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2300844%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FreeRTOS%20Task%20Not%20Created%20on%20CM4%20in%20MIMXRT1176%20Dual-Core%20Setup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2300844%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F186731%22%20target%3D%22_blank%22%3E%40EdwinHz%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOn%20the%20CM7%20core%2C%20I%20added%20a%20debug%20print%20before%20starting%20the%20secondary%20core.%20That%20message%20appears%20correctly%20on%20the%20terminal%2C%20which%20confirms%20that%20CM7%20is%20running%20as%20expected.%3C%2FP%3E%3CP%3EThen%20I%20switch%20the%20debugger%20to%20the%20CM4%20core.%20I%20added%20a%20print%20statement%20at%20the%20beginning%20of%20the%20CM4%20code%2C%20and%20that%20message%20also%20appears%20successfully%20on%20the%20terminal.%20This%20confirms%20that%20the%20CM4%20core%20is%20booted%20and%20executing%20code%20properly.%3C%2FP%3E%3CP%3EAfter%20this%20initial%20print%20on%20CM4%2C%20I%20attempt%20to%20create%20a%20FreeRTOS%20task.%20At%20this%20point%2C%20the%20task%20creation%20fails%2C%20and%20an%20error%20message%20is%20printed%20on%20the%20terminal.%20The%20task%20never%20enters%20the%20running%20state.%3C%2FP%3E%3CP%3EI%20have%20attached%20a%20snapshot%20of%20the%20terminal%20output%20showing%20the%20successful%20CM4%20boot%20message%20followed%20by%20the%20task%20creation%20failure.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22cm4_task_fail.png%22%20style%3D%22width%3A%20788px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22cm4_task_fail.png%22%20style%3D%22width%3A%20788px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F374329iE31980111F6CAAEF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22cm4_task_fail.png%22%20alt%3D%22cm4_task_fail.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E