Apтём (12.12.2005 23:45, просмотров: 3935)
AVR + IAR + External RAM К AVR подключена внешняя память. Пытаюсь расположить в ней массивы данных следующим образом:
подключаю к проекту файл ram.c
<pre>
#include "CommonTypes.h"
#define UART_RX_BUFFER_SIZE 1024
#pragma location=0x1100
__no_init volatile unsigned char UartRxBuffer0[UART_RX_BUFFER_SIZE];
__no_init volatile unsigned char UartRxBuffer1[UART_RX_BUFFER_SIZE];
__no_init volatile unsigned char GPSEvntBuffer[512];
#define PACKET_RX_BUFFER_SIZE 512
__no_init volatile unsigned char PacketRxBuffer0[PACKET_RX_BUFFER_SIZE];
__no_init volatile unsigned char PacketRxBuffer1[PACKET_RX_BUFFER_SIZE];
__no_init volatile unsigned char PacketRxBuffer01[PACKET_RX_BUFFER_SIZE];
__no_init volatile unsigned char PacketRxBuffer11[PACKET_RX_BUFFER_SIZE];
__no_init volatile struct TAddressBookRecord AddressBook[8];
__no_init volatile struct TSendTimers SendTimers;
__no_init volatile struct TSendData SendData[ALARM_SEND_NUMBER];
__no_init volatile struct TSendCtrlData SendCtrlData;
__no_init volatile unsigned char SenderPacketBuffer[512];
</pre>
и создаю файл ram.h
<pre>
#include "CommonTypes.h"
#define UART_RX_BUFFER_SIZE 1024
#pragma location=0x1100
extern __no_init volatile unsigned char UartRxBuffer0[UART_RX_BUFFER_SIZE];
extern __no_init volatile unsigned char UartRxBuffer1[UART_RX_BUFFER_SIZE];
extern __no_init volatile unsigned char GPSEvntBuffer[512];
#define PACKET_RX_BUFFER_SIZE 512
extern __no_init volatile unsigned char PacketRxBuffer0[PACKET_RX_BUFFER_SIZE];
extern __no_init volatile unsigned char PacketRxBuffer1[PACKET_RX_BUFFER_SIZE];
extern __no_init volatile unsigned char PacketRxBuffer01[PACKET_RX_BUFFER_SIZE];
extern __no_init volatile unsigned char PacketRxBuffer11[PACKET_RX_BUFFER_SIZE];
extern __no_init volatile struct TAddressBookRecord AddressBook[8];
extern __no_init volatile struct TSendTimers SendTimers;
extern __no_init volatile struct TSendData SendData[ALARM_SEND_NUMBER];
extern __no_init volatile struct TSendCtrlData SendCtrlData;
extern __no_init volatile unsigned char SenderPacketBuffer[512];
</pre>
При компиляции выдаётся ошибка:
Error[e16]: Segment NEAR_N (size: 0x54f align: 0) is too long for segment definition. At least 0x2af more
bytes needed. The problem occurred while processing the segment placement command
"-Z(DATA)NEAR_N=_..X_EXT_NV_BASE-_..X_EXT_NV_END", where at the moment of placement the
available memory ranges were "DATA:E60-10FF"
Reserved ranges relevant to this placement:
DATA:100-39F CSTACK
DATA:3A0-79F RSTACK
DATA:7A0-88E NEAR_I
DATA:88F-E5F NEAR_Z
Как с этим бороться?
Что это вообще значит?