This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CALL C FUNCTIONS WITHIN STARTUP CODE

Hello,

I need to start C functions from startup code before calling C startup (which calls main()).
Reason:
I have to do some selftests like a destroying RAM Test which must be done before the C-startup initialisation.
I don't know any ARM assembler and find it easier to maintain C code.

I have already managed to jump to a C function and exit. I am aware that it must be pure functions - no static variables. However when I try to call a subroutine from the function something goes wrong and a abort exception occurs. It has something to do with saveing the stack pointer or so.

Can you give me a hint?
How can I evaluate a return variable from the C function in assembler?
Maybe someone can tell me which chapter/book to read.

Thank you

Best wishes,

Oliver D.

0