[buildmgr] propagate target options to CMakeLists.txt
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati push tarek-bochkati/devtools
commit sha: 51afed7490a398803c0fe6ef8b003e91b11327ad
push time in 2 days agotarek-bochkati push tarek-bochkati/devtools
commit sha: d8322f0ba1a21c2e41ca8ff432f8001cbfb646d2
push time in 2 days agotarek-bochkati push tarek-bochkati/devtools
commit sha: 9d9765ede7e47a4a1020b8c30ad13af6faa8f572
push time in 2 days agotarek-bochkati push tarek-bochkati/devtools
commit sha: 05f0395a6046eed05c2ec0a2c2386ed004ee9403
push time in 2 days agotarek-bochkati push tarek-bochkati/devtools
commit sha: 4a61c0d814dc50606e8161f4ab9efb4bc7d76cd1
push time in 2 days agotarek-bochkati push tarek-bochkati/devtools
commit sha: 2ef806bf6bd95bc5528bedbd9f534614400e386d
push time in 2 days agotarek-bochkati issue comment Open-CMSIS-Pack/devtools
Our cproject.yml files started with:
project:
optimize: size # Code optimization: emphasis code size
debug: on # Enable debug symbols
I would expect some -O3 and -g options in cflags of generated cprj files, but I couldn't see them...
Thx
@jeromecoutant i'm currently working on this Please check #328
tarek-bochkati issue comment Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
@brondani could you please give some hints on how to fix the buildmgr-cov ?
tarek-bochkati push tarek-bochkati/devtools
commit sha: a8a5ea48a589dedae0f9a043d4017892f08767d4
push time in 2 days agotarek-bochkati merge to Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati wants to merge Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
done, please check the new tools/projmgr/test/data/TestSolution/test.target_options.cproject.yml
tarek-bochkati merge to Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati wants to merge Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
I have changed all options names as following OPT_DEBUG, OPT_WARNINGS, OPT_OPTIMIZE
tarek-bochkati wants to merge Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
I added a comment there as suggested
tarek-bochkati merge to Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati issue comment Open-CMSIS-Pack/devtools
Discussion initiated if https://github.com/Open-CMSIS-Pack/devtools/issues/120
https://github.com/Open-CMSIS-Pack/devtools/issues/120#issuecomment-1050612457 https://github.com/Open-CMSIS-Pack/devtools/issues/120#issuecomment-1050634268 https://github.com/Open-CMSIS-Pack/devtools/issues/120#issuecomment-1055457730
Sounds good to me to get dedicated issue to comment / amend on.
Discussion is about following yml schema contributions: https://github.com/Open-CMSIS-Pack/devtools/blob/main/tools/projmgr/schemas/common.schema.json
"OptimizeType": { "enum": [ "max", "size", "speed", "debug" ], "description": "Generic optimize levels (max, size, speed, debug) for code generation." }, "DebugType": { "enum": [ "on", "off" ], "description": "Generic control for the generation of debug information (on, off)." }, "WarningsType": { "enum": [ "no", "all", "Misra", "AC5-like" ], "description": "Control warnings (no, all, Misra, AC5-like)." },
after the translation controls options addition (ie. optimize, debug, warnings),
I have started supporting them into projmgr
and buildmgr
while doing that I had some notes which I need to share with you:
WarningsType
enum AC5-like
is only valid for AC6 compiler,
thus I suggest either to remove it from the standart or add a mention in the documentation saying it's for AC6 onlyOptimizeType
debug
means the lowed optimization possible + plus adding more debug info into the generate ELF file.
thus I'm wondering if it is worth replacing it by none
and we can use the debug options to add debug information
if optimize=none
if debug=on
use -Og
else
use -O0
endif
endif
max
is not clear for me:
-Omin
(minimal size) or -Omax
(best performance)Cross-Module Optimization
?
and the same question as for AC6, is it using -Ospace -O3
or -Otime -O3
-Omax
optimization,
but it does have max performance aka -Ohs --no_size_constraints
max
optimization targets size or performance ?debug
, size
, speed
and max
Comparing these values against to possible compilers optimization options,
I'm wondering if it is worth adding low
, medium
and high
values mirroring respectively -O1
, -O2
and -O3
tarek-bochkati push tarek-bochkati/devtools
commit sha: c96a2dfae745e013ff621fc5d95e4e4e2f5cc32c
push time in 2 days agotarek-bochkati issue comment Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
@brondani there was a bug on tools/projmgr/schemas/common.schema.json
related to WarningsType
I will come back with another fix for codecov
tarek-bochkati push tarek-bochkati/devtools
commit sha: 0a7499434acee17a54d553c1b9175b7531ddbd89
push time in 3 days agotarek-bochkati issue comment Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
@brondani I have added more commits to propagate the options to CMakeLists.txt now I working on supporting these options on IAR.cmake
tarek-bochkati wants to merge Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
then for the time being let's keep this as is without overriding as you suggested, let's move this discussion to #179
tarek-bochkati merge to Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati push tarek-bochkati/devtools
commit sha: 5999e306ef52864fae9a62503d8aee3da5020df3
push time in 1 week agotarek-bochkati wants to merge Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
@brondani I'm wondering if this is the correct build type container ? I have been thinking about the case when there is options like "optimize" in the csolution and not in the cproject IMO this should be propagated here as well. even more, if optimize is specified in both csolution (optimize: size) and cproject(optimize: speed), then I think "speed" should override "size" optimization
tarek-bochkati merge to Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati wants to merge Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
@brondani I have added a test that I expect it to cover this code chunk.
tarek-bochkati merge to Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
tarek-bochkati push tarek-bochkati/devtools
commit sha: 6b0ae6142c848c735f5f2303cd9202efc8d39b20
push time in 1 week agotarek-bochkati issue comment Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
@brondani we still have to propagate this to CMakeLists.txt and manage it in
tarek-bochkati pull request Open-CMSIS-Pack/devtools
Contributed by STMicroelectronics Signed-off-by: Tarek BOCHKATI [email protected]
[buildmgr] support translate ctrls options with IAR
Signed-off-by: Tarek BOCHKATI [email protected]