8051 아키텍처 칩과 SDCC 컴파일러 용 C 프로그램을 작성하고 있습니다.왜 C 프로그램에서 구조를 사용하면 링크 오류가 발생합니까?
필자는 FilterStructure라는 구조를 가지고 있습니다.
내 코드는 내가 링크 오류
을 "? ASlink이-오류-수 영역 DSEG 내부 RAM에서 29 연속 바이트를 얻을 수 없습니다"를 얻을 몇 가지 이유를 들어
#define NAME_SIZE 8
typedef struct {
char Name[NAME_SIZE];
} FilterStructure;
void ReadFilterName(U8 WheelID, U8 Filter, FilterStructure* NameStructure);
int main (void)
{
FilterStructure testStruct;
ReadFilterName('A', 3, &testFilter);
...
...
return 0;
}
void ReadFilterName(U8 WheelID, U8 Filter, FilterStructure* NameStructure)
{
int StartOfName = 0;
int i = 0;
///... do some stuff...
for(i = 0; i < 8; i++)
{
NameStructure->Name[i] = FLASH_ByteRead(StartOfName + i);
}
return;
}
... 다음과 같습니다 FilterStructure testStruct;
이라는 줄을 주석 처리하면 오류가 사라집니다.
이 오류는 무엇을 의미합니까? 내가 그 일을 마치면 구조물을 버릴 필요가 있습니까?
난 내가 XDATA FilterStructure testStruct 내 구조체의 선언을 변경 여기에 다른 질문의 빛 –