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

c-file befor startup code

How can I run a c-file bevor the usual startup code?

Which changes do I have to made in the startup code? I'm working with the lpc2214.

thanks in advance
JChris

Parents
  • I am not very familiar with the ARM toolchain, but I would be surprised to learn that you can't call your own C functions before main(). Isn't that just a matter of jumping to a C function from an assembly file? And then, depending on how soon you call it, the C function must be crafted in such a way that it will cope with lack of initialization of, well, you choose what. For instance, a ram test coded in C could be called before the startup code initializes the static C variables.

Reply
  • I am not very familiar with the ARM toolchain, but I would be surprised to learn that you can't call your own C functions before main(). Isn't that just a matter of jumping to a C function from an assembly file? And then, depending on how soon you call it, the C function must be crafted in such a way that it will cope with lack of initialization of, well, you choose what. For instance, a ram test coded in C could be called before the startup code initializes the static C variables.

Children