Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 224304

Forum Post: RE: Pre Defined Symbols to build ONLY cla.obj

$
0
0
Thanks for the reply. [quote userid="235944" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1499587/pre-defined-symbols-to-build-only-cla-obj/5768974#5768974"] Are you trying to generate separate output files (e.g. main1.out, main2.out)? Or are you looking for separate main.obj files for each core? I'm not sure that would be possible without renaming the main.c file or saving the generated object files between builds. [/quote] I am not running into issues between the 2 cores. If I understand correctly - each CPU subsystem has an .out file which is the relevant .objs linked together as per the linker script. If I wanted to use the same source file, in both the CPU and CLA on the same subsystem - and I had used the appropriate preprocessor directives to manipulate the definitions - is it possible for the same code - to be compiled by the different compilers (with different predefines) to generate distinct .objs - one for the C28 and the other for the CLA - which is then linked to the relevant calls made by CPUx_main.obj and cla_tasks.obj respectively? [quote userid="647392" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1499587/pre-defined-symbols-to-build-only-cla-obj/5765711#5765711"]But I still get the warning Invalid to call C28 function "func1" defined in "./shared.obj" from CLA file "./cpu2_cla.ob [/quote] I assume that the error message I receive (mentioned in a previous reply) is generated because the shared.h file is compiled by the C28 compiler, and then the same .obj is being reused by the CLA. The only reason I am trying to achieve this behavior - is to manage my source code effectively. I am attempting to port some Motor Control code from the C28 to the CLA. I would like the code to be in the same file for future maintainability.

Viewing all articles
Browse latest Browse all 224304

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>