[En-Nut-Discussion] Memory Requirements

Harald Kipp harald.kipp at egnite.de
Tue Mar 11 10:33:35 CET 2003


Hi ?,

Strings are stored in RAM, unless otherwise declared.

For GCC this is quite easy. Change

  printf("foobar");

to

  printf_P(PSTR("foobar"));

ICC doesn't support such a construct. In order to get
it working on both compilers, you need to write:

  static prog_char foobar_P[] = "foobar";
  printf_P(foobar_P);

Harald




More information about the En-Nut-Discussion mailing list