*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'test'
compiling core_cm0.c...
compiling system_M051Series.c...
assembling startup_M051Series.s...
compiling MAIN.c...
compiling hw_config.c...
Source Files\hw_config.c(118): warning: #550-D: variable "errdata" was set but never used
uint8_t errdata;
Source Files\hw_config.c: 1 warning, 0 errors
compiling variables.c...
compiling modbus0.c...
compiling crc16.c...
compiling 12864_s.c...
compiling DrvSYS.c...
compiling DrvGPIO.c...
compiling DrvTIMER.c...
compiling DrvUART.c...
compiling retarget.c...
linking...
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching 12864_s.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_m051series.o(STACK).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching drvtimer.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching libspace.o(.bss).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching drvtimer.o(.bss).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching variables.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching variables.o(.bss).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching system_m051series.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching drvgpio.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching drvsys.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching drvuart.o(.data).
.\Obj\test.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_m051series.o(HEAP).
.\Obj\test.axf: Error: L6407E: Sections of aggregate size 0x1edc 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 13 error messages.
".\Obj\test.axf" - 13 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed: 00:00:03
方法一:
问题解析:优化等级的问题,-O3是优化级别最高的,有可能代码会出问题。 建议仔细测试功能。 不同优化等级,占用代码量和运行速度是不一样的,-O3最快,代码量最少,但是又最容易出问题。
修改方法:修改MDK优化等级(如下图),仔细测试功能;
|