Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedded firmware

Minimal bare-metal C project for PowerPC e200 / NXP MPC57xx targets.

External dependencies

Required:

  • Meson (project requires Meson >= 1.1)
  • Ninja
  • A PowerPC cross toolchain available at /opt/powerpc-unknown-eabi (expected target prefix: powerpc-unknown-eabi-*)
  • A host C toolchain for native helper/test binaries (cc, gcc-ar, ld, etc.)

Optional:

  • Doxygen (only required when with_doc=true)

Native and cross files

This project uses both a native file and a cross file when configuring the build:

  • support/meson/native-linux.ini configures tools for the host machine (Linux x86_64). Meson uses this for native targets such as unit tests built with native: true.

  • support/meson/powerpc-unknown-eabi.ini configures the embedded target toolchain and target machine properties (bare-metal PPC, big-endian, e500mc).

Typical usage:

meson setup builddir \
	--native-file support/meson/native-linux.ini \
	--cross-file support/meson/powerpc-unknown-eabi.ini

If your toolchain is not in /opt/powerpc-unknown-eabi, create your own cross file from support/meson/powerpc-unknown-eabi.ini and update toolchain_root.

Meson options (meson.options)

The project defines two boolean options:

  • with_test (default: false) enables unit tests (currently zlib module tests).

  • with_doc (default: false) enables Doxygen documentation generation.

Examples:

# Enable tests
meson setup builddir \
	--native-file support/meson/native-linux.ini \
	--cross-file support/meson/powerpc-unknown-eabi.ini \
	-Dwith_test=true

# Enable docs
meson setup builddir \
	--native-file support/meson/native-linux.ini \
	--cross-file support/meson/powerpc-unknown-eabi.ini \
	-Dwith_doc=true

To inspect configured values:

meson configure builddir

Configure, build, and test

  1. Configure
meson setup builddir \
	--native-file support/meson/native-linux.ini \
	--cross-file support/meson/powerpc-unknown-eabi.ini

For an existing build directory, reconfigure with:

meson setup builddir --reconfigure
  1. Build
meson compile -C builddir

Main artifacts include the firmware executable (oll) and map file (oll.map) in the build directory.

  1. Run tests (when with_test=true)
meson test -C builddir --print-errorlogs
  1. Build documentation (when with_doc=true)

Documentation is built as part of the default build. You can also invoke:

meson compile -C builddir doc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages