LPC4088 Quickstart Board - emWin GUI


NXP has signed an agreement with Segger to make their graphical library emWin available free to use on NXP's microcontrollers. There is no royalty or license fees and it is possible to use for both personal and commercial use. More information can be found on the project page at lpcware.com.


Please note that everyone that wants to use the emWin library must download it from NXP's community site and accept the terms and conditions when installing the library. This means that it is not allowed to distribute the library to others, for example, by publishing an mbed application or library (as long as you keep your application and library private it is okay). Everyone must import the emWin library themselves after having accepted the terms and conditions. Instructions are available below of how to import emWin.

How to Import the Library

  1. Begin by downloading the emWin library from lpcware.com. Please note that you need to download the library that has been compiled with Hardware floating point (when writing these instructions version 5.22 was available).
  2. Unpack and run the exe file. While doing this you have to accept the terms and conditions.
  3. When the terms and conditions have been accepted you will get a new zip file. Unpack this file.
  4. For version 5.22 you will get the directories: emWin_Config, emWin_header, and emWin_library.
  5. Pack (zip) the content of emWin_header and name the file emwin.zip. Please note that the content should be in a flat structure, i.e., no directory, only the header files.
  6. Go to emWin_library/uVision_4 and rename emWin_m4fp.lib to emWin_m4fp.ar. This must be done for the online compiler to treat this file as a pre-compiled library. The file extension ".lib" has a special meaning in the online compiler so it must be changed to ".ar". Put emWin_m4fp.ar in a zip file named emwin_lib.zip.
  7. Create an application in the mbed compiler. The first time you do this it is recommended that you start with one of the emwin examples, such as app_emwin1 or app_emwin2_pos.

    Import programapp_emwin1

    Example that shows how to use the ewgui wrapper classes in combination with Segger's emwin library.

    Import programapp_emwin2_pos

    Example that shows how to use emWin. This example is based on NXP's POS demo available at lpcware.com

  8. Use the import wizard in the online compiler to Import emwin.zip /media/uploads/embeddedartists/mbed_import.png
  9. Do the same for emwin_lib.zip and you will have a project structure as shown in the picture below. You can now build the application.



Once again please note that you may NOT publish this application and making the emwin related libraries available for others. Everyone that wants to use emWin must accept the terms and conditions when downloading and installing the library from NXP's community site lpcware.com.


The ewGUi library illustrates one example of how to wrap the emWin C library in C++ classes. It is by no means a complete library and only provides a few of the many emWin widgets as C++ classes. The most important files are emwin_port.cpp and the base class EwGui.cpp which tries to hide the emWin porting layer. When creating an application that wants to use emWin you must subclass EwGui. The file EwGuiImpl.cpp in app_emwin1 shows how such a subclass can look like.

It is not a requirement to use the wrapper classes in order to use emWin. It is, however, recommended to at least use the porting layer (EwGui) and then you can directly use the emWin C API.

The main documentation is the one provided with emWin. Only minor clarifications are added to the ewGUI classes.

Demo Screenshots

The first screenshot shows app_emwin1 which is just a simple window with a checkbox, a button and a drop-down list. The second screenshot is app_emwin2_pos which shows NXP's POS demo.

/media/uploads/embeddedartists/emwin_demo_7inch_400.png /media/uploads/embeddedartists/emwin_pos_demo_7inch_400.png

6 comments on LPC4088 Quickstart Board - emWin GUI:

25 Mar 2014

Hello; i tried both programs with quick start board intsalled on based board ( http://www.embeddedartists.com/products/boards/lpc4088_qsb_bb.php) and same panel as shown above.

Both programms worked at fifrst, but now i have the following situation.

After the end of the calibration i only the the "first screen" , as shown in the above pictures,for a short while and then the i see a blank screen.

What can be the reason for this beaviour ?

Thanks in advance


09 Apr 2014

It is difficult to say what the reason behind your problem might be. Have you tested with any of the other graphics related applications (app_gfx, app_lcdboard_xxx)?

I think we may need more investigations so it is probably better if you contact our support by using the problem report form on our website. If we find the solution to your problem we can later post it here.


13 Apr 2014

I got the same issue, randomly the samples worked or worked not. The dialog appears for a short moment and is cleared or freezes on the first touch. It looks like the problem is the uninitialised structure _touchState in EwGui.cpp. The 'Layer' member is not set and it depends on what is in the memory. This fix works, but even better would be an init of the structure with a memset().

EwGui.cpp line 22:

void EwGui::execTouch() {
    int32_t x = 0, y = 0, z = 0;

    getTouchValues(&x, &y, &z);

    _touchState.x = x;
    _touchState.y = y;
    _touchState.Pressed = (z != 0) ? 1 : 0;
    _touchState.Layer = 0;
14 Apr 2014

Thanks Johannes. I have added a memset to the constructor to initialize _touchState. The ewgui library has been updated.

If you find more problems and need a fast response please use the problem report form on our website. We usually response within 24 hours. On this forum it can take several days.


Andreas @ Embedded Artists

18 Nov 2015

Hello, i use app_emwin2_pos to build my own application. It works perfect in the online compiler, but when try to use in LPC-expresso the CAN-Bus dont work. I import the emwin-libary (not keil) for lpc-expresso, i think maybe the libary is buged. The Rest of my app works great, only CAN_BUS is the Problem.

Any Ideas?

06 Dec 2015

Could you help me getting started with stemwin for stm32f429 discovery?

Please log in to post comments.