Keil Logo

__at for Function Address

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
zhao yk
Posted
27-Dec-2008 01:32 GMT
Toolset
ARM
New! __at for Function Address

void __at(0x2000) test(void)
{ int i; i++
}

This Function is right by MDK3.05, but is warning by MDK3.24?
warning:: Sources\BSP.c(50): warning: #1202-D: invalid attribute for function "test"

why?

Thank you!

Read-Only
Author
Per Westermark
Posted
27-Dec-2008 02:23 GMT
Toolset
ARM
New! RE: __at for Function Address

Have you taken a look at the manual?

Have you seen this link:
http://www.keil.com/support/docs/2829.htm

What make you think that you can place a function at an absolute address by giving it an attribute in the C code?

Have you read this about absolute placement of segments?
http://www.keil.com/support/man/docs/armlink/armlink_ccheecgi.htm#chdbbaee

Read-Only
Author
zhao yk
Posted
27-Dec-2008 03:21 GMT
Toolset
ARM
New! RE: __at for Function Address

place a function at an absolute address by giving it an attribute in the C code.

Because I see a friend's program used the mode. but he uses the MDK3.05.
The MDK3.05 can place a function at an absolute address by giving it an attribute in the C code.
I think this is the easiest mode to carry out .

I have tryed to use the MDK3.05 to place a function at an absolute address by giving it an attribute in the C code. That is OK! Just like my first description.

So I think the MDK3.24 can do it too.
Can you help me to do it used the MDK3.24.

thanks for your help!

Read-Only
Author
Per Westermark
Posted
27-Dec-2008 03:32 GMT
Toolset
ARM
New! RE: __at for Function Address

And what compiler is your friend using? The old CARM compiler?

The CARM compiler manual says:
"__at locates functions or variables to absolute memory addresses."

But the CARM compiler is discontinued, so it doesn't matter what language extensions the CARM compiler supports unless you happen to have an old version of the compiler installed.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.