Hi All! Have a situation with dallas' DS5250: Keil configuration: Memory Model - Large variables in XDATA Code ROM size - Contiguous mode 512kB User segments: ?PR?MYFUNC?MYFUNC (C:140H)
I'd like to reserve a data space in RAM1. Now, as it can be seen from configuration, I use a part of RAM1 for "MYFUNC" and all is OK. But any attempts to make a data array 256B in the RAM1 cause error messages that "memory overlaped" and some else.
I'm a newbie in the DS5250, so I think, my problem is in syntax in the command line. Please, can anybody help me?
"Now, as it can be seen from configuration, [...]"
Seen from what configuration?
The configuration as above: Keil configuration: Memory Model - Large variables in XDATA Code ROM size - Contiguous mode 512kB User segments: ?PR?MYFUNC?MYFUNC (C:140H)
It can be seen that I use a part of RAM1 from address 0x140 for a function. Function works well. But I cannot declape a DATA array. I don't know the sytax
"It can be seen that I use a part of RAM1..."
No, it can't - because you haven't said what "RAM1" is!
"...from address 0x140 for a function"
So you have some RAM mapped into code space?
Doesn't your C:140H indicate offset 0x0140H in the "code" segment? Would "C:" as prefix really indicate an overlap with RAM1?
And why do you think it good to duplicate the information from the first post, instead of sitting down and pondering if there may be information you did _not_ supply in that first post. Such as what RAM1 is. Or relevant information from a produced map file. How do we know that RAM1 is a memory region that is even big enough to fit a 256 byte array?
If you do look at your posts even closer, you might even notice that you talk about some error messages but you have never actually copied and pasted these error messages into any of your posts.
You are still living the "my car doesn't work - what is wrong" life. You really do have to supply some more information for anyone to be able to help. Yes, I do know there is a huge probability that if you do make a post with too much well-selected information, you may actually happen to solve the problem yourself. But that is a risk you just have to take.
Yes, I have the "My Func()", mapped to RAM1. RAM0 used for user-loader mode. Beginning of RAM1 contains interrupt vectors, MyFunc(). I want to have a data array in the RAM1 also. I can make a code in the RAM1, but if I try to place in the LX51 Locate, User Segments:
?ID?INNERDATA?INNERDATA (C:300H),
I have the error: ERROR L110: CANNOT FIND SEGMENT SEGMENT: ?ID?INNERDATA?INNERDATA
Earlier I tried another declaration and got error "memory overlaped"
I cannot understand what does compilator require else?
MyFunc allocated on address 0x140, in the inner area, not on 0x1400, that is external area. I also tried: ?PR?MYFUNC?MYFUNC (C:80H), and this works, also I saw in the debug mode where the MyFunc() allocated, all is OK, it was on the 0x80 address.
Sorry I didn't supplied additional information abot the RAM1 size, because of I thought it is clear from the topic header "DS5250...". DS5250 has RAM0, RAM1 1024 Bytes length.
Now I've written DT instead of ID: ?DT?INNERDATA?INNERDATA (C:300H) but the same error L110. I understand, that Keil wants to see where I've declared the array and how long is it. Thus, I wrote in a project:
uchar data innerdata[16];
Keil have changed error message, now it is : ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: INNERDATA, this error for some reason (?) applied to all files in the project. I do something wrong.
"I do something wrong."
Yes. You have selected the "trial and error" methodology. It is known to produce long sequences of failures.
How can you have multiple public definitions? Do you have the variable in multiple C files? Or did you add your line in a header file, resulting in one copy of the variable for every C file including that header file?
How can you have multiple public definitions? Do you have the variable in multiple C files? I don't have this variable in multiple C files. I've specially wrote ?DT?YOUNGLADY?YOUNGLADY.... in the command line to avoid any random conflicts of names:) The problem is in the syntax in the command line, I wrote something wrong. Where can I find examples of declarations in the command line?
I wrote in a project:
No, you cannot write that in a Project - it must be in either a .c source file or a .h header file.
So - what did you actually do?
OK, I've uploaded the project: rapidshare.com/.../TESTER.rar
There is the Bird() function that located at RAM1 (address 0x80). Please, can you create an array (for example, at address 0x120), with length of 100 bytes?