微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 嵌入式设计讨论 > MCU和单片机设计讨论 > 请教一个UCGUI动态显示图像的问题

请教一个UCGUI动态显示图像的问题

时间:10-02 整理:3721RD 点击:
最近在用stm32f103vct6加UCGUI做一个涉及导航的项目,原理是通过蓝牙串口接收的数据显示导航状态图标(左转右转直行箭头什么的),所以编程的思路想用UCGUI的位图显示功能,把图标图像转换成C文件,然后通过对比数据加载不同图标,但是由于图标太多,编译总是通不过,提示溢出。代码简单呈现如下:
extern const GUI_BITMAP  bmturn_back;
extern const GUI_BITMAP  bmturn_branch_center;
extern const GUI_BITMAP  bmturn_branch_left;
extern const GUI_BITMAP  bmturn_branch_right;
//…………定义图像,很多,省略
extern const GUI_BITMAP  bmturn_tollgate;
const int ShowIcon(char *str,int x,int y) {
        GUI_BITMAP tt1;
        int re = 0;
        if (strcmp(str,"turn_back")) { tt1=bmturn_back; re = 1;};//对比串口传输数据,加载图像显示
        if (strcmp(str,"turn_branch_center")) { tt1=bmturn_branch_center; re = 1; };
        if (strcmp(str,"turn_branch_left")) { tt1=bmturn_branch_left; re = 1; };
        if (strcmp(str,"turn_branch_right")) { tt1=bmturn_branch_right; re = 1; };
        if (strcmp(str,"turn_branch_right_straight")){ tt1=bmturn_branch_right_straight; re = 1; };
        if (strcmp(str,"turn_dest")) { tt1=bmturn_dest; re = 1; };
        if (strcmp(str,"turn_front")) { tt1=bmturn_front; re = 1; };
        if (strcmp(str,"turn_left_2branch_left")) { tt1=bmturn_left_2branch_left; re = 1; };
        if (strcmp(str,"turn_left_2branch_right")) { tt1=bmturn_left_2branch_right; re = 1; };
        if (strcmp(str,"turn_left_3branch_left")) { tt1=bmturn_left_3branch_left; re = 1; };
        if (strcmp(str,"turn_left_3branch_middle")) { tt1=bmturn_left_3branch_middle; re = 1; };
        if (strcmp(str,"turn_left_3branch_right")) { tt1=bmturn_left_3branch_right; re = 1; };
        if (strcmp(str,"turn_left_back")) { tt1=bmturn_left_back; re = 1; };
        if (strcmp(str,"turn_left_side")) {tt1=bmturn_left_side; re = 1};
        if  (strcmp(str,"turn_left_side_ic")) { tt1=bmturn_left_side_ic; re = 1;}
        if (strcmp(str,"turn_left_side_main")) { tt1=bmturn_left_side_main; re = 1};
        if (strcmp(str,"turn_right")) { tt1=bmturn_right; re = 1};
        if (strcmp(str,"turn_right_2branch_left")) { tt1=bmturn_right_2branch_left; re = 1;}
        if (strcmp(str,"turn_right_2branch_right")) {  tt1=bmturn_right_2branch_right; re = 1;}
        if (strcmp(str,"turn_right_3branch_left")) { tt1=bmturn_right_3branch_left; re = 1;}
        if (strcmp(str,"turn_right_3branch_middle")) { tt1=bmturn_right_3branch_middle; re = 1;}
        if (strcmp(str,"turn_right_3branch_right")) { tt1=bmturn_right_3branch_right; re = 1;}
        if (strcmp(str,"turn_right_back")) { tt1=bmturn_right_back; re = 1;}
        if (strcmp(str,"turn_right_front")) { tt1=bmturn_right_front; re = 1;}
        if (strcmp(str,"turn_right_side")) { tt1=bmturn_right_side;}
        if (strcmp(str,"turn_right_side_ic")) { tt1=bmturn_right_side_ic; re = 1;}
        if (strcmp(str,"turn_right_side_main")) { tt1=bmturn_right_side_main; re = 1;}
        if (strcmp(str,"turn_tollgate")) { tt1=bmturn_tollgate; re = 1;}
        if (re==1) GUI_DrawBitmap(&tt1,x,y);
        return re;
}

超过13个就会编译溢出,大量报错如下:
.\Output\Tiky_uCGUI_DEMO.axf: Error: L6406E: No space in execution regions with .ANY selector matching lcdinfo0.o(i.LCD_GetYSize).
请问除了更改硬件配置或者设计,还有没有其他方法实现类似功能?

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top