Hi everybody,
I actually work on a LPC2103, and I have a problem with a inline assembler.
In fact, I want to modify the Link Register R14, at the end of an interruption, in order to return in Main Programm at an other location.
But when I compile my programm, the compiler print this error:" error #20: identifier "R14" is undifined.
The problem is that I don't know how you can declare this kind of register.
thank in advance
Chris
I'm afraid that you cannot be helped here without referring you to the manual first.
Recent feedback has determined that this is not acceptable. Sorry about that.
http://www.keil.com/forum/docs/thread10151.asp
First, read the topic "ARMCC Virtual registers" in the RealView Compiler's User Guide. This will explain that is not possible to do what you are trying to with in-line assembly.
You will have to do this in normal assembly code.
I'm assuming that you know exactly what you are doing here, that you have no alternatives, that you are very familiar with the LPC2103, that you are proficient with ARM assembly programming and that you know the ARM AAPCS and ABI inside out.
Otherwise you are best advised to try something else unless it is a trivial application.
If you didn't think of any pitfalls of doing this in a C function then maybe you should look again for an alternative.
That said, this is how a task scheduler in an ARM OS might work so it might be the right approach for your problem. You didn't provide any details on that.
"I'm assuming that you know exactly what you are doing here..."
Hmmm... not sure that I'd assume that from the original question...
;-)
View all questions in Keil forum