打印
[STM32F1]

在MDK下更换启动文件

[复制链接]
190|7
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
在移植STM32的时候 虽然统一系列几乎可以通用,但是有时为了得到某款芯片具体功能,需要更换启动配置文件,这里以自己STM32F103ZET6换STM32F103VGT6为例,在做项目时发现内存不够用时:
报了如等等下错误:

.......
    ..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching gui_charline.o(i._Log2VisBuffered).
    ..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching guicc_888_index2color.o(i.LCD_Index2Color_888).
    ..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching guicc_8888.o(i._Color2Index_8888).
    ..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching guicc_8888_index2color.o(i.LCD_Index2Color_8888).
    ..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching iusefp.o(.text).
    ..\OBJ\MALLOC.axf: Error: L6407E: Sections of aggregate size 0x1977c bytes could not fit into .ANY selector(s).
    Not enough information to list image symbols.
    Not enough information to list the image map.
    Finished: 2 information, 0 warning and 706 error messages.
    "..\OBJ\MALLOC.axf" - 706 Error(s), 0 Warning(s).
    Target not created.


使用特权

评论回复
沙发
慢动作|  楼主 | 2023-7-28 00:32 | 只看该作者
在网上找到解决办法可以参照这个
链接:https://blog.csdn.net/gengyiping18/article/details/52640806
后来核对项目芯片发现VGT6这款芯片内存够用,只不过用的是ZET6
代码移植的,需要改配置文件。

使用特权

评论回复
板凳
慢动作|  楼主 | 2023-7-28 00:32 | 只看该作者
可以说共四步:
1)核查自己使用芯片对于的启动文件,找到芯片对于的启动文件,
关于型号与启动文件对映选择关系可以参照这个。
链接:https://blog.csdn.net/u012166958/article/details/80495901

使用特权

评论回复
地板
慢动作|  楼主 | 2023-7-28 00:32 | 只看该作者
2)找到启动文件,替换在工程下core(以MDK为例)文件夹下的启动文件(个人将startup_stm32f10x_hd.s更换startup_stm32f10x_xl.s),再Options of Target下(也就是俗称的魔法棒),选择和相同的芯片型号。

使用特权

评论回复
5
慢动作|  楼主 | 2023-7-28 00:32 | 只看该作者
3)在Options for Target >C/C++>Define将STM32F10X_HD,USE_STDPERIPH_DRIVER改成STM32F10X_XL,USE_STDPERIPH_DRIVER 这里要和core下的启动文件一致

使用特权

评论回复
6
慢动作|  楼主 | 2023-7-28 00:32 | 只看该作者
4)最后在Options for Target >Utilitiles>Settings下添加相匹配的FLASH

使用特权

评论回复
7
慢动作|  楼主 | 2023-7-28 00:32 | 只看该作者

完成以上4步在编译就可以了 这样就完成了换启动文件。

使用特权

评论回复
8
tdh03z| | 2023-7-28 07:35 | 只看该作者
做个记录,这个碰到过

使用特权

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

本版积分规则

55

主题

517

帖子

0

粉丝