What is the execution flow?

I am trying to understand the working of an application under riscv core.
So what is the execution flow? what are the files i should see in the freedom sdk folder.
like if i am flashing an application called demo_gpio,how the program gets worked?
i could see some files named entry.s ,start.s etc but struggling to understand the connection between files.
I want to learn about riscv in depth.
Can some one tell me?

I would also like to know about the execution flow of RISCV