motor-control-sdk/.project/cgt/cgt_ti-c6000.js
Naresh A 5599e4387e am64x/am243x/am263x : remove MCU_PLUS_SDK_PATH variable from repository
remove MCU_PLUS_SDK_PATH variable from repository

Fixes: PINDSW-5635

Signed-off-by: Naresh A <nareshk@ti.com>
2023-07-11 11:23:31 +05:30

151 lines
2.8 KiB
JavaScript

const common = require(`../common.js`);
const cgt_common = {
path: "CGT_TI_C6000_PATH",
cc: "cl6x",
ar: "ar6x",
lnk: "lnk6x",
strip: "strip6x",
objcopy: "",
includes: {
common: [
"${CG_TOOL_ROOT}/include",
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source",
"${MOTOR_CONTROL_SDK_PATH}/source",
],
},
cflags: {
common: [
"-mv6600",
"--abi=eabi",
"-q",
"-mi10",
"-mo",
"-pden",
"-pds=238",
"-pds=880",
"-pds1110",
"--emit_warnings_as_errors",
],
debug: [
"-D_DEBUG_=1",
],
release: [
"--program_level_compile",
"-o3",
"-mf3",
],
},
arflags: {
common: [
"rq",
],
},
lflags: {
common: [
"--warn_sections",
"--emit_warnings_as_errors",
"--rom_model",
"-x",
],
},
libdirs: {
common: [
"${CG_TOOL_ROOT}/lib",
],
},
libs: {
common: [
"libc.a",
],
},
};
const cgt_common_awr294x = {
path: "CGT_TI_C6000_PATH",
cc: "cl6x",
ar: "ar6x",
lnk: "lnk6x",
strip: "strip6x",
objcopy: "",
includes: {
common: [
"${CG_TOOL_ROOT}/include",
"${MOTOR_CONTROL_SDK_PATH}/mcu_plus_sdk/source",
"${MOTOR_CONTROL_SDK_PATH}/source",
],
},
cflags: {
common: [
"-mv6600",
"--c99",
"-q",
"-mo",
"-pden",
"--emit_warnings_as_errors",
"--mem_model:const=data",
"--mem_model:data=far_aggregates",
"--remove_hooks_when_inlining",
"-on2",
"--disable_push_pop",
"--fp_mode=relaxed",
"--assume_control_regs_read",
],
debug: [
"-D_DEBUG_=1",
],
release: [
"--program_level_compile",
"-o3",
"-mf2",
],
},
arflags: {
common: [
"rq",
],
},
lflags: {
common: [
"--warn_sections",
"--emit_warnings_as_errors",
"--ram_model",
"-x",
],
},
libdirs: {
common: [
"${CG_TOOL_ROOT}/lib",
],
},
libs: {
common: [
"libc.a",
],
},
};
function getCgtOptions(cpu, device)
{
let cgtOptions = {};
if(device.match(/awr294x*/))
{
cgtOptions = cgt_common_awr294x;
}
else
{
cgtOptions = cgt_common;
}
return cgtOptions;
}
module.exports = {
getCgtOptions,
};