Hi,
Being new to the fascinating ARM world, I am going through various documentation and reading material.
I read that the ARM Cortex-M processors (or I think it applies to all the Cortex processors) are entirely C programmable. This means that assembly code is not required for start-up code and for ISRs.
I am curious to find out what prohibits the earlier ARM processors (or even other architectures) to write the start-up code in C? Are these any specific instructions? One which I found was the WFI (Wait For Interrupt) which can't have an equivalent in C. But that is not a start-up or ISR instruction.
Thanks for your support !
Gopal
Hi Gopal-san,
I think that it would mean the interrupt handler of Cortex-M could be written in the same way as normal C functions. Actually to use WFI, we should use the asm statement. By the way, almost all parts of a program can be written by C. For example, the interrupt vectors which are made by the C language array of pointer to ISRs are located into address 0 by the C linker. By conventional ARM architecture (e.g. ARM7), instructions are located at the interrupt (including reset) vectors, and it would be impossible to write the startup codes by C language.
Best regards,Yasuhiko Koumoto.