Hi jiangfeng,
In general, the main difference between the application created, built & download with Matlab and the application built and download with CW/S32DS/any other IDE, consists in:
- linker command file: the one from Matlab is using a special memory arrangement to allow the download via RAppID boot loader and as consequence it expect some reserved areas
- startup up sequence (startup files) which is different. In the IDE, the debugger is performing additional steps to clear up the memory and will download the program&data sections.
Therefore, you should consider these 2 main difference when you try to build and debug the application via an IDE like CW/S32DS/IAR/etc.
As rule of thumb, if the application works from Matlab/Simulink download via RAppID bootloader or OpenSDA, then in the IDE use case you should consider the modification highlighted above.
Hope this helps!
Daniel