Share source code between projects.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Given two projects, one using UART, the other using SPI.

   

80% of the C programming for these projects is identical, the remaining code is dependent on the communication means.

   

What is best practice for maintaining the common code in one place and sharing it between the projects?

   

Thanks!

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

When you are able to structure your common code into modules, you can set them up as components and use them in your two projects. Or you put them into one directory and use hard links (with junction.exe) to link into your projects.

View solution in original post

0 Likes
1 Reply
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

When you are able to structure your common code into modules, you can set them up as components and use them in your two projects. Or you put them into one directory and use hard links (with junction.exe) to link into your projects.

0 Likes