Hi Antonio,

I don't have a lot of bandwidth to look at this today with the TF-M 1.2 code freeze tomorrow, and ongoing testing, but the params that get passed to TF-M for the build, which determines which build artifacts are present, are defined in a cmake function here: https://github.com/zephyrproject-rtos/trusted-firmware-m/blob/master/CMakeLists.txt

If you do get a new Zephyr sample working for the test code, any PRs to the main repo (there are two TF-M samples present already) or required changes to the TF-M module fork (such as updating the TF-M external project function entry above) are of course welcome.

I can hopefully dig into this more meaningfully in the next day or two, sorry.

Kevin

On Tue, 3 Nov 2020 at 15:35, Antonio Ken IANNILLO <antonioken.iannillo@uni.lu> wrote:
Hi Raef,
I agree with you, also reading the documentation https://ci.trustedfirmware.org/view/TF-M/job/tf-m-build-docs-nightly/lastStableBuild/artifact/trusted-firmware-m/build/install/doc/user_guide/html/docs/getting_started/tfm_integration_guide.html#how-to-integrate-another-os (even if it seems obsolete since some files are missing). For example, are now the static library for the test included in the one you mentioned?

I'm using the module offered by zephyr to build and import the tfm, but I get a lot of missing references.
Further, I searched in the install directory built by tfm and I cannot really find all of them.

--
Antonio Ken Iannillo

On 03/11/2020, 15:08, "Raef Coles" <Raef.Coles@arm.com> wrote:

    One of the things tfm produces is the NS api static library, which should be found in `interface/libpsa_api_ns.a`. There is also a ns platforms static lib in the same directory. I'm not sure how easy it is to pick these up from the zephyr buildsystem, but those should contain the symbols you want.

    Raef

    ________________________________________
    From: TF-M <tf-m-bounces@lists.trustedfirmware.org> on behalf of Antonio Ken IANNILLO via TF-M <tf-m@lists.trustedfirmware.org>
    Sent: 03 November 2020 11:45
    To: Kevin Townsend (kevin.townsend@linaro.org)
    Cc: tf-m@lists.trustedfirmware.org
    Subject: Re: [TF-M] Integrating a different RTOS in tf-m-test

    Hi Kevin,
    Thank you for your message.

    I’m trying to create a zephyr application copying the tfm-test non secure application (https://github.com/zephyrproject-rtos/trusted-firmware-m/blob/master/tf-m-tests/app/main_ns.c).

    The only thing that is not clear is how to include the tfm platform code (e.g., https://github.com/zephyrproject-rtos/trusted-firmware-m/blob/master/trusted-firmware-m/platform/ext/common/uart_stdout.c).
    I suppose as a static library from the zephyr tfm module but I cannot really find how.
    Can you point me to the right direction?
    Or do you have a different way to run the tfm-tests?

    Best,

    --
    Antonio Ken Iannillo

    From: Kevin Townsend <kevin.townsend@linaro.org>
    Date: Monday, 2 November 2020 at 13:08
    To: Antonio Ken IANNILLO <antonioken.iannillo@uni.lu>
    Cc: "tf-m@lists.trustedfirmware.org" <tf-m@lists.trustedfirmware.org>
    Subject: Re: [TF-M] Integrating a different RTOS in tf-m-test

    Hi Antonio,

    There is currently an issue filed in Zephyr to add a new sample application that will make it easy to run the PSA API tests via Zephyr, but it we're currently working on finalizing higher priority changes before the 1.2 code freeze later this week: https://github.com/zephyrproject-rtos/zephyr/issues/29476

    So, there isn't an 'easy' way to build these tests in Zephyr today out of the box using Zephyr as the RTOS on the NS side, unless you want to have a go at it yourself in the short term while we try to make sure Zephyr is ready for the changes in T-M 1.2.

    Best regards,
    Kevin

    On Mon, 2 Nov 2020 at 10:29, Antonio Ken IANNILLO via TF-M <tf-m@lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>> wrote:
    Hi all,
    I wanted to use some other RTOS in the NS side while testing tf-m.
    Is there a simple way to use the Zephyr kernel or FreeRTOS in the tf-m-test (-DTEST_S=ON, -DTEST_NS=ON) instead of the default RTX?

    Best,
    --
    Antonio Ken Iannillo
    Research Scientist – SEDAN group
    SnT – Interdisciplinary Centre for Security, Reliability and Trust

    UNIVERSITÉ DU LUXEMBOURG

    CAMPUS KIRCHBERG
    29, avenue John F. Kennedy
    L-1855 Luxembourg Kirchberg
    T +352 46 66 44 9660

    Join the conversation
    News<https://wwwen.uni.lu/snt/news_events> | Twitter<https://twitter.com/SnT_uni_lu> | Linkedin<https://www.linkedin.com/school/snt-lu/>
    www.uni.lu/snt<http://www.uni.lu/snt>
    --
    TF-M mailing list
    TF-M@lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
    https://lists.trustedfirmware.org/mailman/listinfo/tf-m