The following explanations are intended to describe the integration in general rather than referring to a specific hardware platform. The concrete integration into your build environment depends on your toolchain and might differ from target to target. Let's assume that you managed to generate code for one of the provided samples from the directory \Examples_Mosaic20 (e.g. AnimationEffects) - for your platform 'PlatformXYZ'.
After the code generation, the resulting C files of the GUI application have to be compiled together with the source code of the Runtime Environment and the Graphics Engine for your hardware platform by using a target compiler (cross-compiler).
Please follow these steps:
# compile all files of the Graphics Engine (GFX)
EMWI_GFX_C = \
ewextbmp_RGBA8888.c \
ewextfnt.c \
ewextgfx.c \
ewextpxl_RGBA8888.c \
ewgfx.c \
ewgfxattrtext.c \
ewgfxcore.c \
ewgfxdriver.c \
ewgfxtasks.c \
# compile all files of the Runtime Environment (RTE)
EMWI_RTE_C = \
ewcolor.c \
ewdebug.c \
ewextrte.c \
ewobject.c \
ewpoint.c \
ewrect.c \
ewref.c \
ewresource.c \
ewscalars.c \
ewslot.c \
ewstring.c \
ewtimer.c \
- Copy all the generated code from the directory {UserDocumentFolder}\EmbeddedWizard\Examples_Mosaic20\AnimationEffects\PlatformXYZ into your build system into the subdirectory /APP. In principle, you can add all C files into your makefile. However, there is more convenient way: During code generation, Embedded Wizard generates a list of all C source files within the file ewfiles.inc. You can just add this file to your makefile. This makes it possible to use the same makefile for different GUI applications or samples without any modification!
# automatically compile all files generated by Embedded Wizard
include $(APP_EMWI_PATH)/ewfiles.inc
APP_EMWI_C = $(EMWIFILES)
- Add the above subdirectories to your include path within your makefile in order to find all necessary header files.
- Add EMWI_GFX_C, EMWI_RTE_C and APP_EMWI_C to the list of objects.
In theory, the makefile is now prepared so that the application could be compiled and linked. But there is still something missing… don't forget to integrate the generated code into your main.c file and to create a main loop in order to drive the UI application.