This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

INCLUDING OBJECT FILES IN LINK

Hi All,

I have 3 source files: file1.c, file2.c and file3.c and 1 header file config.h.

When I built entire uvision project, 3 object files got generated. file1.obj, file2.obj, file3.obj.

Now I re-build the project & generate hex by changing variables in the config.h header file.

My queries:

1. Can I use these object files and config.h file somehow to generate hex files?
I mean without using the source files in building.

This is because, I don't want to give the source files to my client except the object files and config.h file, so that client can load them in uvsion project & generate different hex files by changing the config.h file.

Regards,
Raj S.

Parents
  • Do you actually have "variables" defined in the include file, or #defines?

    If the latter you're going to have problems because the source compilation is dependent on them.

    Going to suggest you review the chapter of externalizing variables and abstraction, so you put the data you want the customer to see in one file you can provide them. Then review the chapter on object and library files, where you place all the compiled stuff you don't want the customer to see the source for into. You can then build a clean project by dropping in the objects/libraries you've previously created and adding the variable abstraction to it.

    Think of it like a the C library code, where you don't get source.

Reply
  • Do you actually have "variables" defined in the include file, or #defines?

    If the latter you're going to have problems because the source compilation is dependent on them.

    Going to suggest you review the chapter of externalizing variables and abstraction, so you put the data you want the customer to see in one file you can provide them. Then review the chapter on object and library files, where you place all the compiled stuff you don't want the customer to see the source for into. You can then build a clean project by dropping in the objects/libraries you've previously created and adding the variable abstraction to it.

    Think of it like a the C library code, where you don't get source.

Children