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

Global Var

HI!!

I declared 3 global var, i call it inside diferent task and every execution this var should be updates but not to do it.
I have a 8051 under evaluation board.
Maybe can be a problem of my small micro?
What do u think about this?

Thanks

Parents Reply Children
  • Copy and paste here the error you get when you try to compile with 'Use on-chip xdata' selected.

    Are you sure you have enough XDATA your program requires?

  • No, im not sure.
    My micro is Philips P89LCP936, and when i compile my code:
    Program size: data=105.1 xdata=1286 code=10216
    -0 errors, 0 warning

    but if i put Use On-chip XRAM: TOO MANY ERRORS

    ERROR L107:ADRESS SPACE OVERFLOW
    SPACE: XDATA
    SEGMENT: ?RTX?TASKCONTEXT?1
    ....
    ...
    ERROR L105:PUBLIC REFERS TO IGNORED SEGMENT
    SYMBOL: UBMAN
    SEGMENT: ?XD?MAIN
    ....
    ...
    ERROR L118:REFERENCE MADE TO ERRONEUS EXTERNAL
    SYMBOL: ?RTX_...
    MODULE: RTXCONF.OBJ
    ADRESS:...
    ...

    I have 3 errors type.

  • In datasheet of my micro i can read:

    The various P89LPC933/934/935/936 memory spaces are as follows:
    -DATA
    128 bytes of internal data memory space (00H:7FH) accessed via direct or indirect
    addressing, using instructions other than MOVX and MOVC. All or part of the Stack
    may be in this area.
    -IDATA
    Indirect Data. 256 bytes of internal data memory space (00H:FFH) accessed via
    indirect addressing using instructions other than MOVX and MOVC. All or part of the
    Stack may be in this area. This area includes the DATA area and the 128 bytes
    immediately above it.
    -SFR
    Selected CPU registers and peripheral control and status registers, accessible only
    via direct addressing.
    -XDATA (P89LPC935/936)
    ‘External’ Data or Auxiliary RAM. Duplicates the classic 80C51 64 kB memory space
    addressed via the MOVX instruction using the SPTR, R0, or R1. All or part of this
    space could be implemented on-chip. The P89LPC935/936 has 512 bytes of on-chip
    XDATA memory.

  • In Option target in uvision3 :


    8051-based microcontroller with 2 clock highspeed core,
    16K Bytes ISP/IAP Flash, 512 Bytes Data EEPROM,
    256 Bytes RAM, 512 Bytes AUX RAM, Dual DPTR,
    23(26) I/O Lines, 2 Timers/Counters, UART, I2C, SPI,
    2 Analog Comparators, CCU, two 8-bit 4-ch ADC/DAC,
    WDT, RTC

  • so you are trying to fit 1286 XDATA bytes into 512 bytesr of XRAM space.

    Sorry but they just won't go.

    If you compile without ticking the "use on-chip xram" the compiler assumes you have plenty off-chip xram, so no errors but your code does not work because you have no off-chip xram.

  • so you are trying to fit 1286 XDATA bytes into 512 bytesr of XRAM space.

    Sorry but they just won't go.
    finally we got to the crus of the matter which, once more show that my crawl, walk, run method is the ONLY mmethid to get to where you can present such matters in a way that they can be resolved in a forum in less than a week or two. Not to forget that if the OP had done his crawling and walking, this matter would have been obvious to him and no thread would ever have been initiated.

    Erik

  • I know this sounds a little cruel, but I just HAVE to say this: instead of paying bribes to people to do your homework, go buy new hardware!
    paying people to do your assignments.
    SHAME SHAME SHAME ON YOU!
    YUK !!!!!!!!!!!!

  • OK, Thanks.
    But then...What i can do??

  • Whenever I read Erik's posts I can't help reading his name to myself as Orac

    From: en.wikipedia.org/.../Orac_(Blake's_7)

    Orac is a highly advanced supercomputer developed by the scientist Ensor, brought aboard the Liberator by Blake and the others at the end of the first series. Ensor was a particularly irascible character and Orac, as his creation, inherited some of his character traits. It is extremely terse and short-tempered and frequently talks down to the humans. Rather than a personality or character Orac is an ego and often refuses to answer questions it deems too simple (Stardrive). Avon often lamented that Orac was too valuable to dump. Orac is activated by a "key", which is removed by the crew to shut it up if it prattles on too much.

    No offence intended, I think every forum should have an Erik / Orac.

  • "Whenever I read Erik's posts I can't help reading his name to myself as Orac"

    For me, Eric Cartman is more of a match ;)

    en.wikipedia.org/.../Eric_Cartman

  • Thanks to everybody!!!
    Sorry for my problems. For me it is very dificult because im working alone and my English level is not good.

  • Your english level seems quite find. Don't forget that a lot of (most?) people on this forum are not native english speakers.

    But it is imperative to learn the special terminology used in data sheets - if not, you will always get into troubles. It is (or at least should be) part of the information taught during the classes. All trade crafts have their own terminology.

  • Well said Per. I thought Javi's English was excellent, he shouldn't put himself down. I'm a native English speaker and his English is far better than my Spanish (or any other language come to think of it)

    He asked questions, didn't use abbreviations or text speak (which I detest) and showed an understanding of what he was doing and had learned (I'm impressed he knows what a PID loop is, let alone code it). He also put up with a bit of criticism as well.

    To Javi: You are near the top of a steep learning curve. Stick in there! Next time you ask for help try to give as much information as possible. I asked you to "Cut and Paste" your error message and you edited it with the vital parts replaced by "....". (Did it not say the size of your XDATA?) You should have just pasted it as it was on your screen. (However you also included information from a previous build which told me what I suspected.)

    Good luck with your project and as for your current problem, if your project is optimised as far as possible and you haven't wasted any
    data space (eg. Putting a big lookup table in RAM instead of declaring them in code space, or used real's when int's would have done (:-) then you will have to think about scaling down the project or finding a chip with more memory.

  • "Whenever I read Erik's posts I can't help reading his name to myself as Orac"

    For me, Eric Cartman is more of a match ;)
    the people that know me well usually refer to the father of Leifur Hin Haffnir

    Erik