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:
- 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.
- 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.
- 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:
- Compile the proprietary code into something that can be given to the user.
- Compile the LGPL2+ code.
- Combine the object code from B and C into a file the micro controller understands.
- Program the micro controller with the file from step C.
- 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?