Hi,

 

Can you please run the build with “cmake –build ./ -- install VERBOSE=1”. This will show compiler command lines which could help.
Based on the fact your assembler is complaining not understanding assembly instructions generated by the C compiler, I suspect your compiler is not supported. For “arm-none-eabi-cc -v”  I get the following output:


…….
gcc version 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512] (GNU Tools for ARM Embedded Processors 6-2017-q1-update)

(Note I removed some not so interesting lines.) As you can see, the version string includes the release name of “6-2017-q1-update”. All gcc binaries built by arm shall have this. Please double check what compiler you are using.
The last bullet point in the blue “notes” section here: https://ci.trustedfirmware.org/job/tf-m-build-test-nightly/lastSuccessfulBuild/artifact/build-docs/tf-m_documents/install/doc/user_guide/html/docs/user_guides/tfm_sw_requirement.html#supported-c-compilers has the link to the download site and also names the releases you can use.

/George

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Shawn Shan via TF-M
Sent: 04 June 2020 10:21
To: Quach, Brian <brian@ti.com>; tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: Re: [TF-M] build error

 

Hi Brian,

 

I would like to correct my last Email:

Please refer to the "build instructions" link for the detail: https://ci.trustedfirmware.org/job/tf-m-build-test-nightly/lastSuccessfulBuild/artifact/build-docs/tf-m_documents/install/doc/user_guide/html/docs/user_guides/tfm_build_instruction.html.

 

I have tried to reproduce your issue on my side but failed. So please try it again after changing the code version.

Besides this, you can also check whether your build environment follows the TF-M user guides: https://ci.trustedfirmware.org/job/tf-m-build-test-nightly/lastSuccessfulBuild/artifact/build-docs/tf-m_documents/install/doc/user_guide/html/docs/user_guides/index.html.

Please connect us again if you met any problems.

 

Thanks,

Shawn

 

From: Quach, Brian <brian@ti.com>
Sent: Wednesday, June 3, 2020 3:09 AM
To: Shawn Shan <Shawn.Shan@arm.com>
Cc: nd <nd@arm.com>
Subject: RE: build error

 

Hi Shawn,

 

Yes, I emptied the cmake_build directory.

 

I tried a fresh clone of the tags you specified but still get the same error.  I’m using GNU Arm version mentioned in the TF-M user guide (v6.3.1)

 

gcc version 6.3.1 20170620 (15:6.3.1+svn253039-1build1)

 

a0270932@LT74BFJR2 MINGW64 /c/Gits/tfm/trusted-firmware-m (master)

$ git log

commit b157dca40dcf2051a0420cb16d659a6aa69335d7 (HEAD -> master, origin/master, origin/HEAD)

 

a0270932@LT74BFJR2 MINGW64 /c/Gits/tfm/mbed-crypto ((mbedcrypto-3.0.1))

$ git log

commit 1146b4e06011b69a6437e6b728f2af043a06ec19 (HEAD, tag: mbedcrypto-3.0.1)

 

a0270932@LT74BFJR2 MINGW64 /c/Gits/tfm/mbedtls ((mbedtls-2.7.9))

$ git log

commit 3187e7ca986fe199313343b0c810e41b543ef78a (HEAD, tag: mbedtls-2.7.9)

 

a0270932@LT74BFJR2 MINGW64 /c/Gits/tfm/CMSIS_5 (Branch_5.2.0)

$ git log

commit 80cc44bba16cb4c8f495b7aa9709d41ac50e9529 (HEAD -> Branch_5.2.0, tag: 5.2.0)

 

 

Scanning dependencies of target tfm_s_pp_image_macros_to_preprocess_s_1

[  0%] Preprocess the /mnt/c/Gits/tfm/trusted-firmware-m/cmake_build/image_macros_to_preprocess_s.c file

[  0%] Built target tfm_s_pp_image_macros_to_preprocess_s_1

Scanning dependencies of target tfm_s_pp_tfm_common_s_1

[  0%] Preprocess the /mnt/c/Gits/tfm/trusted-firmware-m/platform/ext/common/gcc/tfm_common_s.ld file

[  0%] Built target tfm_s_pp_tfm_common_s_1

Scanning dependencies of target tfm_s_obj_lib

[  1%] Building C object secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_api.o

[  1%] Building C object secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_func.o

/tmp/ccmASnGm.s: Assembler messages:

/tmp/ccmASnGm.s:47: Error: syntax error -- `msr psplim,r3'

secure_fw/CMakeFiles/tfm_s_obj_lib.dir/build.make:86: recipe for target 'secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_func.o' failed

make[2]: *** [secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_func.o] Error 1

CMakeFiles/Makefile2:189: recipe for target 'secure_fw/CMakeFiles/tfm_s_obj_lib.dir/all' failed

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

Makefile:129: recipe for target 'all' failed

make: *** [all] Error 2

 

Regards,

Brian

 

From: TF-M [mailto:tf-m-bounces@lists.trustedfirmware.org] On Behalf Of Shawn Shan via TF-M
Sent: Monday, June 01, 2020 10:27 PM
To: tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: [EXTERNAL] Re: [TF-M] build error

 

Hi Brian,

 

Did you empty the build directory before you build?  And this is the recommended commit id for each of the repositories:

 

Mbed-crypto: 1146b4e06011b69a6437e6b728f2af043a06ec19  Tag mbedcrypto-3.0.1

Mbedtls: 3187e7ca986fe199313343b0c810e41b543ef78a Tag mbedtls-2.7.9

CMSIS_5: 80cc44bba16cb4c8f495b7aa9709d41ac50e9529 Tag 5.2.0

 

Could you share us the commit id of each repo and the toolchain version (arm-none-eabi-gcc -v) you are using?

 

Thanks,

Shawn

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Quach, Brian via TF-M
Sent: Tuesday, June 2, 2020 7:25 AM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] build error

 

Hi All,

 

I’m using the latest TF-M, embedTLS, and CMSIS 5 code (repo HEAD).  I renamed embedtls to embed-crypto.  I ran “cmake ../ -G"Unix Makefiles" -DTARGET_PLATFORM=AN521 -DCOMPILER=GNUARM” which seemed to execute fine, but I’m getting an error on the next step.  Does anyone know the solution?

 

mnt/c/Gits/trusted-firmware-m/cmake_build$ cmake --build ./ -- install                                               

[  0%] Built target tfm_s_pp_image_macros_to_preprocess_s_1                                                                            

[  0%] Built target tfm_s_pp_tfm_common_s_1                                                                                          

 [  0%] Building C object secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_func.o                                                        

/tmp/ccpVCp1C.s: Assembler messages:                                                                                                 

 /tmp/ccpVCp1C.s:47: Error: syntax error -- `msr psplim,r3'                                                                            

secure_fw/CMakeFiles/tfm_s_obj_lib.dir/build.make:86: recipe for target 'secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_func.o' failed

make[2]: *** [secure_fw/CMakeFiles/tfm_s_obj_lib.dir/spm/spm_func.o] Error 1                                                          

CMakeFiles/Makefile2:189: recipe for target 'secure_fw/CMakeFiles/tfm_s_obj_lib.dir/all' failed                                      

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

Makefile:129: recipe for target 'all' failed                                                                                           

make: *** [all] Error 2                       

 

Regards,

 

Brian Quach

SimpleLink MCU

Texas Instruments Inc.

12500 TI Blvd, MS F-4000

Dallas, TX 75243

214-479-4076