Skip to content

Sample code for support of PowerPC development with GCC and NXP eval board TRK-USB-MPC5643L

License

Notifications You must be signed in to change notification settings

PeterVranken/TRK-USB-MPC5643L

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TRK-USB-MPC5643L — Open Source Toolchain Support for a low-cost PowerPC Evaluation Board

Introduction

This project aims at supporting the software development for the NXP PowerPC microcontroller MPC5643L with professional yet free of charge software development tools. It’s not difficult to find a GNU C cross compiler for the PowerPC architecture in the Internet but as a matter of experience it’s quite cumbersome to make it produce a flashable and running piece of code. Furthermore, if we have produced such a binary file then it’s still another matter to flash it and to find and setup a debugger to step through it.

TRK-USB-MPC5643L
Figure 1. The NXP evaluation board TRK-USB-MPC5643L

None of these tasks can be solved in general. There are too many dependencies on the host machine, the tool revisions, the specific chip from the PowerPC family and the hardware board it is mounted on. Any imaginable configuration of these will need particular investigation and specific solutions. This project focuses on a single such configuration and offers a clean, professional level solution for that one. It might be possible or not possible, more or less difficult or more or less effortful to migrate this solution to other revisions or ports of GCC or other derivatives from the microcontroller family but this is considered your responsibility and out of scope of this project.

An important exception is the choice of the host machine. We don’t expect problems with Linux. GCC is anyway a native UNIX tool, Cygwin is obsolete by nature, the CodeWarrior is available for Linux, too, and the makefiles used in this project have been designed to run under Linux. Please note, that this has not been tested yet.

The configuration for this project is:

Microcontroller

NXP PowerPC MPC5643L

Evaluation board

NXP TRK-USB-5643L

Host

Windows 10

C compiler

powerpc-eabivle-4.9.4-BLD-1607

Unix tools

Cygwin

Flash tool

NXP CodeWarrior 10.7[1]

Debugger

(same as flash tool)

The project presents a number of code samples for this hardware and toolchain configuration. All samples are intended to support your software development. They are no fully elaborated, functional applications but they offer high quality building blocks for a true application. The next section gives an overview.

The samples

The most prominent embedded sample is the blinking LED, called "startup" in this project. While it is not of any use as such it does contain a lot of reusable stuff for real development: As there is the toolchain setup (compiler, linker, flash tool, debugger), a powerful, generic, fully reusable makefile and a clean piece of startup code — either in Book E or VLE instruction set — , which will suffice for most applications. Remove the LED blink code and start writing your application but don’t loose time with setting up your development environment.

"printf" adds a serial communication interface with a terminal program running on the host computer that can be used with formatted output through the C library functions printf and Co.

"ADC" adds the reusable implementation of an analog input driver. Furthermore it provides a reusable module for reading the test and calibration data page of the MPC5643L.

"RTOS" is the very lean implementation of a reusable real time operating system offering the functionality similar to an OSEK/VDX kernel of conformance class BCC1 or BCC2.

iconSafeRTOS asColoredIcon "safe-RTOS" is the not so lean technically ISO 26262 compliant variant of the previous with an additional process and privileges management concept that implements the freedom-from-interference paradigm.

"kernelBuilder" is an assembler written software platform that provides a C API for interrupt processing, system calls and context switches: Design your own RTOS in plain C, without (inline) assembler and in a race condition free coding paradigm.

"RTuinOS" is the proof of concept of kernelBuilder: RTuinOS, the event based Real Time Operating System (RTOS) for Arduino, could be ported to the e200z4 core with a surprisingly little amount of changes.

All samples are self-contained. There are some common elements, which are same in some or all samples, like startup code and makefile. It would be natural to put them in a shared directory and reuse them across the samples. We decided not to do so in order to make the reuse of the samples as simple as possible. Once you have installed the tools you will be able to copy any sample to an arbitrary local directory and either run the makefile from the command line or use the CodeWarrior IDE with our Eclipse project file to build the sample. The CodeWarrior IDE is in either case required to flash and debug the built software.

Installation

Please, find more details on installing the required development tools in Wiki page Tools and Installation.

Documentation

  • The Wiki pages of this project tell more about download and installation of the tools and how to run the samples

  • Each sample has a "readMe", which outlines the functionality and its particular added value

  • The code and scripts are documented by source code comments

  • Most relevant documentation about the evaluation board and the microcontroller has been collected in folder doc and much, much more can be found in the Internet


1. Check page Tools and Installation for notes on downloading and using more recent versions of CodeWarrior

About

Sample code for support of PowerPC development with GCC and NXP eval board TRK-USB-MPC5643L

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published