共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电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
“我踩过的那些坑”主题活动——第001期 | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
多组DCTODC电源方案被打赏50分 | |
【我踩过的那些坑】STM32cubeMX软件的使用过程中的“坑”被打赏50分 | |
新手必看!C语言精华知识:表驱动法被打赏50分 | |
【我踩过的那些坑】杜绑线问题被打赏50分 | |
【我踩过的那些坑】STM32的硬件通讯调试过程的“坑”被打赏50分 | |
【我踩过的那些坑】晶振使用的问题被打赏100分 | |
【我踩过的那些坑】电感选型错误导致的处理器连接不上被打赏50分 | |
【我踩过的那些坑】工作那些年踩过的记忆深刻的坑被打赏10分 | |
【我踩过的那些坑】DRC使用位置错误导致的问题被打赏100分 | |
我踩过的那些坑之混合OTL功放与落地音箱被打赏50分 |