Update build system to support latest cmake version.
Closed, ResolvedPublic

Description

Currently the build system only supports cmake version 3.7. This is a problem because:

  • 3.7 is an old version and this makes life of Linux and OSX users harder.
      • Linux distros come with newer versions put into the package repositories:
        • Ubuntu 18.04: 3.10
        • Ubuntu 18.10: 3.12
        • Ubuntu devel: 3.13
      • Zephyr uses chocolatey on windows which has v3.13.3
      • OSX homebrew seems to have 3.13
    • 3.7 uses an outdated version of "response file" support. This makes fixing T95 problematic.

As a result of the above the build system shall be updated to support cmake 3.10->3.13.

After extensive testing no blocking issues could be identified and this effort turned to be a documentation update. See https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/661/
All mentioned cmake versions work fine win the build-system..

Hi Gyuri,
I saw the document update patch, but cmake 3.10 still fails in my side. Which means the document is updated first before cmake change?
Thanks.

Hi,

In my test environment I could not re-create any failure. Can you please provide more details about your case?

/George

Hi,
I am using ARMCLANG build on AN521, with latest master branch:

https://git.trustedfirmware.org/trusted-firmware-m.git/commit/?h=refs/heads/master&id=807fedbb8070b6d735e1c9e2103e6c1ea632fe8c

Sources cloned at:

c:/Users/username/git/tfm-internal/

Cmake version:

$ cmake --version
cmake version 3.12.4

Build command (in DS5):

cmd /C cmake -E remove_directory build & cmake -E make_directory build & cd build & cmake -G"Unix Makefiles" -DPROJ_CONFIG=c:/Users/username/git/tfm-internal/ConfigCoreIPC.cmake -DCMAKE_BUILD_TYPE=Debug -DTARGET_PLATFORM=AN521 -DCOMPILER=ARMCLANG ../
cmake --build ./build -- install

Remember to use ConfigCoreIPC.cmake

Hi,

and what error do you get?

/George

Fatal error: L6002U: Could not open file @CMakeFiles/tfm_s.dir/objects1.rsp: No such file or directory
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
make.exe[2]: *** [app/secure_fw/CMakeFiles/tfm_s.dir/build.make:167: app/secure_fw/tfm_s.axf] Error 1
make.exe[1]: *** [CMakeFiles/Makefile2:252: app/secure_fw/CMakeFiles/tfm_s.dir/all] Error 2
make.exe: *** [Makefile:118: all] Error 2

The response file problem is another ticket. See https://developer.trustedfirmware.org/T95

Does it mean that patches mentioned in T95 could be merged?

No. T95 needs deeper investigation to check what cmake version the fix supports and if all aspects are addressed. Response files not only affect the linker but the archiver too.
There was an important bugfix for response file handling merged into cmake 3.9 so we might need to drop support for anything below 3.10.

gyuri-szing closed this task as Resolved.Apr 3 2019, 2:18 PM

Turned to be a documentation update task. Fixed in https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/661/ .