cancel
Showing results for 
Search instead for 
Did you mean: 

Need to hide the .c files from client

ARauf
Associate

I have been using Atollic TrueSTUDIO for STM32F3DISCOVERY applications to write and test algorithm for a client. After successful debugging and testing I have to handover the project to the client. However I cannot reveal my source code which is actually a .c file.

Is there a way I can hide the .c file from client . 

4 REPLIES 4

You deliver the compiled object .o, and a header file .h describing the interface.

JW

I don't use Eclipse nor any other IDE, so can't help with that.

The normal build flow is, that first you compile .c sources into .o objects, and then link all the .o objects into the resulting .elf. So, in this case, you add the compiled .o object to the list of objects to be linked.

JW

ARauf
Associate

Thank you for the reply. Indeed this is the right way but I need help on making a library. I am generating the initial code from STM32CubeMX and adding my own .c and .h files in the the src folder.

The name of the my code files are Vase.c and Vase.h. I compiled them and got Vase.o (besides other files).

I suppose I am going to give the client only object file Vase.o and header file Vase.h.

To test them myself I opened a new project , added Vase.o in Debug/src folder and Vase.h in the src folder. Now to test my library, I need to call a function that is declared in Vase.h and defined in Vase.o.

However When I do that and build the program , I get the error msg ( no function definition ).

Can you help me on it.

As I've said, I don't use Eclipse nor its derivatives produced by Atollic and AC6, so can't help with specific instructions for these.

Would you use a standard make/Makefile, you'd find the line where gcc is invoked for linking (with .o objects as their inputs, usually through a pattern rule, outputting .elf) and then add this .o "manually".

JW