Skip to main content

A C/C++ toolset for bare metal & embedded developments

Project description

CI Issues

About

This framework provides facilities for automated execution of remote code. The core idea is, to utilize the debug symbols for automated testing, instead of developing custom tools. It does however limit some things to the itanium abi, i.e. gcc and clang.

At the current state it provides functionality for:

All tooling is written in python and easily extensible. Almost everything is written in C89, but we also have some modern C++ features.

Tool Overview

metal.gdb

The metal.gdb tool is the core. It uses the Python API of gdb to run code and obtain detailed information. This allows us to analyse and print values during unit tests without any allocations. Our toolset wraps around this and uses a single breakpoint to provide a variety of functionality, all written as plugins.

Since it is gdb based you can use it with any of those targets:

  • local execution
  • remote server (gdbsever)
  • openocd
  • qemu

Since everything is a gdb plugin, you can use any of the functionality during a debug session, not only standalone.

metal.serial

The serial library provides a light-weight testing tool for environments that do not provide access for a debugger. It does utilize debug symbols, but to a minimal degree. The debug symbols are used in conjunction with a preprocessor to conveniently generate you a binary protocol for uni- or bidirectional communication with the target device, e.g. through a serial port. All you need is a function to write (and maybe receive) bytes you can enjoy the same features as metal.gdb, but without the introspectio.

I wrote two articles so far about how metal.serial works.

Getting started

metal.test is shipped as a pip package, since most is in python.

pip install metal_test

The metal-flags tool allows you get the compiler flags, which you could for example use in your CMake build through execute_process.

metal-flags -I -S gdb

Documentation

The current master Documentation can be found in the wiki.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metal-test-0.2.2.tar.gz (38.2 kB view details)

Uploaded Source

File details

Details for the file metal-test-0.2.2.tar.gz.

File metadata

  • Download URL: metal-test-0.2.2.tar.gz
  • Upload date:
  • Size: 38.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for metal-test-0.2.2.tar.gz
Algorithm Hash digest
SHA256 4811822edda2af248b5b2343bcfe255517002a83ec83790b69ab125ddfbd533a
MD5 134d88b5a932e2389b150abd6bc7b629
BLAKE2b-256 394f40bd806e796cf1c0fb594f0ba1db96dc2b425c31bffb21314c31db46cdd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page