Is it possible for me to cross compile the hello Trust Zone example referenced here: Cortex-A9 TrustZone example ? The build file contains the command options for the arm compiler. I do not have the board this example was meant for, and I am trying to see if I can run it on a different platform. I did see a --treanslate-gcc option referenced on the documentation. Would that by chance help me with what I am trying to do?
The example was written for ARM Compiler 4.x/5.x, which tool chain are you using?
What error messages are you seeing when you build the example?
I tried building the Versatile Express examples, and had to create an "obj" directory but then the build script worked.
Hi Martin
Thanks for the quick reply. I am using arm-eaby-4.7. Here is the error:
cc main_normal.c -o main_normal
main_normal.c:3:7: error: expected declaration specifiers or ‘...’ before numeric constant
__smc(0) void yeild(void);
^
make: *** [main_normal] Error 1
I am sure the script is fine. I am trying to compile the code for a different platform. Also, the readme file stated that there is a .sh file? I did not see it in the package I downloaded.
seanans schrieb: Hi Martin Thanks for the quick reply. I am using arm-eaby-4.7. Here is the error: cc main_normal.c -o main_normal main_normal.c:3:7: error: expected declaration specifiers or ‘...’ before numeric constant __smc(0) void yeild(void); ^ make: *** [main_normal] Error 1 I am sure the script is fine. I am trying to compile the code for a different platform. Also, the readme file stated that there is a .sh file? I did not see it in the package I downloaded.
seanans schrieb:
I guess you mean GCC.
__smc(0) is an intrinsic in ARM CC. Try this
__asm__(" smc #0");
instead.
If you're using GCC I expect that you'll face a number of problems...
Yes it is gcc. I'll try the update.
Thanks
Greetings-
I am running into another error now. It is:
gcc -c -o retarget_secure.o retarget_secure.c
/tmp/cctqYaNq.s: Assembler messages:
/tmp/cctqYaNq.s:15: Error: operand type mismatch for `call'
make: *** [retarget_secure.o] Error 1
Here is my makefile:
CC = gcc
objects := $(patsubst %.c,%.o,$(wildcard *.c))
foo:$(objects) monitor.s startup_normal.s startup_secure.s v7.s
$(CROSS_COMPILE)$(CC) -mcpu=cortex-a15 -o foo $(objects)
Can you help?