共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 跳转至页
回复
打赏帖 | |
---|---|
Buck电路工作在CCM模式下电感电流的计算公式是什么?被打赏5分 | |
buck电路工作原理被打赏5分 | |
基于MSPM0L1306的MODBUS-RTU协议通讯实验被打赏100分 | |
我想要一部加热台+多合一调试工具被打赏18分 | |
每周了解几个硬件知识+485硬件知识分享被打赏10分 | |
【换取手持数字示波器】树莓派PICO调试器官方固件本地化部署实践被打赏24分 | |
【换取手持数字示波器】分享一个KEIL无法识别CMSIS-DAP调试器的解决办法被打赏20分 | |
【换取手持数字示波器】分享一个自制的ArduinoNano扩展板底板被打赏23分 | |
【换取手持示波器】树莓派PICOW网页烟花被打赏18分 | |
【换取手持示波器】树莓派PICO逻辑分析仪被打赏16分 |