Hallo,
ich bekomme bei folgendem Code:
1 | const uint8_t *config_str[] PROGMEM = {
|
2 | &mcp2515_bef_configmode[0],
|
3 | &mcp2515_bef_conf25k[0],
|
4 | &mcp2515_bef_conf_tpins[0],
|
5 | &mcp2515_bef_conf_rbuf0[0],
|
6 | &mcp2515_bef_conf_rbuf1[0],
|
7 | &mcp2515_bef_conf_mask0[0],
|
8 | &mcp2515_bef_conf_mask1[0],
|
9 | &mcp2515_bef_conf_int[0],
|
10 | &mcp2515_bef_conf_rpins[0],
|
11 | &mcp2515_bef_normalmode[0],
|
12 | &mcp2515_bef_set_int[0],
|
13 | 0
|
14 | };
|
im AvrStudio 6.2 die Fehlermeldung:
Error 2 variable 'config_str' must be const in order to be put into
read-only section by means of '__attribute__((progmem))'
Das muss irgendwie an der Deklaration als Pointer-Array liegen. Bei
"normalen" Arrays im Flash funktioniert es dagegen prima.
Was mache ich falsch?
Viele Grüße, Stefan