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
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.