打印

新手问题:红牛开发板 液晶屏程序,空间不够怎么处理?

[复制链接]
5340|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
赵小木2012|  楼主 | 2011-5-17 22:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
问题:准备用红牛开发板的 TFT屏显示图像的,申请了一个大数组,结果编译的时候提示如下:
linking...
.\Obj\STM3210E-EVAL.axf: Error: L6406W: No space in execution regions with .ANY selector matching Section .bss(main.o).
.\Obj\STM3210E-EVAL.axf: Error: L6407W: Sections of aggregate size 0x14400 bytes could not fit into .ANY selector(s).


附上程序:
static vu32 TimingDelay = 0;
GPIO_InitTypeDef GPIO_InitStructure;
ErrorStatus HSEStartUpStatus;
extern unsigned char Image_Table[];
unsigned char Gray_Table[82944];

/* Private function prototypes -----------------------------------------------*/
void RCC_Configuration(void);
void InterruptConfig(void);
void NVIC_Configuration(void);
void Delay(vu32 nCount);
void Decrement_TimingDelay(void);
void SysTick_Config(void);

/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* Function Name  : main
* Description    : Main program.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
int main(void)
{
u32 i;
#ifdef DEBUG
  debug();
#endif
  /* System Clocks Configuration */
  RCC_Configuration();   
   /* Interrupt Configuration */
  InterruptConfig();
  /* Configure the systick */   
  SysTick_Config();
  /* Initialize the LCD */
  STM3210E_LCD_Init();
  /* Clear the LCD */
  LCD_Clear(Black);
  LCD_SetDisplayWindow(00, 00, 239, 319);     
  LCD_WriteBMP(48, 64, 144, 192, Image_Table);
  for(i=0;i<100000;i++);

BMPtoGray(Image_Table,Gray_Table);
  
   
  LCD_Clear(Black);
  LCD_SetDisplayWindow(00, 00, 239, 319);     
  LCD_WriteBMP(48, 64, 144, 192, Gray_Table);         
  }

我的芯片是STM32F103ZET6,SRAM是64k的吧,请各位大侠指点~~~~~~~~~
沙发
ilovezeno| | 2011-5-17 22:30 | 只看该作者
unsigned char Gray_Table[82944];
。。。。。。。。。。。。。。。。。。。。。。。。

82kb的数组阿。。。声明成const放flash里吧。。。。

使用特权

评论回复
板凳
ilovezeno| | 2011-5-17 22:32 | 只看该作者
发现你的程序是要改动gray table的。。。。
这样 你设置个乒乓双缓冲,转换1/4,DMA传1/4到lcd,同时转换下面的1/4,如此反复,搞定图像。。。缓冲大小取决于你的可用ram。。。。

使用特权

评论回复
地板
赵小木2012|  楼主 | 2011-5-18 09:46 | 只看该作者
3# ilovezeno
:handshake 谢谢~我去试试看

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

14

帖子

1

粉丝