这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界» 论坛首页» 综合技术» 基础知识» ICCAVR ICCAVR奇怪错误,请教。

共3条 1/1 1 跳转至

ICCAVR ICCAVR奇怪错误,请教。

院士
2006-09-17 18:14:16 打赏
ICCAVR ICCAVR奇怪错误,请教。



关键词: ICCAVR 奇怪 错误 请教

院士
2006-12-22 22:43:00 打赏
2楼
问 编译时出现!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- AVRapplication 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: 问题已经解决,谢谢!

专家
2022-08-27 15:48:05 打赏
3楼

学习了解一下


共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册]