Open jeromecoutant opened 3 years ago
Yes, multiple cprj files, 1 per target.
uVision does create
no, I don't want to merge any files. I have 1 cprj per target, so 1 uvprojx per target. Issue is that all uvprojx have the same "Target 1", so this create issue while building each project.
Hi Jerome, the are possible solutions to that problem; however we should first understand what you want to achieve. Could you explain a bit better the use case?
Solutions that I can think of:
However, since *.cprj should work across a range of IDEs none of that solutions is a perfect fit.
Reinhard
We vote for
additional XML element/attribute in the *.cprj file that specifies a target name
!
Could you explain a bit the use case that you envision. Normally, one project per directory is what we aim for. Even when you have multiple projects in the same directory, there is typically no need to translate all of them. But you may have a reasons that we have not considered. Could you explain that a bit?
Thanks
@tarek-bochkati please comment
@ReinhardKeil @jeromecoutant back to this topic I hadn't noticed before. From a user perspective, "target 1 " is not meaningful and does not look so good in the project tree.
One proposal to discuss: in case the cprj contains target information like <target Bname="STM32L562E-DK" ... Couldn't this board name be used as the "default" configuration target instead of "target 1" ?
When exporting to cprj into file.target.cprj, the name would also include the board name which can be quite useful when handling many different cprj files, whether they are in different folders or not.
Laurent, I would like to point out that we have a bit of a name clash here. For historic reasons uVision has the concept of "Project Targets" (Visual Studio calls it "Configuration"). The 'Project Target' is not related to the UV4 -ep MyProject.uvprojx
Assuming MyProject has the project targets Release and Debug uVision will create the following cprj files:
MyProject.Debug.cprj
MyProject.Release.cprj
Since uVision is unable to merge to cprj files into a uvprojx file after importing the above cprj files we will have
MyProject.Debug.uvprojx
MyProject.Release.uvprojx
both projects use the project target name "Target 1".
For consistency with the export we should interpret .Debug and .Release as target name.
During export we would not append the project target name if it is already present.
Looking at the uVision example you ship with the STM32Cube FW Libraries today, it seems like you are putting quite some information there e.g.:
STM32H7A3ZIQ_Nucleo_FreeRTOS_LowPower, however the project filename is simply: Project.uvprojx
In order to avoid overly lengthy file names and target names that no longer fit into the displayed space I think it would be useful to choose directory, filename and target name with consideration.
@jkrech ok thanks for the background explanation.
I guess we're left with the optional configuration inside the cprj file name indeed.
Opening a cprj file with uvision always make a project for "Target 1"
So if you have several cprj files in the same directory, this will create some problems.
@tarek-bochkati @fred-r