Adding_Custom_Software - david-macmahon/wiki_convert_test GitHub Wiki
For FPGA designs running TinySH, custom software can be added to be run
from the PowerPC. The first time bee_xps is run on a Simulink design, a
.\design_name\src
directory will be created for you to put your source
files in. On Virtex-II Pro boards (BEE2, IBOB) the software platform
runs on a full PowerPC 405 hard core compiled with gcc, so any kind of
standard C code and libraries will work. The core lacks a floating-point
unit, however, but has floating-point emulation.
The toolflow acts on your source code based on comment lines immediately following the function definition header and before the opening brace. For example:
void function_name ()
/* toolflow directives */
{
function body
.
.
.
}
To make the function a command accessible from the TinySH command prompt toolflow directives should be:
void function_name (int argc, char **argv)
/* command = "command_name" */
/* help = "command description displayed with '?'" */
/* params = "
" */
{
.
.
.
}
To have the function called at power-up initialization toolflow directives should be:
void function_name ()
/* init */
{
.
.
.
}
To have the function loop continuously toolflow directives should be:
void function_name ()
/* repeat */
{
.
.
.
}