OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 5051|回复: 2

求互,求解释关于例子中MALLOC内存大小的定义的问题。

[复制链接]

15

主题

40

帖子

0

精华

初级会员

Rank: 2

积分
198
金钱
198
注册时间
2015-6-9
在线时间
22 小时
发表于 2016-3-10 21:16:11 | 显示全部楼层 |阅读模式
5金钱
在F407的开发指南中讲到:
MEM1_MAX_Size 100*1024,但是在参数手册中看到这款芯片的SRAM分两部分,112K以及16K。那这个SIZE为什么不能设置大一些呢?在实践中发现,如果设置大,将导致编译出很多错。
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching malloc.o(.bss).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f429_439xx.o(STACK).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f429_439xx.o(HEAP).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching usart.o(.bss).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching libspace.o(.bss).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching malloc.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching system_stm32f4xx.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f4xx_rcc.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching lcd.o(.bss).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching usart.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching lcd.o(.data).


我猜测一点原因是因为其他的程序也要占空间,所以不能把内存都占满,是这样吗?
如何能最大的设置这个数字呢?
谢谢~~

最佳答案

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165371
金钱
165371
注册时间
2010-12-1
在线时间
2110 小时
发表于 2016-3-10 21:16:12 | 显示全部楼层
回复

使用道具 举报

14

主题

1592

帖子

0

精华

资深版主

Rank: 8Rank: 8

积分
2622
金钱
2622
注册时间
2014-7-17
在线时间
350 小时
发表于 2016-3-11 10:22:45 | 显示全部楼层
应该是这样了!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-2-26 09:38

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表