stm32F103c8 keil移植FreeRTOS时内存不够

Posted dengqiangjiayou

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了stm32F103c8 keil移植FreeRTOS时内存不够相关的知识,希望对你有一定的参考价值。

stm32F103c8 (flash 64k、ram 20k)keil移植FreeRTOS时内存不够

linking...
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching led.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching tasks.o(.bss).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching imu.o(.bss).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching ano_dt.o(.bss).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching system.o(.bss).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching si24r1.o(.bss).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching paramsave.o(.bss).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching tasks.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching mpu6050.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching control.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching heap_2.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching power.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f10x_rcc.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching system_stm32f10x.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f10x_it.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching filter.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching si24r1.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching remotedata.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching ano_dt.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching main.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching delay.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching port.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching rand.o(.data).
.\\Objects\\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching stdout.o(.data).
.\\Objects\\Template.axf: Error: L6407E: Sections of aggregate size 0x57c 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 25 error messages.
".\\Objects\\Template.axf" - 25 Error(s), 0 Warning(s).
Target not created.

在链接阶段出错,解决办法如下:

修改FreeRTOSConfig.h中的配置:

#define configTOTAL_HEAP_SIZE		( ( size_t ) ( 17 * 1024 ) ) 

改为:

#define configTOTAL_HEAP_SIZE		( ( size_t ) ( 10 * 1024 ) ) 

再次编译即可通过

但是之后还会遇到内存过小任务不能切换或者不能调用,或者跳不出vTaskDelay函数,有待解决

以上是关于stm32F103c8 keil移植FreeRTOS时内存不够的主要内容,如果未能解决你的问题,请参考以下文章

uC/OS-II在STM32F103上的移植

STM32F103C8芯片流水灯

OLED程序在stm32f103上的移植

STM32F103C8的中断与DMA通信

STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案

STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案