ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Воскресенье
7 июля
197505 Топик полностью
vitalka (12.06.2010 01:03, просмотров: 169) ответил FDA на PIC18F4620, компилятор MCC18. Объявляю массив размером 1024 байта (char LCD [128][8]), компилятор ругается: "can not fit the section". Что за фигня?
1. The object must be allocated into its own section using the #pragma idata or  #pragma udata directive. #pragma udata buffer_scn static char buffer[0x180]; #pragma udata 2. Accesses to the object must be done via a pointer. char * buf_ptr = &buffer[0]; ... // examples of use buf_ptr[5] = 10; if (buf_ptr[275] > 127) ... 3. A new region that spans multiple banks must be created in the linker script. Linker script before modification: DATABANK NAME=gpr2 START=0x200 END=0x2FF DATABANK NAME=gpr3 START=0x300 END=0x3FF Linker script after modification: DATABANK NAME=big START=0x200 END=0x37F PROTECTED DATABANK NAME=gpr3 START=0x380 END=0x3FF 4. The object’s section (created in Step #1) must be assigned into the new region (created in Step #3). Add a SECTION directive to the linker script. SECTION NAME=buffer_scn RAM=big