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

Why in data small everything works?

Hi guys,

I wrote a simple program using the data in small model and the code in large model, and the program worked perfectly, however, when I compiled the program with the data in large model, the program compiles, but it does not run!!!!

Does anyone have any clues about why this happen?

Thanks in advanced,

DB

Parents
  • Thanks to all the guys that respended.... I should have answered your questions before....

    1.- Yes, I have several xdata variables defined.
    2.- I do not get any warnings in the compilation.
    3.- I wrote a routine to check the RAM and it was all OK.

    I can run my program with my cvariables in xdata in the data small model (the code is in the LARGE model), however, if I try to compile the data in LARGE model it does not run at all!

    Does nayone has any more clues about what is going on? What can I do to make it run?

    Thanks in advanced....

    DB

Reply
  • Thanks to all the guys that respended.... I should have answered your questions before....

    1.- Yes, I have several xdata variables defined.
    2.- I do not get any warnings in the compilation.
    3.- I wrote a routine to check the RAM and it was all OK.

    I can run my program with my cvariables in xdata in the data small model (the code is in the LARGE model), however, if I try to compile the data in LARGE model it does not run at all!

    Does nayone has any more clues about what is going on? What can I do to make it run?

    Thanks in advanced....

    DB

Children
  • "I should have answered your questions before...."

    Yes - unfortunately, you still haven't answered the questions that where actually asked!

    "1.- Yes, I have several xdata variables defined."

    The question was not, "do you use XDATA?";
    The question was, "is there any XDATA memory physically present in your system?"

    And the corollary is, "do you correctly enable and/or configure the physical XDATA memory in your system?"

    "3.- I wrote a routine to check the RAM and it was all OK."

    Maybe your routine was flawed?
    I knew someone who wrote a memory test, and it gave a "Pass" even when no memory chips were fitted in the board!
    You need a thorough understanding of how memory systems work, and the possible failure mechanisms, to be able to write an effective memory test.
    Read this article for further details:
    www.embedded.com/.../0007feat1.htm

    But first you need to ensure that your usage of the memory is correct!

    "it does not run at all!"

    How do you determine that?
    What indications would your program give if it was working?

    Note that accessing XDATA is significantly slower than DATA and IDATA - so, if your timing was marginal with the SMALL model, switching to LARGE could easily tip it over the edge and stop it working!

  • Hi, I dont know if this will help but if your code space is the same as XDATA memory (von neumann) and you switch from small to large without setting the "off chip xdata memory" field on the Target tab of the "target options" dialog, then the xdata variables will overwrite the code and corrupt it.
    This would show up in simulation if you can set code = xdata but I dont know how to do that.