Hi every one, The Philips 87C51MX user's manual indicated that the on-chip EDATA ranges from 0x100 to 0xffff; which followed the IDATA. An article found in the Keil support knowledge base (CX51: LOCATING CODE IN PHILIPS MX INTERNAL CODE MEMORY) showed the following: --------- User Classes: EDATA (0x7F0000-0x7F04FF), /*on-chip RAM */ HCONST (0x810000-0x84FFFF) /*off-chip Flash for 'const far' */ --------- How does the "0x7f0000" become the starting address of on-chip EDATA? And where would the on-chip XDATA start? Thanks. Deyon
Re: edata in 51MX. In the evaluation version (EK51v701) I tried to add "edata" to its main.c file. But the keyword "edata" would not come up blue and bold (other keywords like "data", "idata" or "xdata" would); meaning I can't declare an "edata" this way. But the map file, there's a section that showed the EDATA section is defined. Any one has successfully used 51MX's on-chip edata? How is creating an "edata" variable done? Thanks for your help.
Use the far keyword for variables located in EDATA. Use far const for constants located in ECODE. There should be examples of this in the examples folder. This is also discussed in the manual. Jon
I used the "far" keyword, trying to create an on-chip edata variable. But in the map file, the variables declared with "far" turned out to be HDATA, and is not "located" at where the EDATA should be. What syntax will give me a report in the map file that says: EDATA ..... my_var. ? It seems to get much more difficult than it should. When it's listed as HDATA in the map file, can I think of it as EDATA? Thanks.
Take a look to: http://www.keil.com/support/docs/2021.htm. This is the direct answer to your problem.