-
Notifications
You must be signed in to change notification settings - Fork 4
runner.plugins
The simplest provided plugin is the metal-exitcode
plugin. It is used on an embedded system without an
operating system. In order to use it you need to have an exit function in your code, as provided by
newlib. The function usually looks like this:
void _exit(int code);
The plugin will put a breakpoint into this function and try to take the first value passed, which
will be used as the exit-code of the metal.runner
process.
The exit function must be named _exit
and take an integer as it's first argument.
The newlib syscalls plugin provides the same functionality as [link runner.faq#why-not-semihosting] but does not require you to interact with the debugger.
Stubbing the syscalls allows the embedded program to interact with the console and the filesystem on the host system. Since it is stubbed at the lowest level functions like printf and the C++ objects like std::cout or std::fstream will be usable without visible changes.
[note If you don't use the I/O library in the code otherwise, it might incurr a too large increase in binary size. For this case you can develop custom plugins.]
You need to use the provided stub code (example/metal_newlib_syscalls.c) in your project in order to enable it.
It does stub the system-calls and redirects them into one function call[footnote to minimize the breakpoint usage] in which the plugin sets the breakpoint.
We do not have support for semihosting yet, so this might cause an parser error.
- Overview
- Runner Introduction
- Runner Invocation
- Runner Plugins
- Runner Extender
- Runner FAQ
- Runner Reference
- Unit Introduction
- Unit Tutorial
- Unit FAQ
- Unit Reference
- Calltrace Introduction
- Calltrace Tutorial
- Calltrace FAQ
- Calltrace Plugin
- Calltrace Reference
- Serial Introduction
- Serial Tutorial
- Serial Invocation
- Serial Reference