Microchip Graphics Suite (MGS) Cross-Platform for Linux®

Last modified by Microchip on 2025/08/11 14:03

Introduction

This user guide provides information on how to use the Microchip Graphics Suite (MGS) Composer and MGS Graphics Library to develop a Graphical User Interface (GUI) application for a Microchip MPU running an embedded Linux® system.

The user guide also provides information on how to port an existing MGS Harmony-based application to run on an embedded Linux system. 

Getting Started

System Requirements

A Linux®-based development environment is required. The following steps were tested on a PC running Ubuntu® 24.04.01 LTS version.

Make sure all the archive indices are up-to-date:

sudo apt-get update

Install the following dependencies for Linux-based development.

sudo apt install build-essential libsdl2-dev libsdl2-2.0-0 cmake pkg-config libinput-dev

Download the SDK

Use the terminal to download the SDK.

via GIT SSH:

git clone --recurse-submodules git@github.com:mchpgfx/mgs_xp.git

or via HTTPS:

git clone --recurse-submodules https://github.com/mchpgfx/mgs_xp.git

This will download the platform-specific system code and, as a submodule, the latest released version of the MGS repository used for MPLAB® Harmony-based projects. 

The repository's directory structure is as follows:

DirectorySub-FolderDescription
apps Contains the MGS Quickstart and demo applications
gfx Contains the MGS graphics library 
system Contains the platform-specific library and interface code
/gfxCross-platform versions of certain MGS library middleware
/linuxInterface code for Linux-based platforms

The SDK repository has the following branches based on the available example applications.

BranchDescription

dev

Contains Quickstart applications only. Use this to use Quickstart as a starting point for a new design
demo_applicationsContains the demo applications. Use this to build and run the demo applications

Building for Desktop Linux

Use the following steps to do a test build and to verify that all dependencies are installed for building and running an MGS application on the Linux desktop.

Run the following commands to set up the makefiles and build environment for a Linux desktop.

cd mgs_xp

mkdir -p build/host

cd build/host

cmake ../../

Do a test build by running make.

make all

Do a Test Run

When the build completes, the built Quickstart applications are in <mgs directory>/build/host/apps/quickstart/. In mgs_xp/build/host, run the application:

./apps/quickstart/mgs_quickstart

If successful, the application will launch in its own window.

MGS Quickstart Home Screen

Clicking on the Quick Start button on the bottom right of the screen will show another screen.

MGS Quickstart QR Code Screen

Your Linux development environment is now set up for desktop development.

Back to Top

Develop MGS GUI Applications for Embedded Linux

Refer to the topics below to start developing MGS GUI applications for embedded Linux.

Building MGS for Embedded Linux

This section provides information on how to build and run the application on a Microchip MPU running embedded Linux. 

Creating a New GUI Application using Microchip Graphics Suite (MGS) Quickstart

This user guide provides information on how to quickly develop a GUI application using MGS Quickstart as the starting point.

Creating a New GUI Application From Scratch

This user guide provides information on how to create a new GUI application from scratch.

Porting a Microchip Graphics Suite (MGS) Harmony Application

This user guide provides information on how to port an existing MGS Harmony application to build and run for Linux.

Back to Top

Other Topics

Back to Top