Keil Logo Arm Logo

Initialized const at fixed location?

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

Details Message
Read-Only
Author
Christian Treczoks
Posted
26-Jul-2007 13:27 GMT
Toolset
C51
New! Initialized const at fixed location?

Hi!

I've got a piece of source in my current project which represents a balanced binary tree, built from a load of preinitialized structs in C. All that needs to be visible from the "outside" is one symbol ("LanguageTree_Root"), everything else is static, and of no concern to the other modules.

I managed to nail the module at a fixed location in code memory (One should be able to replace the whole structure without the need to reprogram the program code), but I just can't nail the one symbol for the LanguageTree_Root to a fixed address (which should be the beginning of the block).

The documentation tells me that using the _at_ keyword is not possible for a pre-initialised variable, but without pre-initialisation, the LanguageTree_Root pointer in code space is worthless, even if i can nail it to a fixed address...

To bring the module to the proper location I already use the linker option CODE(?CO?*,?PR?*,?C*,?CO?LAST,?CO?LANGUAGETREE(C000H))
which places the "normal" code stuff and constants at the beginning, one "Last" module at the very end of the code, and the LanguageTree module at location 0xC000.

The LanguageTree_Root symbol ends up "somewhere" in the 0xC0000, but I just can't get it to the beginning.

Any ideas that might help me?

yours,

Christian Treczoks

Read-Only
Author
Reinhard Keil
Posted
27-Jul-2007 13:44 GMT
Toolset
C51
New! RE: Initialized const at fixed location?

see here: http://www.keil.com/support/docs/301.htm

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

Keil logo

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.

Acquisition of ARM Holdings plc. by SoftBank Group Corp.

We are pleased to inform you that on 5 September 2016, SoftBank Group Corp. acquired ARM Holdings Plc. ARM will continue to operate as an independent business within the SoftBank group.

Any current agreements between ARM Ltd (or other ARM group companies, as applicable) you / your company remain in effect as between the parties, and the parties will continue to be bound by and perform the obligations in such agreements. If you have any queries please direct these to ARMSoftbank-Notifications@arm.com.