中级会员
 
- 积分
- 248
- 金钱
- 248
- 注册时间
- 2015-7-24
- 在线时间
- 32 小时
|
1金钱
MINI板STM32f103rbt6没有扩展内存,经查STM32f103rbt6的内置内存为20KByte。因此在malloc.h中设置
#define MEM_BLOCK_SIZE 32 //内存块大小32字节
#define MEM_MAX_SIZE 20*1024 //整个内存大小20K字节
#define MEM_ALLOC_TABLE_SIZE MEM_MAX_SIZE/MEM_BLOCK_SIZE //内存表大小为640
但是编译出错如下
compiling usmart_config.c...
compiling usmart_str.c...
compiling malloc.c...
linking...
..\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_stm32f10x_md.o(STACK).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f10x_md.o(HEAP).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching usmart_config.o(.data).
..\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 usmart.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching system_stm32f10x.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f10x_rcc.o(.data).
..\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 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).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching delay.o(.data).
..\OBJ\MALLOC.axf: Error: L6406E: No space in execution regions with .ANY selector matching key.o(.data).
..\OBJ\MALLOC.axf: Error: L6407E: Sections of aggregate size 0x5dc8 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 16 error messages.
"..\OBJ\MALLOC.axf" - 16 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:14
请问为什么????????????????????????????????
|
最佳答案
查看完整内容[请看2#楼]
当#define MEM_MAX_SIZE 20*1024 出错
当#define MEM_MAX_SIZE 19*1024 出错
当#define MEM_MAX_SIZE 18*1024 出错
当#define MEM_MAX_SIZE 17*1024 出错
当#define MEM_MAX_SIZE 16*1024 编译通过
|