I am confused little bit. If I use the static modifier I can read in
the translated code that arrays are compiler-definied variables:
;
; compiler-defined variables
;
UDL_test_0 uda
Global variables are also put in a different section, so the trick is:
#define ARRAY_1_LEN 60
unsigned char array1[ARRAY_1_LEN]; /* global (non-static) array */
#define ARRAY_2_LEN 60
static unsigned char array2[ARRAY_2_LEN]; /* local (static) array */
Borut
O
Hello Tamas,
It is not an intelligent solution for this problem, but you can make
arrays initialized. The compiler put them initialized data section
separately so the linker can allocate memory for them independently.
Example:
#define ARRAY_1_LEN 60
static unsigned char array1[ARRAY_
Hi Tamas,
problem is that sdcc puts all variables, including both arrays, in the
same section. The linker tries to allocate a continuous memory block for
the complete section, which is 125 bytes, and fails. Solution would be
to put each variable in it's own section, the same as the code
genera
Dear sdcc developers,
I made a test with sdcc, using two arrays, each is 60 bytes long.
The target MCU is PIC16F1938. It is a 14 bit enh. core device with enough
memory for these arrays.
The two array should be allocated into separate banks, because they are
together larger than the free space i