Hi,

 

Dear team, please consider adopting LazyFetch [1]. Features:

 

For an example how it is used see here: qcbor [2] and it’s initial cache file [3].

 

Moreover, we might consider creating a tf.org specific “cmake library”. This would contain scripts and would help sharing cmake code between tf.org projects. All external components in TS would be a good candidate, but some scripts form the tf-a cmake repo are worth being considered too.

 

[1]: https://git.trustedfirmware.org/TS/trusted-services.git/tree/tools/cmake/common/LazyFetch.cmake?h=integration

[2]: https://git.trustedfirmware.org/TS/trusted-services.git/tree/external/qcbor/qcbor.cmake?h=integration

[3]: https://git.trustedfirmware.org/TS/trusted-services.git/tree/external/qcbor/qcbor-init-cache.cmake.in?h=integration

 

From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.org>
Sent: 12 April 2022 13:19
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Library fetching improvements

 

Hi,

Recently I have been adding some new libraries to my TFM project and what I always end up doing is: go to some existing file which fetches the library, copy code from there, paste it to my file, change few links, versions and names.

 

It is a bit annoying to copy-paste that code each time, also it is hard to maintain (if pattern for fetching libraries changes) and also copy pasting might lead to some code not being updated.

 

My proposal is to have a function that can be used to fetch a library.

This way it will be easier to add new libraries and this change will make code cleaner.

 

Please let me know your thoughts on this proposal.

 

Regards

Bohdan Hunko

 

Cypress Semiconductor Ukraine

Engineer

CSUKR CSS ICW SW FW

Mobile: +38099 50 19 714
Bohdan.Hunko@infineon.com