型号:STM32F407ZGT6, Heap_Size EQU 0x00000700 可以编译通过,Heap_Size EQU 0x00000800 就出错了?
int main(void)
{
char* p1 = (char*) malloc(1024);
if(p1==NULL)
{
char a;
a='a';
}
}
Error: L6406E: No space in execution regions with .ANY selector matching system_stm32f4xx.o(.data).
请问是什么原因啊。
Stack_Size EQU 0x00000400
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
Heap_Size EQU 0x00000800
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
|