Hello, everyone,

I would like to declare a global variable across the 4 pages of the
16f877 PIC. Until now, I'm using:

   static BYTE language=I18N_ES;

inside of a header (temete4.h), which is included from all the 4
source files of the project: temete1.c, temete2.c, temete3.c &
temete4.c (you know, each one if for one page).

The problem is that when I want to assign some value to "language" in
a function from, say, page 2 (temete2.c), then, if I call it from page
3 (temete3.c), I'm getting a different value, as if there where 4
variables, one in each page, with the same name, but different
addresses.

I attach the Makefile with the compile options.

Any ideas on how to declare a unique global variable for all pages??

BTW, I'm using SDCC version:

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08
2.8.5 #5276 (Nov 26 2008) (UNIX)

Thank you.

Attachment: Makefile
Description: Binary data

------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to