This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320C6713B: Just release a portion of source codes

Part Number: TMS320C6713B

Tool/software: Code Composer Studio

Hello,

I would like to release a portion of our source codes to our customer so that they can develop some functions by their own. How can I hidden most of our source codes by compiling them into a specific format such as .obj and just release .c file to our customer to develop their own functions, and then our customers can compile their .c file together with our specific format files to get a .hex file.

for example

If there are two .c files named Company.c and Customer.c respectively in my project.

I would like to release the whole project to my customer where Company.c is compile to a specific format such as Company.obj

Our customer can develop some functions in Cousomer.c and the functions are called in Company.c.

Finally, the customer can compile the whole project to have a .hex by CCS

Is it possible to do this? 

Thanks a lot for you great help !



 

  • Jason,

    One way of doing this would be as follows:

    Make a copy of your project so you don't lose anything

    Here in this project you can see that I have blink.c and john.c

    Inside my Debug folder will be the object files for each of my source files.  

    What I did next is I dragged john.obj into the root of my project.  Now John.obj is a source file for my project and I then deleted John.c (safer at first to just exclude John.c).

    I can build this project fine.  I can now share it and not be giving the C source to the contents of John.c

    Regards,

    John

  • Hello!

    Though sharing specific object file may work, rational way of doing this job is to create a library. This way you have to create separate project with output type static library, move your sources there and produce the library. Once built, you may as use it in your projects, so share with customers. This way we obtain shared code from TI, lie DSPLIB and so on.

  • Hello, John

    Thank you for the answer. I think this is a right way but it doesn’t work on my project. The CCS shows errors ‘undefined symbol’ during “linking” when I use .obj in place of the original .c file. And the undefined symbol are the functions in the original .c file.

    Please allow me to ask more. If I want to replace .c file by its corresponding .obj, should I modify the .pjt file or lnk.cmd. If yes, could you please teach me how.

    Thank you very much for your kind reply !

  • Hello, rrlagic

    Thanks for the answer, I have considered library method, too. As I know, we can create and release library so that the users can call the functions in library in developing their new functions. However, in my case, the functions developed by customers were called in the hidden library or .obj file.

    For example

    In A.c, function fun_B() is called, where fun_B() is developed in B.c.

    The key issue is the function fun_B() developed by customers in B.c will be called in the hidden part(A.c).

    Is this possible by using library method?

    Thank you very much for your kind reply !

  • rrlagic's suggest would be the proper way to do it.  Swapping in the .obj file is a quick method but building a library is better.

    I see that you mentioned .pjt files in your reply.  Are you using CCSv3.x?  I don't know that my method would work in that version as it is a completely different build system.  You would likely have to add the .obj file to the items being passed to the linker via the project options.

    John

  • Sure, that's possible. For your case you just need to declare called functions prototypes to your library and require customers to develop their functions according to those prototypes. That's it.