I am trying to define a lookup table in PROGMEM for an experimental Lisp interpreter on an ATmega328. It needs to consist of a series of strings and function addresses. I've tried this:
const char String1 PROGMEM = "car"; const object* (*Function1)(object*, object*) PROGMEM = &fn_car; const char String2 PROGMEM = "cdr"; const object* (*Function2)(object*, object*) PROGMEM = &fn_cdr;
and so on. The idea is that if the parser encounters "car" it should execute the function fn_car, etc.
However I get the error "variable 'Function1' must be const in order to be put into read-only section". Any suggestions how I should do this?