исправил... платформа IAR AVR 6.12
char tt; __flash const char Sound[] = {0,1,2};
tt = Sound[2]; компилируем имеем
Error[Pe077]: this declaration has no storage class or type specifier C:\pistol\main.h 14 Error[Pe147]: declaration is incompatible with "char tt" (declared at line 11) C:\pistol\main.h 14 Error[Pe028]: expression must have a constant value C:\pistol\main.h 14 Error while running C/C++ Compiler Total number of errors: 3
Три ошибки в слове х..... многовато даже для двоешника
причем порядок ключевых слов при объявлении массива компилятор пропускает в любом порядке ,но как только константу из флеша присваиваю переменноц так три ошибки
одну ошибку извел объявив переменную int
__flash const char Sound = 6; int tt; tt = Sound;
имеем
Error[Pe077]: this declaration has no storage class or type specifier C:\pistol\main.h 14 Error[Pe028]: expression must have a constant value C:\pistol\main.h 14 Error while running C/C++ Compiler Total number of errors: 2 Total number of warnings: 0
Сообщение отредактировал laryc - Feb 20 2017, 15:22
--------------------
никогда не бывает так плохо чтобы небыло ещё хуже
|