Hello @MohamedAbdelslam,
To be able to add FreeRTOS to your project you will need the FreeRTOS releases provided by NXP, you can find them following these steps:
- Sign in to your NXP account (NXP Semiconductors)
- Click on My NXP Account (top-right) and click on Software Licensing and Support under the Licensing section within the window it opens.
- This will redirect you to another page. In this new page, select the option View Accounts under the Software accounts section.
- This will again redirect you to another page. On this page, you should see an Automotive SW – S32G Reference Software option, click on it, then click on Automotive SW - S32G - FreeRTOS (Cortex-M7)
- Now you should be able to see all the FreeRTOS versions available, click on the newest version, for me it is S32G FreeRTOS 10.4.6 version 4.0.2
- accept the Software Terms and Conditions, now you should be able to see all the files related to that specific FreeRTOS release for S32G. Select and download the file with the word updatesite on it, it should be a zip file.
- Once the file is downloaded, open the S32 Design Studio, open the Help menu on the top of the window, and then select install new software

- In the new window select Add…, a new window will appear, select Archive…, and select the file you just downloaded, and then click add.

Then select all components and clock on Next >

- Follow all installation steps and then click con finish, you will see the installation progress on the right bottom corner of the program, once it finishes you will be ask to restart the program, once the program is restarted, you can start a project from one of the FreeRTOS examples available. Select File -> New -> S32FS Project from Example

- Search for FreeRTOS in the empty textbox and select FreeRTOS_Toggle_Led_Example_S32G399A_M7 then click on finish.

- now double click on the .mex file on the project explorer

- in the new view select Update Code

- Now you can return to the code by clicking the C/C++ view on the right side of the screen

Now you should be able to compile the program without problems.
Let me know if this information was useful.