Hi,
I need to release a firmware to a customer, and he must be allowed
to modify one of the source files (writen in C).
I don't want to give him the whole code, but I would like to give
him a (unknown format) file + the user modificable routine.
Anyone can give me a pointer on how to accomplish this?
Scroll down to "Using existing assembly language modules" and there
are nice details about getting old ASM libraries to work with SDCC.
You can use the exact same concept to pre-compile your "protected"
routines. Just link to the compiled code in the command line.
I'm sure similar things are possible on other C compilers.
Matt Bauman
On Mar 9, 2007, at 1:18 PM, Mauricio Jancic wrote:
> Hi,
> I need to release a firmware to a customer, and he must be allowed
> to modify one of the source files (writen in C).
> I don't want to give him the whole code, but I would like to give
> him a (unknown format) file + the user modificable routine.
> Anyone can give me a pointer on how to accomplish this?
>
> Regards,
>
> Mauricio Jancic
> Janso Desarrollos
> Microchip Certified Consultant
> http://www.janso.com.ar
> .....infoKILLspam@spam@janso.com.ar
> (54) 11-4502-2983
>
>
On 3/9/07, Mauricio Jancic <infoKILLspamjanso.com.ar> wrote:
> Hi,
> I need to release a firmware to a customer, and he must be allowed
> to modify one of the source files (writen in C).
> I don't want to give him the whole code, but I would like to give
> him a (unknown format) file + the user modificable routine.
> Anyone can give me a pointer on how to accomplish this?
>
> Regards,
>
> Mauricio Jancic
> Janso Desarrollos
> Microchip Certified Consultant
> http://www.janso.com.ar
> .....infoKILLspam.....janso.com.ar
> (54) 11-4502-2983
>
I believe the standard way to accomplish this is to compile the files
that you don't want to release and send him the object files, along
with the sources of what you do want him to see. That way he can
compile the sources and link them together with the object file, to
produce a binary.
- Marcel
Hi,
> I need to release a firmware to a customer, and he must be allowed
> to modify one of the source files (writen in C).
> I don't want to give him the whole code, but I would like to give
> him a (unknown format) file + the user modificable routine.
> Anyone can give me a pointer on how to accomplish this?
you could give them the object files the compiler generates and the linker uses. This will obscure things somewhat but there will still be lots of information like procedure names and global variable names in there as theese are needed for linking.
I don't see how you are going to get much better than that, you could pre-obscure theese things out of the code to some extent but whatever you do you will leave some clues.
Could you possibly compile all source files except the one that the
customer is to modify and save it as a library file possibly. Then
when the customer modifies the single source file you send him, he can
compile
The whole thing by using the source file he recently modified plus the
rest of the application you provided him
As a library file.
Just a thought. I don't know if this is too much trouble for the
customer or not, but I believe it would work.
> Hi,
>
>> I need to release a firmware to a customer, and he must be allowed
>>to modify one of the source files (writen in C).
>> I don't want to give him the whole code, but I would like to give
>>him a (unknown format) file + the user modificable routine.
>> Anyone can give me a pointer on how to accomplish this?
>
> you could give them the object files the compiler generates and the linker uses. This will obscure things somewhat but there will still be lots of information like procedure names and global variable names in there as theese are needed for linking.
Yes, that is a problem with the 'object' or 'library' method.
> I don't see how you are going to get much better than that, you could pre-obscure theese things out of the code to some extent but whatever you do you will leave some clues.
Easy.
Supply only the HEX file, with the 'user firmware' portion having fixed entry points,
like the old CPM O/S had for I/O operations. The fixed 'jump table' would link to wherever
the usre routines ended up.
Any calls the user has to make are to static and predefined jump table in the main code,
and all entries to the user code are also static and predefined.
Then the user just has to concantenate your hex file plus his to get a working image.
On Fri, 2007-03-09 at 16:18 -0300, Mauricio Jancic wrote:
> Hi,
> I need to release a firmware to a customer, and he must be allowed
> to modify one of the source files (writen in C).
> I don't want to give him the whole code, but I would like to give
> him a (unknown format) file + the user modificable routine.
> Anyone can give me a pointer on how to accomplish this?
How you do this depends on the compiler you are using, but I'd supply
the customer with the .o files (object files). The customer then
compiles their .c file to .o, and then links it all together with the
linker.
Never done this with PICs, but with PC programs this sort of thing was
very easy to do.
The last time I paid for source and did not get it was the last time I dealt
with that vendor.
I recommend you comply with the original agreement if you expect more
business.
John Ferrell W8CCW
"My Competition is not my enemy" http://DixieNC.US
----- Original Message -----
From: "Mauricio Jancic" <infospam_OUTjanso.com.ar>
To: "'Microcontroller discussion list - Public.'" <@spam@piclistKILLspammit.edu>
Sent: Friday, March 09, 2007 2:18 PM
Subject: [PIC] Protecting firmware intellectual property
> Hi,
> I need to release a firmware to a customer, and he must be allowed
> to modify one of the source files (writen in C).
> I don't want to give him the whole code, but I would like to give
> him a (unknown format) file + the user modificable routine.
> Anyone can give me a pointer on how to accomplish this?
>
> Regards,
>
> Mauricio Jancic
> Janso Desarrollos
> Microchip Certified Consultant
> http://www.janso.com.ar
> KILLspaminfoKILLspamjanso.com.ar
> (54) 11-4502-2983
>
>
JA! What makes you supose that I the customer did not agree to that?
Realy, I'm a bit offended by you insinuation. This particular project is a
PLC with modular boards. There is an input board, and output boar, and a
mother board. Of course, you can add as many I/O as you like.
The code of the Motherboard has a C module that he would like to modify.
HE ALREADY HAS DE SOURCE and he wanted to know how can he give the project
to other company to make some specific programming, but without releasing
the MB source code.
No offense intended!
If you have met your original agreement and now he wants more that sounds
like time for another agreement including compensation.
In my case a vendor wanted to squeeze more from me by witholding CAD Source
that I had paid for. My business plan was to do my own updates from the
original code. He felt he had me under control because of production
deadlines..
I learned more graphics than I wanted, but I survived.
John Ferrell W8CCW
"My Competition is not my enemy" http://DixieNC.US
> JA! What makes you supose that I the customer did not agree to that?
> Realy, I'm a bit offended by you insinuation. This particular project is a
> PLC with modular boards. There is an input board, and output boar, and a
> mother board. Of course, you can add as many I/O as you like.
>
> The code of the Motherboard has a C module that he would like to modify.
>
> HE ALREADY HAS DE SOURCE and he wanted to know how can he give the project
> to other company to make some specific programming, but without releasing
> the MB source code.
>
> Get it?
>
> Mauricio Jancic
> Janso Desarrollos
> Microchip Certified Consultant
> http://www.janso.com.ar
> infoEraseME.....janso.com.ar
> (54) 11-4502-2983
>
>
> In my case a vendor wanted to squeeze more from me by witholding CAD Source
> that I had paid for. My business plan was to do my own updates from the
> original code. He felt he had me under control because of production
> deadlines..
>
> I learned more graphics than I wanted, but I survived.
I understand your feeling. People here are very capable that spent a
lot of time keeping updated, and therefore cannot understand why people
want to resort to funny tricks to make money.
Lately I got hit twice, and pull my plugs as soon as I can. The one
that uses deadlines to take advantage of me was easier to handle after I
listed down the damages that he had caused - overtime charges, rework,
etc. As I am still keeping my options open, he is therefore always
living in fear now. No, I am not trying to be cruel but just trying to
keep him away and an option to chase him away if he try to disturb my
future work.