ARM: PNG support missing in Graphics Component
Information in this knowledgebase article applies to:
In my application I want to use the Graphics Component from the MDK-ARM middleware to display a PNG image. To do this I call e. g. the function GUI_PNG_DrawEx(). The source compiles fine. But at the link step the linker reports an error like this:
Example.axf: Error: L6218E: Undefined symbol GUI_PNG_DrawEx (referred from main.o).
The Graphics Component from the MDK-ARM middleware is based on the emWin library from Segger, which uses 'libpng'. The adaptation of this for the emWin library is separately available on the Segger website: www.segger.com/link/emwin_png.zip
Download this archive file and extract it somewhere. Then add all the source file relating to the Graphics Component version you have in use, preferably in a separate group, to the project and build again. The build should now be successful.
The files in the PNG source code generate a number of warnings, which could be suppressed by adding a option:
in the Options for Group - C/C++ - Misc Controls field.
Last Reviewed: Wednesday, June 3, 2015
of your data.