Hi everyone,

 

So after some investigation the problem is fixed.

Turns out PSA arch tests use native platform compiler (e.g. GCC for windows) to compile some generated files and then these compiled files are used in the rest of the build using compiler for arm platform.

<psa-arch-tests>/api-tests/CMakeLists.txt adds External project (ExternalProject_Add()) which generates the device database that is needed for the rest of the build.

 

I have installed llvm-mingw and added its bin folder to PATH and this fixed the problem. I think GCC for windows (or other native compilers) will also work.

 

Build works on Linux because Linux comes with GCC preinstalled.

Also, I believe, David’s build environment have some sort of native compiler available in PATH so build worked for him.

 

I think this is something that should be added to “Set up build environments” build instruction, right?

 

Tanks all for the help.

 

Regards,

Bohdan Hunko

 

Cypress Semiconductor Ukraine

Engineer

CSUKR CSS ICW SW FW

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

 

From: David Hu <David.Hu@arm.com>
Sent: Thursday, 9 June 2022 12:41
To: Anton Komlev <Anton.Komlev@arm.com>; Hunko Bohdan (CSUKR CSS ICW SW FW) <Bohdan.Hunko@infineon.com>; Nicolas Devillard <Nicolas.Devillard@arm.com>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: RE: PSA arch test problem

 

Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safe.

 

Hi Bohdan,

 

It looks like PSA api test root CMakeLists.txt threw out this error.

Can you please raise this issue to PSA arch test project?

 

Best regards,

Hu Ziji

 

From: Anton Komlev <Anton.Komlev@arm.com>
Sent: Thursday, June 9, 2022 12:11 AM
To: Bohdan.Hunko@infineon.com; David Hu <David.Hu@arm.com>; Nicolas Devillard <Nicolas.Devillard@arm.com>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: RE: PSA arch test problem

 

Hi,

 

Had no time to investigate the logs but I am using

arm-none-eabi-gcc.exe (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)

 

Cheers,

Anton

 

From: Bohdan.Hunko@infineon.com <Bohdan.Hunko@infineon.com>
Sent: Wednesday, June 8, 2022 4:38 PM
To: Anton Komlev <Anton.Komlev@arm.com>; David Hu <David.Hu@arm.com>; Nicolas Devillard <Nicolas.Devillard@arm.com>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: RE: PSA arch test problem

 

Hi everyone,

 

Here is a build log.

I don’t believe that this is a problem with path length because CMake gives a warning when path exceeds the limit, and warning is not present in my logs.

 

Also I have added the CMakeError.log, hope it helps.

From CMakeError.log it looks like error may be caused by GCC difference.

Could you please say which version of GCC you were using?

 

Thanks!

 

Regards,

Bohdan Hunko

 

Cypress Semiconductor Ukraine

Engineer

CSUKR CSS ICW SW FW

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

 

From: Anton Komlev <Anton.Komlev@arm.com>
Sent: Wednesday, 8 June 2022 12:54
To: David Hu <David.Hu@arm.com>; Nicolas Devillard <Nicolas.Devillard@arm.com>; Hunko Bohdan (CSUKR CSS ICW SW FW) <Bohdan.Hunko@infineon.com>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: RE: PSA arch test problem

 

Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safe.

 

Hi Bohdan,

  1. I was able to build your configuration successfully.
    Suppose it might be the known problem with a command line path size in Windows. My path is C:\projects\trusted-firmware-m\
    Please share your log as David suggested.
  2. IAR toolchain was supported by Thomas Törnblom thomas.tornblom@iar.com, who got retired recently.
    Hope the new supporter will pickup your question here and reply.

Hope that helps,

Anton

 

From: David Hu via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Wednesday, June 8, 2022 10:31 AM
To: Nicolas Devillard <Nicolas.Devillard@arm.com>; Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: [TF-M] Re: PSA arch test problem

 

Hi Bohdan,

 

Do you mind sharing the failed build log with GNU toolchain on Windows?

 

Best regards,

Hu Ziji

 

From: Nicolas Devillard via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Tuesday, June 7, 2022 11:22 PM
To: Bohdan.Hunko@infineon.com; tf-m@lists.trustedfirmware.org
Subject: [TF-M] Re: PSA arch test problem

 

Hello Bohdan,

 

May I suggest you raise those questions directly on the github repo for those tests?

https://github.com/ARM-software/psa-arch-tests

 

To answer your second question, the team let me know that only GCC and ArmCLANG are supported for now, with no current plans to support the IAR compiler.

 

Hope that helps!

Regards

Nicolas

 

From: Bohdan.Hunko--- via TF-M <tf-m@lists.trustedfirmware.org>
Date: Tuesday, 7 June 2022 at 16:39
To: tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.org>
Subject: [TF-M] PSA arch test problem

Hi,

 

Lately I have been working with PSA arch tests and found few issues with them:

 

1)      PSA arch tests build on Windows fails. I am using the following command:
cmake -S . -B build_gcc_psoc64 -G"Unix Makefiles" -DTFM_PLATFORM=cypress/psoc64 -DTEST_PSA_API=INITIAL_ATTESTATION
This is true for all the compilers and build types. I have also tried building Musca B1 and the results are the same.
Is this expected behavior? Are PSA arch test meant to be built on windows?

2)      I have tried building PSA arch tests with IAR on both Linux and Windows and it does not work.
From quick investigation it looks like IAR is not supported.
Am I right? And if so the is there a plan to support PSA arch tests for IAR compiler?

 

Regards,

Bohdan Hunko

 

Cypress Semiconductor Ukraine

Engineer

CSUKR CSS ICW SW FW

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