Greetings Experts
I am trying to compile the TEE sample with DS-5. I downloaded the latest version of DS-5, and created a C project. I was able to put in the main_secure.c file and build ok. I then tried to add monitor.s file to the project by adding another source file. I get the following errors:
Would someone please compile the project, and advise in high level what sort of project I need to create and how to import the source files into my project please?
Sean
David
Thank you so much for the reply. I may have missed something. I do not quite make the connection between build.bat and having to create projects for normal image and secure image. I tried the build.bat after I installed and configured DS-5, but I got some errors and I shared them below. I installed DS5 on Windows, and created a 30 day evaluation license. I then created a C project called normal image and added the files ./src/main_normal.c, ./src/retarget_normal.c, ./src/startup_normal.s, ./src/v7.s to the project. I then added the scatter file as a scatter file. I do get some errors as follows:
I also tried to run build.bat after adding the ds-5 to my path and get the following errors even though I generated a 30 day license. I tried to look to see if I can modify something in the build.bat to point to my install, but I do not recognize the path of license desired by the compiler. :
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>del .\obj\*.o
Could Not Find C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example\obj\*.o
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armcc -c --debug --cpu=Cortex-A9.no_neon.no_vfp -O1 -o ./obj/main_normal.o ./src/main_normal.c
Error: C9555E: License checkout for feature compiler5 with version 5.0201503 has been denied by Flex back-end. Error code: -1
Cannot find license file.
The license files (or license server system network addresses) attempted are
listed below. Use LM_LICENSE_FILE to use a different license file,
or contact your software provider for a license file.
Feature: compiler5
Filename: c:\program files\arm\licenses\license.dat
License path: c:\program files\arm\licenses\license.dat;
FlexNet Licensing error:-1,359. System Error: 2 "No such file or directory"
For further information, refer to the FlexNet Licensing documentation,
available at "www.flexerasoftware.com".
Product: DS-5 Professional 5.22.0 [5220021]
Component: ARM Compiler 5.05 update 2 (build 169)
Tool: armcc [4d0f38]
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armcc -c --debug --cpu=Cortex-A9.no_neon.no_vfp -O1 -o ./obj/retarget_normal.o ./src/retarget_normal.c
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armasm --debug --cpu=Cortex-A9.no_neon.no_vfp -o ./obj/startup_normal.o ./src/startup_normal.s
Error: A9555E: License checkout for feature compiler5 with version 5.0201503 has been denied by Flex back-end. Error code: -1
Tool: armasm [4d0f2f]
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armasm --debug --cpu=Cortex-A9.no_neon.no_vfp -o ./obj/v7.o ./src/v7.s
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armlink --scatter=scatter_normal.txt --entry=normalStart -o normal.axf ./obj/main_normal.o ./obj/retarget_normal.o ./obj/startup_normal.o .
Error: L9555E: License checkout for feature compiler5 with version 5.0201503 has been denied by Flex back-end. Error code: -1
Tool: armlink [4d0f33]
Finished: 1 information, 0 warning and 1 error messages.
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>fromelf --bin -o normal.bin normal.axf
Error: Q9555E: License checkout for feature compiler5 with version 5.0201503 has been denied by Flex back-end. Error code: -1
Tool: fromelf [4d0f2f]
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armcc -c --debug --cpu=Cortex-A9.no_neon.no_vfp -O1 -o ./obj/main_secure.o ./src/main_secure.c
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armcc -c --debug --cpu=Cortex-A9.no_neon.no_vfp -O1 -o ./obj/retarget_secure.o ./src/retarget_secure.c
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armasm --debug --cpu=Cortex-A9.no_neon.no_vfp -o ./obj/startup_secure.o ./src/startup_secure.s
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armasm --debug --cpu=Cortex-A9.no_neon.no_vfp --diag_suppress=A1786W -o ./obj/monitor.o ./src/monitor.s
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>armlink --scatter=scatter_secure.txt -o EB_TrustZone_Example.axf --entry=secureStart --keep=startup_secure.o(NORMAL_IMAGE) ./obj/main_secur
C:\Users\sansari\Downloads\EB_TrustZone_Example\EB_TrustZone_Example>
For your project build errors:
Seems that object file of v7.S didn't join the linking process, because all missing symbols are defined in v7.S.
I have made a project for normal project, it works well.
Share you some key settings:
1 Project files
2 C compiler setting
3 Assembler setting
4 Linker setting
5 post-build setting (make binary file from axf file)
Then you should pass the build of this project.
Secure project setting is similar.
For the build.bat issue, it seems that you have license issue. I'm using licensed version, so I don't know why it happened in evaluation version.