EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Keil RAM function problem

Started by beastkiki April 20, 2006
Hi all,
I use Keil uVision 3 with LPC2212.
I must write one function in assembler and execute it from internal
RAM on LPC2212.
How can I do that?

I am trying:
AREA ?PR?RAMFunc, ERAM
RSEG ?PR?RAMFunc

PUBLIC RAMFunc?A
PUBLIC RAMFunc?T
; veneer code for Thumb entry
RAMFunc?T PROC CODE16
bx r15
nop
ENDP

RAMFunc?A PROC CODE32

stmfd sp!,{r0-r12,lr}

ldr r0,=ioclr0

........
ENDP

But I received error SYNTAX ERROR on AREA line.:(
What is the problem?
I really need help!

An Engineer's Guide to the LPC2100 Series

Try putting double quoutes around ERAM... as follows:
AREA ?PR?RAMFunc, "ERAM"

This should work.

By the way...why don't you use the __ram directive, (and code your
function in C...you can still use in-line assembly if you want...)
that Keil gives you? This is far easier to do, and works very well!

Ken Wada

--- In l..., "beastkiki" wrote:
>
> Hi all,
> I use Keil uVision 3 with LPC2212.
> I must write one function in assembler and execute it from internal
> RAM on LPC2212.
> How can I do that?
>
> I am trying:
> AREA ?PR?RAMFunc, ERAM
> RSEG ?PR?RAMFunc
>
> PUBLIC RAMFunc?A
> PUBLIC RAMFunc?T
> ; veneer code for Thumb entry
> RAMFunc?T PROC CODE16
> bx r15
> nop
> ENDP
>
> RAMFunc?A PROC CODE32
>
> stmfd sp!,{r0-r12,lr}
>
> ldr r0,=ioclr0
>
> ........
> ENDP
>
> But I received error SYNTAX ERROR on AREA line.:(
> What is the problem?
> I really need help!
>

The 2024 Embedded Online Conference