一、现象:
进入调试之后程序要不就进入void HardFault_Handler(void),要么就是进入void MemManage_Handler(void),
二、原因:
cstack溢出。heap不够。
三、修改:
stm32f10x_startup.s
Stack_Size EQU 0x0001000
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 0x00008000