Question:
How to build a specific code for core 1 or 2 where source file is common for both cores in Multicore Application.
Answer:
Use preprocessor symbol # CORE1 and # CORE2 which is already defined in below project properties of respective cores to build specific source code for specific cores in a single source file.
Properties -> C/C++ General -> paths and symbols -> symbols tab
For example:
#ifdef CORE1
{
//code only for core1
}
#endif
#ifdef CORE2
{
//code only for core1
}
#endif