This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Global variable change value itself

hi,

I use global variables but I have a issue with two of theirs.

One is WpageNum:

static uint8   WpageNum = 0;

When I have to use it the value is 0x2C.  I can modify it, but when I have to use it again, It has the same value (0x2C)

The other variable is a string Trama_GPS[256], sudenly only change the value of postion 0.

I think using malloc() can solved it, but I should change all code.

If I view .map file:

XDATA_I
  Relative segment, address: XDATA 00000C25 - 00000CB6 (0x92 bytes), align: 0
  Segment part 75.            Intra module refs:   performGPSTask
                                                   rx_isr
           LOCAL                   ADDRESS         
           =====                   =======         
           Trama_GPS               00000C25

XDATA_Z
  Relative segment, address: XDATA 00000484 - 00000484 (0x1 bytes), align: 0
  Segment part 61.            Intra module refs:   WritePage
           LOCAL                   ADDRESS         
           =====                   =======         
           WpageNum                00000484

 118 304 bytes of CODE  memory
      34 bytes of DATA  memory (+ 85 absolute )
   6 645 bytes of XDATA memory
     194 bytes of IDATA memory
       8 bits  of BIT   memory
   4 437 bytes of CONST memory

Can I solved it changing XDATA size??

thanks