This section describes a simple walk-through of the process used to build, load, and run a function that is defined in a dynamic library.
hello.c:
#include <stdio.h>
__declspec(dllexport) int start();
int start()
{
printf("Hello World\n");
return 0;
}
cl6x -mv6400+ hello.c -z --import=printf --dynamic=lib -o hello.dlldl6x.6x -e start
RIDL> base_image dl6x.6xRIDL> load hello.dllRIDL> execute
You should see the "Hello World" message displayed and then control will return to the RIDL prompt. To terminate the dynamic loader you can enter the exit command from the RIDL prompt.
For more details, see the Dynamic Loader wiki article (https://processors.wiki.ti.com/index.php/C6000_Dynamic_Loader).