Open fred-r opened 3 years ago
clayer file STM32L562E-DK.zip
Hi Fred, please note that uVision CPRJ support is limited to ArmCompiler 5 and 6 only. We shall make this clear in the documentation and add proper error message for that. Sorry for the inconvenience.
Hi Joachim,
do you mean that we cannot have a cprj with multiple compilers support ? What I would like to do is to have one single cprj supporting AC6, IAR and GCC.
Then I may create a makefile with cbuildgen like: cbuildgen make ${PROJ_NAME}.cprj --toolchain=GCC --outdir=BUILD --intdir=BUILD cbuildgen make ${PROJ_NAME}.cprj --toolchain=ac6 --outdir=BUILD --intdir=BUILD
Or open the very same cprj with Keil uVision.
Do you mean that this will not be supported ? Keil uVision cannot just ignore the other compilers directives ?
Thanks & Regards, Fred
a) Today Keil uVision reads a cprj file and converts it to a uvprojx file. In addition uVision can export one project target into a cprj file which by definition is for a single toolchain. Therefore the information for other toolchains are lost during import. b) The cprj format's current design does support multiple toolchains within one cprj file however we don't have a tool that would maintain the settings in parallel. Note that "ignoring other compilers" get the projects easily out of sync.
One idea we are currently investigating is an approach where each CPRJ file only supports a single "configuration" meaning one toolchain but also one optimization setting (Debug vs. Release). These CPRJ files are then "orchestrated" using an umbrella description file. More advanced tools would be able to manage a consistency of a CPRJ files under one umbrella where as simple tools would leave the alignment between the "configurations" to the user / script etc.
Any other ideas are welcome as well.
Regards,
Joachim
Hi Joachim,
IMHO a valuable asset of the current CPRJ definition is the possibility to support multiple comilers and settings in the very same file. Creating one CPRJ per compiler and settings would lead to an "uncontrolled" increase in the number of files, leading to difficult maintenance (need to duplicate the common content and keep it in sync).
At first sight, I do not understand why Keil uVision cannot check the compiler information in the cflags and as/ld directives: <cflags .... compiler="GCC"/>
The piece of information we need is present. Would you mind elaborating a bit more on the rationale to remove the possibility to support multiple compilers and settings in the same CPRJ file ? This feature looks really interesting to me.
Thanks & Regards, Fred
Hi Fred, sorry for the lack of response on this. I see why you consider concurrent multi-compiler support as a strength of the format, especially when dealing with "generated" reference projects rather than maintaining a project throughout multiple release cycles supporting multiple compilers. What I am afraid of is setting people's expectation that the file format supports multiple concurrent compilers however once the file is loaded and modified by an IDE the stored project file will have either the compiler settings for all other compilers stripped off or running the risk of settings between tool-chains running out-of-sync. People may expect to have tools that maintains a cprj file with multiple compilers, which in my opinion isn't straight forward. The other problem we have been facing during our tests is that tool-chain specific config files often use the same filename which will result in build failures (e.g. startup assembly files). Regards, Joachim
Hi,
I am currently trying to add the GCC support in my target clayer:
but when I do this and open the generated cprj file with Keil microvision 5.32 I get these elements in the uvprojx:
This leads to compilation errors because it seems that the tool tries to use the GCC definitions:
compiling sample_status.c... ArmClang: error: unknown argument: '-fstack-usage' compiling main.c... ArmClang: error: unknown argument: '-fstack-usage'
Thanks & Regards, Fred