Hello @HirenThumar2702
First let me thank you for posting.
The compilation error you are facing are caused by the fact that X-Cube-FreeRtos is not selected for the secure project. Therefore, some dependencies are not generated and will lead to those errors.
However, at he moment the tool will not allow you to select the pack for both context at the same time whichi will make the errors appear every time. This is a know issue and it's tracked by this ticket to be resolved asap 151921 (This is an internal tracking number and is not accessible or usable by customers).
In the mean while, and as a temporary solution, I advise you to follow these steps to generate your project:
- Go to [Software Packs]->[Select Components] : select the X-Cube-FreeRtos for the secure context

- Under [Middleware and Software Packs]->[X-CUBE-FREERTOS] : Select the "CMSIS RTOS2" for the secure context

- Under [Project Manager]->[Code Generator] :
- select the "Copy all used libraries into the project folder"
- Uncheck the "Delete previously generated files when not re-generated"

- Generate Code
- Go back to the [Software Packs]->[Select Components] : uncheck the X-Cube for the secure context and select the pack for the non-secure one with the heap configuration you need

- Under [Middleware and Software Packs]->[X-CUBE-FREERTOS] : Select the "CMSIS RTOS2" for the non-secure context with the configuration you want
This solution should resolve the dependency issue, waiting for a permanent fix.
Don't hesitate to ask further question if you still facing any misbehavior in the tool.
Kind regards,
Semer.