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

C166 : locate some variables in a specified area memory

Hello,
I use Keil µvision 3.60
I need to store some variables from different files.c in the same memory area in order.
I saw there are link directives such ORDER, SECTIONS, GROUPS, but it seems these directives work for all variables or constants from the same file.
My problem is my variables are defined in different files and I don't know to specify to store such variable from such file.c in the same defined memory area and the other in the default memory area.
I need to specify when I define my variables the allocated memory where are stored.
Is possible with Keil Compiler?
How can I make this operation?
Thanks.

Parents
  • with my method on another compiler, I had just to copy a memory area, without to know any definition.

    But the developers still had to know that they had to put the relevant variables into that memory area. That's no better than putting them in a centrally maintained struct datatype.

    It is regrettable that the compiler is limited.

    It's not C166 that is limited here. It's your code's portability that is limited by relying on extensions in some other compiler. Lack of extension is not a limitation.

Reply
  • with my method on another compiler, I had just to copy a memory area, without to know any definition.

    But the developers still had to know that they had to put the relevant variables into that memory area. That's no better than putting them in a centrally maintained struct datatype.

    It is regrettable that the compiler is limited.

    It's not C166 that is limited here. It's your code's portability that is limited by relying on extensions in some other compiler. Lack of extension is not a limitation.

Children
No data