Embedded Artists


We are the leading providers of products and services around prototyping, evaluation and OEM platforms using NXP's ARM-based microcontrollers.

You are viewing an older revision! See the latest version

LPC4088DM Software Overview

The software bundle that is provided to give you a flying start is based on the MBED framework. As the MBED framework is constantly evolving it happens that it from time to time is broken. To work around this and to make it easier for you, the user, we have selected a number of components and tested them so that they work well together. Normally the binary mbed library is used and not mbed-src, but in the software bundle that is provided we have chosen to use the mbed-src so that the source code is available in all exported projects. This has the advantage that you can modify anything to fit your needs and (although not recommended) you can create the project files yourself to use with any future compiler. If we had chosen the binary mbed library then you would have been stuck with the compiler you were using at the time you exported the project.

Why use a Software Bundle?

  1. It will give a Flying start
  2. Selected libraries have been tested to work together
  3. Source, instead of binary version, of the mbed library to make sure exported programs are complete (i.e. work even if mbed disappears)
  4. Modified standard libraries to enable features otherwise not exposed (or to fix bugs)
  5. Hide some hardware APIs behind a BIOS

How do I use the Software Bundle?

The easiest way to use any of the components is to open the online compiler and click on the New Program button. Select the LPC4088 Display Module as target and then select one of the available templates to get started.

If you prefer to setup everything yourself instead of using the templates then:

  1. Import the library into your project by clicking the Import button above
  2. Copy the dm_board_config.h.txt file into the root of your project and rename it to dm_board_config.h
  3. Modify the dm_board_config.h to match your requirements
  4. Create a main.cpp file like this:

main.cpp

#include "mbed.h"
#include "DMBoard.h"

void main() {
  DMBoard::BoardError err;
  DMBoard* board = &DMBoard::instance();
  RtosLog* log = board->logger();
  Display* disp = board->display();
  
  do {
    err = board->init();
    if (err != DMBoard::Ok) {
      log->printf("Failed to initialize the board, got error %d\r\n", err);
      break;
    }

    // Everything initialized ok, add your code here

  } while(false);

  if (err != DMBoard::Ok) {
    log->printf("\nTERMINATING\n");
    mbed_die();
  }  
}

What is in the Software Bundle?

The software is divided into a couple of libraries:

DMSupportThis is the main library
DMBasicGUIAddon containing:
NXP SWIM GUI library
Basic app framework
Basic SlideShow framework
DMemWinAddon containing the porting layer for the emWin Graphical Library from Segger
ScriptsPython scripts to help with some tasks

DMSupport

This is the core of the software bundle as it holds the mbed code itself as well as the code to initialize and use all periperherals.

Import libraryDMSupport

A board support package for the LPC4088 Display Module.

The library contains the following libraries:

EthernetInterfaceA library providing network connectivity(wiki)
FATFileSystemA library to handle FAT file systems(wiki)
HttpServerA library providing a basic webserver(wiki)
USBDeviceA library with the USB device stack(wiki)
USBHostA library with the USB host stack(wiki)
mbed-rtosThe official RTOS library from mbed(wiki)
mbed-rpcThe official RPC (Remote Procedure Call) library from mbed(wiki)
mbed-srcThe offical mbed core library(handbook)

In addition to the libraries above DMSupport also includes:

BIOSHardware independent initialization of display and touch controller(wiki)
DisplayInterface to the display(wiki)
TouchInterface to the touch controller(wiki)
FileSystemsFile systems for USBDevice, RAM, uSD cards and QSPI flash(wiki)
MemoryDrivers for internal and external EEPROMs, SDRAM and QSPI flash(wiki)
CRCAccess to the onchip checksum calculator(wiki)
LoggingRTOS compatible printf(wiki)
RegistryPersistant handling of key-value pairs(wiki)
DMBoardHandles initialization of everything(wiki)
dm_board_config.hConfiguration of features(wiki)
MeasMacros to control GPIO pins for time sensitive measurements(wiki)

DMemWin - emWin Graphical Library

This is one of the GUI libraries to help you create a better user interface on the display by giving you access to high level widgets rather than drawing each pixel yourself.

LPCWare describes emWin like this:

The high performance emWin embedded graphics library developed by SEGGER Microcontroller is now offered by NXP Semiconductors in library form for free commercial use with NXP microcontrollers.

Follow the link above to read more about what is available in the emWin library supplied by NXP.

To read more about emWin as well as see lots of examples on the Segger site.

Import libraryDMemWin

Support for the emWin GUI library from Segger.

Note

The emWin library cannot be used in the online compiler for legal reasons. Import the DMemWin library into you project by clicking on the Import button above, and then read the readme.h file in the library for further instructions.

Note

The emWin library comes with a GUI Builder to help you to create your user interface. To get the tool you have to install one of the Board Support Packages found here.

Scripts

Here we present some python scripts to help with common tasks. All scripts are written and tested in 2.7.6 but should work in 2.x versions higher as well. The scripts are probably incompatible with 3.x and above.

Installing python is out-of-scope, but instructions can be found here.

ScriptPrerequisitesDescription
uv4reorganizer.pyN/AWhen exporting from the online compiler to Keil uVision 4, the resulting project file adds all source files directly under the src node in the project tree view. This makes it very difficult to find your own files.

Usage:
python uv4Reorganizer.py yourproject.uvproj

The result is a yourproject.uvproj.pyout file. Rename the generated file to yourproject.uvproj to replace the original project file before starting uVision for the first time.

The new project will have a better grouping of files in the project tree view.
img2c.pyN/AThis script scans the current folder for all *.png, *.bmp and *.raw files and creates c-style arrays for each file.

Usage:
python img2c.py

The result is image_data.h and image_data.c ready to be included in your project. For examples of the output see basic_image_data.h and basic_image_data.c.

All wikipages