This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

_at_ with initialization... help me...!!

Hi,
I want to assign absolute address to one of my array. eg. i want to assign the array named as test_ary[] in code memory from 0x1000 location. How can i do it ?

unsigned char code test_ary[]={
0x12, 0x11, 0xFE, 0x22, 0xDE,
0x65, 0x98, 0x22, 0x43, 0x21,
...
...
...
};

Here, test_ary is an image of executable code. I want to locate this image i.e test_ary from 0x1000 address in code memory using _at_ keyword.

How can i do it ?

Thanks in advance.

Parents
  • "Well, using linker control i can do it. But my problem is that i have a conditional initialization"

    Somewhere, external to your 'C' source, you have to set up that condition, don't you?

    So, instead of setting it as an option for the Compiler, you just set it as an option for the Linker instead!

    Maybe you could achieve this in uVision by using two Targets?

Reply
  • "Well, using linker control i can do it. But my problem is that i have a conditional initialization"

    Somewhere, external to your 'C' source, you have to set up that condition, don't you?

    So, instead of setting it as an option for the Compiler, you just set it as an option for the Linker instead!

    Maybe you could achieve this in uVision by using two Targets?

Children