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

Using xhuge memory

Hello,

I have been using an xhuge array of size 512KB on the C167HSE and my software has been working fine. It is declared as follows:

unsigned int xhuge x[256000]={0};

By looking at .M66 file (MEMORY MAP OF MODULE section), the begin, end, and the size looks like the following:

300000H 37CFFFH 07D000H

Now I need to enlarge the array from 512KB to 800KB and I'm getting the following error:

WARNING L5: SECTION LOCATED OUTSIDE CLASS AREA
SECTION: ?XD0?MAIN
CLASS: XDATA0

C167HSE has two 512KB RAM. How can I create a logical array of 400000 type int? Thanks in advance.

Parents
  • With more time to play around with different configurations, the bottom line is that in order to allocate 800KB, both BUSCON1 and BUSCON3 have to be set to 1, U2 and U3 respectively. But to run the code in debug mode, BUSCON1 has to be set to 0. Is there any way to allocate an array size of 800KB and still run it in debug mode? Thanks in advance.

Reply
  • With more time to play around with different configurations, the bottom line is that in order to allocate 800KB, both BUSCON1 and BUSCON3 have to be set to 1, U2 and U3 respectively. But to run the code in debug mode, BUSCON1 has to be set to 0. Is there any way to allocate an array size of 800KB and still run it in debug mode? Thanks in advance.

Children
  • The following line

    %DEFINE (RANGE3) (300K)
    looks strange. I don't think 300K is legal here, unlike 512K. Is there any way to allocate an array size of 800KB and still run it in debug mode? I'm sure there is. The answer to your question depends on what 'debug mode' means. I am not familiar with phyCORE C167HS/E and the configuration of software that comes with it, but I suspect that you run the debugger with Keil Monitor166. In this case you need to reconfigure Monitor166 to make it use a different memory area for its data and/or code. You can find the details here: http://www.keil.com/support/man/docs/mon166/ Regards, - mike