
September 21st, 2020 tools Creating an STM32MP1 Linux platform with Ac6 System Workbench for Linux Abstract Ac6 System Workbench for Linux is an integrated development environment for Linux embedded systems development. It provides a unified environment for the whole Linux‐based embedded system development process. Of course there are a few other solutions, some of them open‐source, but they need to combine independent tools, some command line based, some with a graphical user interface. System Workbench for Linux is the only one to integrate the whole process in a single tool. Furthermore it can be integrated with most microcontroller IDEs based on Eclipse, like System Workbench for STM32 or CubeIDE, to support development of asymmetric multicore systems combining the real‐time capacities of a microcontroller running a bare‐metal or RTOS‐based applications and the flexibility of a Linux‐ based application. Open Source Solutions Various free solutions exist on the market to support some of these different steps. Independent tools exist for application development, configuration management, platform building, etc. However, no global solution takes care of the whole embedded system development; moreover existing partial solutions for platform development have various pros and cons, as developed below. Buildroot o Relatively friendly tool which can build a cross‐toolchain and a Linux platform. o The platform configuration is menu‐driven into a terminal‐like interface (menuconfig). o It doesn’t manage the Linux kernel modifications, without manually changing the kernel configuration data provided by buildroot. o It cannot simply store a complete configuration, without manual manipulations to save and restore it. o Adding new packages to buildroot require modifying the buildroot tool itself, editing and modifying script files. o It doesn’t manage applications development. o It generates an “empty” platform without the applications which, later, requires manual integration. Assistance Conseil Systèmes SAS au capital de 138600€ ‐ SIRET 449 597 103 00026 ‐ RCS Nanterre ‐ NAF 6202A 21, rue Pierre Curie ‐ 92400 Courbevoie ‐ Tél : 01.41.16.80.10 ‐ Fax : 01.41.16.07.78 http://www.ac6‐tools.com Yocto o As buildroot, yocto build the toolchain and the Linux platform to be embedded. o Creating a new platform or adding new packages requires scripts edition in a specific language (bitbake). o It cannot simply store a complete configuration, without manual manipulations to save and restore it. o Yocto generates an “empty” platform without the applications which, later, requires manual integration. o There is an Eclipse plugin for application development targeting an existing Yocto platform. The main drawbacks of these solutions are they need to be complemented by additional tools that do not fit nicely in their architecture and do not provide an Integrated Development Enviroment but are mostly command line oriented. Furthermore they are needing quite a lot of specific Linux packages to be pre‐installed, with a complex installation procedure. System Workbench for Linux Ac6 System Workbench for Linux is an Integrated Development Environment that assists the developer in all steps of an embedded system realization: Kernel configuration and specific drivers development o Even when using a standard board, it is often needed to adapt the kernel configuration. o You will thus need to tailor the device‐tree, that System Workbench for Linux will automatically compile and deploy. o System Workbench for Linux also allows you to edit the default kernel configuration to fit your needs Choice of applicative packages to integrate in the system image. Building packages o These packages can use various build mechanisms (eg auto‐tools, make, cmake…), which are managed and automated. Development, test and validation of your application o To build a full system, System Worknech for Linux assists the development team in developing and debugging the application. o Being based on Eclipse, with automatic cross‐development adaptation, you may benefit of all the Eclipse ecosystem (Source Code Management Systems, syntactic editing, static code analysis, unit and integration tests…). 2) Support of asymmetric multicore environments Building the final image o Depending on the hardware platform, various options must be provided for deployment on diskless systems (NOR or NAND flashes, SD cards, eMMC…). o Update mechanisms are also supported by System Workbench for Linux. Configuration management of your embedded system o Embedded systems are often tailored for each specific customer o Configuration tools are included to be able to manage several variants of a base configuration Creating a Linux-based Embedded System with System Workbench for Linux: Ac6 System Workbench for Linux provides, in a single tool, all features needed for developing a Linux‐based embedded system. We will see here how to create a Linux platform and develop a simple application. Page 2 sur 14 Installing System Workbench for Linux Installing System Workbench for Linux is very simple and has a very small set of prerequisites: You must have a basic Linux development workstation, with a few tools available: o The GCC compiler, for C and C++ (provided by build‐essential on Ubuntu) o Pkg‐config o Git o Curl o Gawk o Fakeroot o Python You must download the System Workbench for Linux (sw4l in short) installer (may ask for sudo privileges if it needs to install packages): https://www.ac6‐tools.com/download.php?file=sw4l‐install.sh Then execute it (you may have to set the executable attribute by “chmod a+x installer” or execute it through bash) o By default it will propose to install SW4L in the directory $HOME/Ac6, but you may choose another one. o Be careful that you must have write permission in this directory o If the directory already exist, you will be asked if you want to install there, in which case you may replace an existing SW4L installation. You may then have to type your password for sudo, if some required packages are missing. If you don’t have sudo privilege, you should arrange for your system administrator to install the required packages. Then the installation should proceed unattended and, on gnome‐based desktops, should create a nice System Workbench for Linux launcher icon. By clicking this icon, you will start System Workbench for Linux and will be asked to select a workspace, in which you will develop all the elements attached to a given platform: the platform itself (only one per workspace), the linux kernel(s) and root file‐system(s); you may have several of these, for various product configurations for example. Page 3 sur 14 System Workbench for Linux license To be able to use System Workbench for Linux you will need a license. You can obtain an evaluation license by sending us an email with the MAC address of the machine on which you would like to evaluate System Workbench for Linux. The simplest way to get the proper MAC address is to start System Workbench for Linux then open the Preferences dialog, go to the System Workbench for Linux License tab and select the Ethernet interface to use: Once you get the license file, just reopen the same dialog and select the received file. Creating a basic platform The first thing to do to work under System Workbench for Linux will be to create a platform for your board. Here we will target an STM32MP1 evaluation board, the STM32MP157‐dk2 board: This board is a simple yet complete board supporting Linux on a dual Cortex‐A7 based System on Chip from STMicroelectronics. We will create an operational platform on this board and use it to develop a simple application (the ubiquitous “Hello World” application). This board includes a high resolution LCD screen and System Workbench for Linux supports the various Linux multimedia components, like gstreamer, as well as the most popular GUI toolkits like Qt. To create a platform, the simplest way to go is to import one of the predefined platforms and, if needed, to tailor it to your needs: Once the platform is created you may open the project and the ac6_platform_manifest.xml file: Page 4 sur 14 The Package Tree tab (pictured above) is the heart of System Workbench for Linux; apart from a few global actions most work will be done from this tab. Here you find all defined packages that may be included in root filesystems, with a tree representation of their dependencies; you can then build individual packages (and all those they depend upon if they were not yet built); here you can also add new packages, either from a library (as we will see later) or from a tarball obtained by exporting a package from another workspace). Then you may explore the various tabs of the platform project; apart from the the most interesting tab is the Linux Kernel and Rootfs tab: Here you can see that the default platform provides a single Linux kernel (a platform may propose several kernels, usually of various versions or configurations) and four root filesystems: Page 5 sur 14 minimal‐rootfs, which is a small filesystem, with just the most basic tools (provided by busybox) and the required watchdog daemon (to avoid spurious resets when due to the watchdog expiring), as well as the various tools and configuration needed to be able to debug application programs on the target. multimedia‐rootfs, containing also graphic multimedia packages: o gstreamer: the standard Linux multimedia handling framework o openCV: for image analysis, pattern recognition… o Qt5: the Graphical User Interface toolkit o tslib: the touch‐screen management library o Weston and Wayland for managing the graphical screen demo‐rootfs, a version of the multimedia rootfs supporting audio and including various demo programs for gstreamer, opencv and Weston full‐rootfs, a rootfilesystem including most non‐conflicting packages of the platform (at the notable exception of X11 as it also is based on Weston/Wayland) The other tabs allow to select the target board and build tool Configurations (Configurations) or edit the Platform Properties.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages14 Page
-
File Size-