Other Parts Discussed in Thread: SYSBIOS
Hello all,
I have made a RTSC package for math functions using the fastFPUmath library in control suit. The new package is building properly in the command window. For testing this package i imported this package to my sysbios project. I am getting unresolved symbol errors when i build my project in ccs. I am attaching the console output, math package, test program in ccs and the problems tab.
/*
* ======== systcs/math/package.bld ========
*/
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var Pkg = xdc.useModule('xdc.bld.PackageContents');
var LIB_NAME = "lib/" + Pkg.name;
var LIB_SRCS = ["Math.c"];
for each (var targ in Build.targets) {
Pkg.addLibrary(LIB_NAME, targ, {incs: "-I D:/ti/ccsv5/tools/compiler/c2000_6.1.0/include"}).addObjects(LIB_SRCS);
}
/*
* ======== systcs/math/Math.c ========
*/
#include <math.h>
#include "package/internal/Math.xdc.h"
Float Math_abs(Float X)
{
return (X>0.0?X:-X);
}
Float Math_sqrt(Float X)
{
return sqrt(X);
}
Float Math_atan(Float X)
{
return atan(X);
}
Float Math_atan2(Float X, Float Y)
{
return atan2(X,Y);
}
Float Math_cos(Float X)
{
return cos(X);
}
Float Math_sin(Float X)
{
return sin(X);
}
/*
* ======== systcs/math/Math.xdc========
*/
/*! Collection of math functions */
module Math {
/*! Absolute value */
Float abs(Float X);
/*! Square root */
Float sqrt(Float X);
/*! atan */
Float atan(Float X);
/*! atan2 */
Float atan2(Float X, Float Y);
/*! sin */
Float sin(Float X);
/*! cos */
Float cos(Float X);
};
}
/*
* ======== systcs/math/package.xdc ========
*/
/*! Collection of math functions */
package systcs.math {
module Math;
};
/*
* ======== systcs/math/package.xs ========
*/
function getLibs() {
return ("C:/ti/controlSUITE/libs/math/FPUfastRTS/V100/lib/rts2800_fpu32_fast_supplement.lib");
}
/*
* ======== config.bld ========
*/
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
var C28_float = xdc.useModule('ti.targets.C28_float');
/* modify to match %c2xtools% */
C28_float.rootDir = "D:/ti/ccsv5/tools/compiler/c2000_6.1.0";
C28_float.platform = 'ti.platforms.concertoC28:F28M35H52C1';
Build.targets = [C28_float];
As you can see "all files completed" from the concole
now for testing this package, I added the repository directory to my CCS 5 project. I am receiving few unresolved symbol errors when i build the project
I am using Concerto Experimenter Kit F28M35H52C1, and my project sysconDSP is running on the DSP side of the concerto, withsysbios V. 6.33.4.39
the compiler used is c2000_6.1.0
I am attaching my sysconDSP_main.c, which contains the code to test the Math functions in the Math package i just created.
/*
* ======== main.c ========
*/
#include <xdc/std.h>
#include <xdc/runtime/Types.h>
#include <xdc/runtime/Error.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Task.h>
/* Systcs Header file */
//#include "systcs_Robot.h"
#include <systcs/math/Math.h>
/*
* ======== main ========
*/
Void main()
{
float x_abs=-2.75,x_sqrt= 16.0, x_cos = 1.0472, x_sin = 0.5236, x_atan = 0.7854;
volatile float y_abs_Math = 0.0, y_sqrt_Math = 0.0, y_sin_Math = 0.0, y_cos_Math = 0.0, y_atan_Math = 0.0;
y_abs_Math=Math_abs(x_abs);
y_sqrt_Math=Math_sqrt(x_sqrt);
y_atan_Math = Math_atan(x_atan);
y_sin_Math= Math_sin(x_sin);
y_cos_Math= Math_cos(x_cos);
// IPCInit ();
BIOS_start(); /* enable interrupts and start SYS/BIOS */
}
When i try to build the following i get few unresolved symbol errors , I am attaching screen shot of the "Problems" tab
Regards
Ragesh S. Kutty

