Hi Joseph,

 

Thanks for the hint regarding Python. I double-checked it, but it seems to be fine.

 

However, I still have issues with building the release 1.6.1. I figured it out that I need to install the 32-bit Strawberry Perl and with that CMake can find the Perl installation, but I get an error while configuring the project. You can find the full log below:

 

C:\Work\TF-M\trusted-firmware-m-TF-Mv1.6.1>cmake -G"Unix Makefiles" -S . -B build -DTFM_PLATFORM=nxp/lpcxpresso55s69 -DTFM_TOOLCHAIN_FILE=toolchain_IARARM.cmake -DCMAKE_BUILD_TYPE=Relwithdebinfo -DBL2=OFF

fatal: not a git repository (or any of the parent directories): .git

CMake Error at cmake/version.cmake:13 (string):

  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to

  command.

Call Stack (most recent call first):

  CMakeLists.txt:10 (include)

 

 

CMake Error at cmake/version.cmake:15 (string):

  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to

  command.

Call Stack (most recent call first):

  CMakeLists.txt:10 (include)

 

 

CMake Error at cmake/version.cmake:16 (string):

  string sub-command REGEX, mode MATCH needs at least 5 arguments total to

  command.

Call Stack (most recent call first):

  CMakeLists.txt:10 (include)

 

 

-- Populating tfm_test_repo

-- Configuring done

-- Generating done

-- Build files have been written to: C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/lib/ext/tfm_test_repo-subbuild

[ 11%] Creating directories for 'tfm_test_repo-populate'

[ 22%] Performing download step (git clone) for 'tfm_test_repo-populate'

Cloning into 'tfm_test_repo-src'...

remote: Enumerating objects: 2122, done.

remote: Counting objects: 100% (2122/2122), done.

remote: Compressing objects: 100% (1172/1172), done.

remote: Total 3873 (delta 1868), reused 959 (delta 950), pack-reused 1751

Receiving objects: 100% (3873/3873), 2.35 MiB | 1.66 MiB/s, done.

Resolving deltas: 100% (2715/2715), done.

HEAD is now at 723905d Test: Fix bug in BL1 TRNG testsuite

[ 33%] Performing update step for 'tfm_test_repo-populate'

[ 44%] No patch step for 'tfm_test_repo-populate'

[ 55%] No configure step for 'tfm_test_repo-populate'

[ 66%] No build step for 'tfm_test_repo-populate'

[ 77%] No install step for 'tfm_test_repo-populate'

[ 88%] No test step for 'tfm_test_repo-populate'

[100%] Completed 'tfm_test_repo-populate'

[100%] Built target tfm_test_repo-populate

CMake Warning at CMakeLists.txt:56 (project):

  VERSION keyword not followed by a value or was followed by a value that

  expanded to nothing.

 

 

-- The C compiler identification is IAR ARM 8.50.9

-- The ASM compiler identification is IAR ARM 8.50.9

-- Found assembler: C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/bin/iasmarm.exe

-- Found Git: C:/Users/pocsai-1/AppData/Local/Programs/Git/cmd/git.exe (found version "2.36.0.windows.1")

-- Populating mbedcrypto

-- Configuring done

-- Generating done

-- Build files have been written to: C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/lib/ext/mbedcrypto-subbuild

[ 11%] Creating directories for 'mbedcrypto-populate'

[ 22%] Performing download step (git clone) for 'mbedcrypto-populate'

Cloning into 'mbedcrypto-src'...

remote: Enumerating objects: 22978, done.

remote: Counting objects: 100% (22978/22978), done.

remote: Compressing objects: 100% (11490/11490), done.

remote: Total 22978 (delta 17960), reused 15329 (delta 11323), pack-reused 0

Receiving objects: 100% (22978/22978), 24.25 MiB | 2.13 MiB/s, done.

Resolving deltas: 100% (17960/17960), done.

HEAD is now at d65aeb37 Merge pull request #871 from ronald-cron-arm/mbedtls-3.1.0rc0-pr

[ 33%] Performing update step for 'mbedcrypto-populate'

[ 44%] Performing patch step for 'mbedcrypto-populate'

[ 55%] No configure step for 'mbedcrypto-populate'

[ 66%] No build step for 'mbedcrypto-populate'

[ 77%] No install step for 'mbedcrypto-populate'

[ 88%] No test step for 'mbedcrypto-populate'

[100%] Completed 'mbedcrypto-populate'

[100%] Built target mbedcrypto-populate

-- Found Python3: C:/Users/pocsai-1/AppData/Local/Programs/Python/Python310/python.exe (found version "3.10.5") found components: Interpreter

Start to generate partition files:

Generating Protected Storage Service in C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/generated/secure_fw/partitions/protected_storage

Generating TF-M Internal Trusted Storage Service in C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/generated/secure_fw/partitions/internal_trusted_storage

Generating TFM Crypto Service in C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/generated/secure_fw/partitions/crypto

Generating TFM Platform Service in C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/generated/secure_fw/partitions/platform

Generating TFM Initial Attestation Service in C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/generated/secure_fw/partitions/initial_attestation

Per-partition files done:

-- ---------- Display crypto configuration - start --------------

-- CRYPTO_RNG_MODULE_DISABLED is set to FALSE

-- CRYPTO_KEY_MODULE_DISABLED is set to FALSE

-- CRYPTO_AEAD_MODULE_DISABLED is set to FALSE

-- CRYPTO_MAC_MODULE_DISABLED is set to FALSE

-- CRYPTO_CIPHER_MODULE_DISABLED is set to FALSE

-- CRYPTO_HASH_MODULE_DISABLED is set to FALSE

-- CRYPTO_KEY_DERIVATION_MODULE_DISABLED is set to FALSE

-- CRYPTO_ASYM_SIGN_MODULE_DISABLED is set to FALSE

-- CRYPTO_ASYM_ENCRYPT_MODULE_DISABLED is set to FALSE

-- CRYPTO_ENGINE_BUF_SIZE is set to 0x2080

-- CRYPTO_CONC_OPER_NUM is set to 8

-- CRYPTO_IOVEC_BUFFER_SIZE is set to 5120

-- ---------- Display crypto configuration - stop ---------------

-- Found Perl: C:/Strawberry/perl/bin/perl.exe (found version "5.32.1")

-- ----------- Display storage configuration - start ------------

-- PS_CREATE_FLASH_LAYOUT is set to ON

-- PS_ENCRYPTION is set to ON

-- PS_RAM_FS is set to OFF

-- PS_ROLLBACK_PROTECTION is set to ON

-- PS_VALIDATE_METADATA_FROM_FLASH is set to ON

-- PS_MAX_ASSET_SIZE is set to 512

-- PS_NUM_ASSETS is set to 5

-- PS_CRYPTO_AEAD_ALG is set to PSA_ALG_GCM

-- ITS_CREATE_FLASH_LAYOUT is set to ON

-- ITS_RAM_FS is set to OFF

-- ITS_VALIDATE_METADATA_FROM_FLASH is set to ON

-- ITS_MAX_ASSET_SIZE is set to 512

-- ITS_NUM_ASSETS is set to 10

-- ITS_BUF_SIZE is not set (defaults to ITS_MAX_ASSET_SIZE)

-- ----------- Display storage configuration - stop -------------

-- Pulling MCUxpresso NXP SDK drivers from https://github.com/NXPmicro/mcux-sdk

-- Configuring incomplete, errors occurred!

See also "C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/CMakeFiles/CMakeOutput.log".

See also "C:/Work/TF-M/trusted-firmware-m-TF-Mv1.6.1/build/CMakeFiles/CMakeError.log".

 

Do you have any idea what could be wrong? I cannot find any useful information in CMakeError.log or CMakeOutput.log.

The step Pulling MCUxpresso NXP SDK drivers from https://github.com/NXPmicro/mcux-sdk is OK because the files are pulled from the NXP git repo. So, it must be somewhere in the configuration, but I have no idea where to look.

The last release that I could build successfully on Windows was 1.4.1. All newer releases than that have build issues on my Windows machine.

 

Thanks in advance.

Ildikó

 

From: Joseph Yiu <Joseph.Yiu@arm.com>
Sent: Friday, November 25, 2022 10:48 AM
To: Pocsai Ildiko LCPF-CH <Ildiko.Pocsai@mt.com>; Anton Komlev <Anton.Komlev@arm.com>; tf-m@lists.trustedfirmware.org
Subject: RE: EXTERNAL - Trusted Firmware M build error on Windows 10

 

Hi Ildikó,

 

You might have multiple versions of Python installed on your Windows machine.

In command shell, type

C:\> where python

You might see something like

C:\Program Files\Python37\python.exe

C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\python.exe

 

The TF-M build system might located the latest version of Python (e.g. 3.10), but when you run pip3 install -r tools\requirements.txt

It might install the modules in an older version (e.g. 3.7).

 

To make sure you are installing the Python tools to the right version of Python, you can specify which Python to use when running pip:

C:\>C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\python -m pip install -r tools\requirements.txt

 

Hope this solve the Python problem.

Regards,

Joseph

 

From: Pocsai Ildiko LCPF-CH via TF-M <tf-m@lists.trustedfirmware.org>
Sent: 24 November 2022 15:50
To: Anton Komlev <Anton.Komlev@arm.com>; tf-m@lists.trustedfirmware.org
Subject: [TF-M] Re: EXTERNAL - Trusted Firmware M build error on Windows 10

 

Hi Anton,

 

Just wanted to ask if there are any updates regarding the build failure on Windows with the IAR compiler. I tried to build the head version on Win x64 for NXP LPC55S69  using

 

IAR ANSI C/C++ Compiler V8.50.9.278/W32 for ARM

GNU Make 3.81

git version 2.36.0.windows.1

CMake 3.24.2

Python 3.10.5

 

but I still get some errors. They are though not the same as during my previous try:

 

[ 77%] Building C object secure_fw/CMakeFiles/tfm_s.dir/__/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/startup_lpcxpresso55s69.o

 

  extern typeof(__vector_table) __attribute__ ((alias ("__vector_table"))) __Vectors;

         ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",218  Error[Pe260]:

          explicit type is missing ("int" assumed)

 

  extern typeof(__vector_table) __attribute__ ((alias ("__vector_table"))) __Vectors;

                                ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",218  Error[Pe1113]:

          attributes are not permitted in a function definition

 

  extern typeof(__vector_table) __attribute__ ((alias ("__vector_table"))) __Vectors;

                                                                           ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",218  Error[Pe169]:

          expected a declaration

 

  void Reset_Handler(void)

       ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",228  Error[Pe099]:

          a declaration here must declare a parameter

 

  {

  ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",229  Error[Pe065]:

          expected a ";"

At end of source  Warning[Pe012]: parsing restarts here after previous syntax

          error

 

  extern typeof(__vector_table) __attribute__ ((alias ("__vector_table"))) __Vectors;

                ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",218  Warning[Pe1051]:

          standard requires that parameter "__vector_table" be given a type by

          a subsequent declaration ("int" assumed)

At end of source  Error[Pe130]: expected a "{"

At end of source  Error[Pe067]: expected a "}"

 

  extern typeof(__vector_table) __attribute__ ((alias ("__vector_table"))) __Vectors;

         ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",218  Error[Pe1154]:

          entity declared as alias cannot have definition

 

  extern typeof(__vector_table) __attribute__ ((alias ("__vector_table"))) __Vectors;

         ^

"C:\Work\TF-M\head\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",218  Error[Pe1153]:

          declaration does not match its alias variable "__vector_table @

          ".intvec""

make[2]: *** [secure_fw/CMakeFiles/tfm_s.dir/__/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/startup_lpcxpresso55s69.o] Error 2

make[1]: *** [secure_fw/CMakeFiles/tfm_s.dir/all] Error 2

make: *** [all] Error 2

 

Could you please tell if there is any plan to fix these errors in the near future?

 

Another question regarding the latest release 1.6.1: I tried to build this too using the setup mentioned above, but I get an error for missing Perl:

 

CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):

  Could NOT find Perl (missing: PERL_EXECUTABLE)

Call Stack (most recent call first):

  C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)

  C:/Program Files/CMake/share/cmake-3.24/Modules/FindPerl.cmake:84 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)

  build/lib/ext/mbedcrypto-src/library/CMakeLists.txt:115 (find_package)

 

I installed Straberry Perl on my machine and added it to PATH, but the error still persists.  I tried also to re-run pip3 install -r tools\requirements.txt but it says that all the requirements are up-to-date. What am I missing here?

 

Thanks in advance.

Ildikó

 

From: Anton Komlev <Anton.Komlev@arm.com>
Sent: Monday, October 31, 2022 2:11 PM
To: Pocsai Ildiko LCPF-CH <Ildiko.Pocsai@mt.com>; tf-m@lists.trustedfirmware.org
Subject: Re: EXTERNAL - Trusted Firmware M build error on Windows 10

 

Hi Ildiko,

 

Thanks for reporting. The same defect is reproducible on other platforms and possibly caused by some recent changes.

Let me update you here when fix be available.

 

Best regards,

Anton

 

From: Pocsai Ildiko LCPF-CH via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Monday, October 31, 2022 5:56 AM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Trusted Firmware M build error on Windows 10

 

Hello,

 

I’m trying to build the Trusted Firmware M on Win10 x64 for NXP LPC55S69 using the IAR compiler, but I get the following error:

 

[ 76%] Building C object secure_fw/CMakeFiles/tfm_s.dir/__/platform/ext/target/nxp/lpcxpresso55s69/Device/Source/startup_lpcxpresso55s69.o

 

  extern uint32_t __INITIAL_SP;

                  ^

"C:\Work\TF-M\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",29  Error[Pe007]:

          unrecognized token

 

  extern uint32_t __INITIAL_SP;

                  ^

"C:\Work\TF-M\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",29  Error[Pe065]:

          expected a ";"

 

  extern uint32_t __INITIAL_SP;

                  ^

"C:\Work\TF-M\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",29  Error[Pe007]:

          unrecognized token

 

  extern uint32_t __STACK_LIMIT;

                  ^

"C:\Work\TF-M\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",30  Error[Pe007]:

          unrecognized token

 

  extern uint32_t __STACK_LIMIT;

                  ^

"C:\Work\TF-M\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",30  Error[Pe065]:

          expected a ";"

 

  extern uint32_t __STACK_LIMIT;

                  ^

"C:\Work\TF-M\trusted-firmware-m\platform\ext\target\nxp\lpcxpresso55s69\Device\Source\startup_lpcxpresso55s69.c",30  Error[Pe007]:

          unrecognized token

 

    (VECTOR_TABLE_Type)(&__INITIAL_SP),            /*      Initial Stack Pointer */

 

In the attachment, you can find the full build log and also the CMake build file generation log.

 

Some details about my setup:

 

Win10 Enterprise x64. Version 20H2

IAR ANSI C/C++ Compiler V8.50.9.278/W32 for ARM

GNU Make 3.81

git version 2.36.0.windows.1

CMake 3.24.2

Python 3.10.5

 

I followed the steps from the Getting started guide here than the steps to build the framework for LPC55S69 here.

 

Do you have any idea what I’m missing?

 

In case you need any further information let me please know.

 

Thanks in advance.

 

Kind regards,

Ildikó Pocsai