How to set up MPLABX to develop a combined LGPL and proparitary program?

Viewed 17

I'm developing a microcontroller program. It has some boring stuff, like handing a serial port, and some interesting stuff.

I would like to make the boring stuff open source under the LGPL2+ license, and the interesting stuff proprietary. I'm not a lawyer, but as far as I understand I need to do the following:

  1. Give the user of the program the source code of the boring stuff (the LGPL2+ parts.). This is easy, I can just zip it, or point to the github repository.
  2. Give the user of the program the means to recompile the boring stuff. This means pointing the end user to the free compiler I used.
  3. Give the end user the means of re-combining the open source stuff with the precompiled proprietary code.

This is the part I don't know. I imagine I have to make 2 projects in MPLABX, one with the proprietary code, and one with the LGPL2+ code. Then I would like to do the following:

  1. Compile the proprietary code into something that can be given to the user.
  2. Compile the LGPL2+ code.
  3. Combine the object code from B and C into a file the micro controller understands.
  4. Program the micro controller with the file from step C.
  5. Bonus points if the open source parts can be debugged without having the source of the proprietary parts.

I use MPLAB-X and a PIC18F microcontroller. I know how to make a program with one sourcetree, but I'm new with (dynamic) linking, and managing multiple projects that get recompiled automatically when needed.

Where can I find an example of something like this?

0 Answers
Related