We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
This relates to uVision 4 v4.21.0.0 .
We have a project that requires two targets, "Dev" and "Production" because the dev board is slightly different from the final production board. The plan was to have a top level directory which contains the common code, then a sub direct for Dev and sub directory for Production with the source specfic to those:
Project/ -Dev/ - a.c - b.c -Production/ - a.c - b.c - common_file1.c - common_file2.c
In uVision I have "Dev" and "Production" targets. In Dev target I have "Source" group which contains source from "Project/Dev/" and Production target I have "Source" group which contains source from "Project/Production". And both targets use the common source files in Project/.
However, although the uvproj file contains the correct XML, uVision4 does not treat the source files with in target serparately, I don't quite know what it's doing. If I remove a file from one target, it gets removed in both . Same with editing.
Is there is fix for this? Or an alternative (other than create two separate projects)?
Thanks
I think there will be issues with object files etc when they have same file name - uv isn't fully supporting paths.
I recommend that you change to:
Project/ -hwrev1/ - hwrev1_a.c - hwrev1_b.c -hwrev2/ - hwrev2_a.c - hwrev2_b.c - common_file1.c - common_file2.c
Now it's possible to build both targets without having multiple c files that would result in colliding object file names.