Or maybe I'm doing something wrong.
It seems that the latest snapshot still creates some initialized variables in RAM, no matter if they are 100% constant. I've hit this in the past, with the old 2.13 version, and I believed it was already fixed, but in a project where most of my RAM is in use, this:
won't let me compile ( Segment `BSS' overflows memory area `RAM' by X bytes ). If I remove the line it compiles, so that implies the compiler is, for some reason, allocating such space in RAM.
Maybe I'm doing something wrong, is there a different syntax for a constant array of constant pointers? In other compilers such as SDCC, I have to write this:
But cc65 doesn't like that and throws a syntax error.
Any pointers? Or have I hit another bug/unimplemented feature?
It seems that the latest snapshot still creates some initialized variables in RAM, no matter if they are 100% constant. I've hit this in the past, with the old 2.13 version, and I believed it was already fixed, but in a project where most of my RAM is in use, this:
Code:
const unsigned char *map_2 [] = {
0, 0, 0, 0, 0, 0
};
0, 0, 0, 0, 0, 0
};
won't let me compile ( Segment `BSS' overflows memory area `RAM' by X bytes ). If I remove the line it compiles, so that implies the compiler is, for some reason, allocating such space in RAM.
Maybe I'm doing something wrong, is there a different syntax for a constant array of constant pointers? In other compilers such as SDCC, I have to write this:
Code:
const unsigned char * const unsigned char spr_enems [] = {
But cc65 doesn't like that and throws a syntax error.
Any pointers? Or have I hit another bug/unimplemented feature?