1k views
in System Integration by
What steps are necessary to integrate the generate source code of the UI application into the build process of my new platform? How to integrate the Platform Package? How to adapt the makefile?

1 Answer

0 votes
by

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:

  • Copy all files from the directory {ProgramFiles}\EmbeddedWizard\Platforms\PlatformXYZ\Generic\RGBA8888\GFX into your build system into the subdirectory /GFX. These are the files of the Graphics Engine. In case you want to make adaptations to the underlying graphics system, you can do this within the files ewextgfx.c and ewextgfx.h.

    Please avoid any modifications within all other files delivered within the Graphics Engine! 

    Add all C-files into your makefile:
      # 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                                              \
  • Copy all files from the directory {ProgramFiles}\EmbeddedWizard\Platforms\PlatfromXYZ\Generic\RTE into your build system into the subdirectory /RTE. These are the files of the Runtime Environment. In case you want to make a few adaptations to the operating system, you can do this within the files ewextrte.c and ewextrte.h.

    Please avoid any modifications within all other files delivered within the Runtime Environment! 

    Add all C-files into your makefile:
      # 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.

 

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...