Stm32f103c8t6 transplants UCOS-Ⅲ memory overflow bug

Project scene:

BUG log when porting UCOS to stm32f103c8t6


Problem Description:

c8t6 transplantation ucos memory overflow error in
the error code is as follows:

.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching lib_mem.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_cfg_app.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_var.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f10x_md.o(STACK).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching app.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f10x_md.o(HEAP).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_var.o(.data).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching usart.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching libspace.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching cpu_core.o(.data).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f10x_rcc.o(.data).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching cpu_core.o(.bss).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching usart.o(.data).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching lib_mem.o(.data).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_prio.o(.data).
.\Objects\ISO-STM32.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_cpu_c.o(.data).
.\Objects\ISO-STM32.axf: Error: L6407E: Sections of aggregate size 0x8960 bytes could not fit into .ANY selector(s).

Cause Analysis:

An error is reported here: There is no space for the program after lib_mem is executed, indicating that the memory is not enough. The previous program uses a lot of memory, which occupies the space of the later program. According to the configuration of the source code, the size of the memory pool is configured in lib_cfg.h. The memory occupied here is large. The source code port is configured with 27k by default, while the sram of c8t6 is only 20k, so the memory is seriously exceeded
Insert picture description here


solution:

Modify the memory pool size directly, I set it to 5K here, that is, change 27 to 5
and the compilation effect after the change is as follows:

Insert picture description here

No error is reported after the change, and the transplant is successful!

Guess you like

Origin blog.csdn.net/qq_45396672/article/details/110222577