Some constructs that are legal C do not work when compiled for ‑‑apcs=/ropi or ‑‑apcs=/rwpi, for example:
int i; // rw
int *p1 = &i; // this static initialization does not work
// with ‑‑apcs=/rwpi ‑‑no_lower_rwpi
extern const int ci; // ro
const int *p2 = &ci; // this static initialization does not work
// with ‑‑apcs=/ropi
However, to enable these static initializations to work, use the ‑‑lower_rwpi and ‑‑lower_ropi options.
To compile this code, type:
armcc ‑‑apcs=/rwpi/ropi ‑‑lower_ropi
You do not have to specify ‑‑lower_rwpi, because this is the default.