Currently, we are using assembly code to run processor (A53) based tests.
However, we are planning to move to C based testing to raise the abstraction level of our testing.
In this regard, I am looking for the following:
1) any guideline or document that explains how to write C programs for SoC testing. I assume these will be similar to baremetal or embedded code
Can I refer to embedded C programming for this purpose?
2) a very simple and sample C code as a starting point.
For example, code to just initiate a read transaction to memory location 0x0
Thanks in advance
See "Support Files" here:https://developer.arm.com/documentation/102422/0100/Overview
Thanks. A couple of follow-up questions please.
1) i guess the execution flow is that the processor starts with startup.s and then jumps to main.c
If this is the case, how it is specified that the startup.s should be placed at the address from where the processor starts execution?
2) how it is specified that code has to jump from startup.s to main.c?
The only other file I see is the scatter.txt but I dont see anything that specifies these.
1) The linker option --entry is used to say that this is the first instruction to execute. You are correct that in this case, it is not explicitly placed first in the code area, but just picked up by the catch-all "* (+RO)" line.
You could add to the scatter file with something like:
startup.o (BOOT, +RO)
2) The startup code ends with a branch to __main, which is the start of the C library initialization code... this will ultimately get to main(), where your application begins.