Gast
#34436
Hi, da ich mein CAN-Bus Problem nicht lösen konnte, probiere ich jetzt einfach mal einen anderen Compiler: IAR Nur wie speichert man da Zeichenketten im Flash? mitm GCC ging das so PGM_P Zeile1[] = "hello world!"; mit IAR geht das so auf jeden Fall nicht mehr (compiler meckert). Bei IAR steht in der cavr.pdf auf Seite 72 (Zitat): "The AVR IAR C/EC++ Compiler normally copies strings from flash to data memory before main() is called, or lets you place them in external ROM (if available). Other string literals can be placed explicitly in flash, for example like this: __flash char str1[] = "my string";" bringt bei mir aber beim compilieren nur den Fehler: "memory attributes are not allowed on auto variables or parameters" Also wie mach ichs richtig?