[an error occurred while processing this directive] [an error occurred while processing this directive]
Ответ:
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено Igor2 12 февраля 2002 г. 17:13
В ответ на: IAR C for AVR , кто подскажет как в сегменте EEPROM разместить переменные в нужном месте, а не где компилятору заблагорассудится?.. отправлено OverMem 12 февраля 2002 г. 15:47

Consider these declarations:
__eeprom int i1 = 0xFFFF;
__eeprom const int i2 = 0xFFFF;
__eeprom __no_init int i3;
__eeprom __no_init int i4@0x10; //address=0x10
__eeprom const int i5@0x12 = 0xFFFF; //address=0x12

The variables i1
and i2
will be stored in the EEPROM_I
segment. They will be initialized at program download, but not reinitialized on a program reset.

The variable i3
will be stored in the EEPROM_N
segment and is not initialized at program download or a program reset.

The variables i4
and i5
will be stored in the EEPROM_AN
segment. Only i5
will be initialized at program download. None of the variables will be reinitialized on a program reset.

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru