共3条
1/1 1 跳转至页
ICCAVR ICCAVR奇怪错误,请教。
问
编译时出现!E_1IG.AAA(0):area 'bss' not large enough 的错误提示,我在硬件中是加了扩展RAM的,MCUCR的相应位也都置了了位,请问这是怎么回事。这个提示是在编译输出文件时出现的。
答 1:
回复area bss: 此区域包含未初始化的C全局变量,按标准这些变量在启动时初始化为0;
另在编译的Project下是否设置为External SRAM; 答 2: 我在.c里设了External SRAM,.s是用这个.c编译的。 答 3: 我把所有变量都初始化了。现在出错信息变成了!E_26K.AAA(0):area 'bss' not large enough 答 4: 这是我的源程序//ICC-AVR application builder : 2004-2-14 14:28:19
// Target : 8515
// Crystal: 8.0000Mhz
#include "io8515v.h"
#include "macros.h"
int num_timer1=0;
int state_timer1=0;
int num_timer0=0;
int state_timer0=0;
int buf_com10[559]={0*559};
int buf_com2[50]={0*50};
int buf_com3[10]={0*10};
int buf_com4[50]={0*50};
void delay(void) //
{
}
void com1(void) //
{
}
void com2(void) //
{
}
void com3(void) //
{
}
void com4(void) //
{
}
void port_init(void)
{
PORTA = 0xFF;
DDRA = 0x00;
PORTB = 0x92;
DDRB = 0x6D;
PORTC = 0xFF;
DDRC = 0x00;
PORTD = 0xD3;
DDRD = 0x2C;
}
//TIMER1 initialisation - prescale:1024
// desired value: 6Sec
// actual value: 6.000Sec (0.0%)
void timer1_init(void)
{
TCCR1B = 0x00; //stop
TCNT1H = 0x48; //setup
TCNT1L = 0xE5;
OCR1AH = 0xB7;
OCR1AL = 0x1B;
OCR1BH = 0xB7;
OCR1BL = 0x1B;
TCCR1A = 0x00;
TCCR1B = 0x05; //start Timer
}
#pragma interrupt_handler timer1_ovf_isr:7
void timer1_ovf_isr(void)
{
TCNT1H = 0x48; //reload counter high value
TCNT1L = 0xE5; //reload counter low value
}
//UART0 initialisation
// desired baud rate: 9600
// actual: baud rate:9615 (0.2%)
void uart0_init(void)
{
UCR = 0x00; //disable while setting baud rate
UBRR = 0x33; //set baud rate
}
//call this routine to initialise all peripherals
void init_devices(void)
{
//stop errant interrupts until set up
CLI(); //disable all interrupts
port_init();
timer1_init();
MCUCR = 0x80;
GIMSK = 0x00;
TIMSK = 0x82;
SEI();
//re-enable interrupts
//all peripherals are now initialised
}
void operation(void)
{
}
void main(void)
{
}
答 5: 问题已经解决,谢谢!
另在编译的Project下是否设置为External SRAM; 答 2: 我在.c里设了External SRAM,.s是用这个.c编译的。 答 3: 我把所有变量都初始化了。现在出错信息变成了!E_26K.AAA(0):area 'bss' not large enough 答 4: 这是我的源程序//ICC-AVR application builder : 2004-2-14 14:28:19
// Target : 8515
// Crystal: 8.0000Mhz
#include "io8515v.h"
#include "macros.h"
int num_timer1=0;
int state_timer1=0;
int num_timer0=0;
int state_timer0=0;
int buf_com10[559]={0*559};
int buf_com2[50]={0*50};
int buf_com3[10]={0*10};
int buf_com4[50]={0*50};
void delay(void) //
{
}
void com1(void) //
{
}
void com2(void) //
{
}
void com3(void) //
{
}
void com4(void) //
{
}
void port_init(void)
{
PORTA = 0xFF;
DDRA = 0x00;
PORTB = 0x92;
DDRB = 0x6D;
PORTC = 0xFF;
DDRC = 0x00;
PORTD = 0xD3;
DDRD = 0x2C;
}
//TIMER1 initialisation - prescale:1024
// desired value: 6Sec
// actual value: 6.000Sec (0.0%)
void timer1_init(void)
{
TCCR1B = 0x00; //stop
TCNT1H = 0x48; //setup
TCNT1L = 0xE5;
OCR1AH = 0xB7;
OCR1AL = 0x1B;
OCR1BH = 0xB7;
OCR1BL = 0x1B;
TCCR1A = 0x00;
TCCR1B = 0x05; //start Timer
}
#pragma interrupt_handler timer1_ovf_isr:7
void timer1_ovf_isr(void)
{
TCNT1H = 0x48; //reload counter high value
TCNT1L = 0xE5; //reload counter low value
}
//UART0 initialisation
// desired baud rate: 9600
// actual: baud rate:9615 (0.2%)
void uart0_init(void)
{
UCR = 0x00; //disable while setting baud rate
UBRR = 0x33; //set baud rate
}
//call this routine to initialise all peripherals
void init_devices(void)
{
//stop errant interrupts until set up
CLI(); //disable all interrupts
port_init();
timer1_init();
MCUCR = 0x80;
GIMSK = 0x00;
TIMSK = 0x82;
SEI();
//re-enable interrupts
//all peripherals are now initialised
}
void operation(void)
{
}
void main(void)
{
}
答 5: 问题已经解决,谢谢!
共3条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |