This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28384S: SysConfig (1.10.0+2163) CAN interfaces naming problem

Part Number: TMS320F28384S
Other Parts Discussed in Thread: SYSCONFIG

After updating of SysConfig tool to SysConfig (1.10.0+2163) I've faced with problem of naming CAN interfaces.

I've added two CAN modules and named them as "CAN_A" and "CAN_B". Bellow is the generated BoardCfg.syscfg:

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "F2838x" --package "176pin" --part "F2838x_176pin" --product "C2000WARE@3.01.00.00"
 * @versions {"tool":"1.10.0+2163"}
 */

/**
 * Import the modules used in this configuration.
 */
const can    = scripting.addModule("/driverlib/can.js", {}, false);
const can1   = can.addInstance();
const can2   = can.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
can1.$name                 = "CAN_A";
can1.can.$assign           = "CANA";
can1.can.can_rxPin.$assign = "ball.83";
can1.can.can_txPin.$assign = "ball.84";

can2.$name                 = "CAN_B";
can2.can.$assign           = "CANB";
can2.can.can_rxPin.$assign = "ball.86";
can2.can.can_txPin.$assign = "ball.85";

And a problem part of generated "board.c"

void CAN_init(){

	//CAN_A initialization
	CAN_initModule(CAN_A_BASE);

	// Refer to the Driver Library User Guide for information on how to set
	// tighter timing control. Additionally, consult the device data sheet
	// for more information about the CAN module clocking.
	//
	CAN_setBitTiming(CAN_A_BASE, 15, 0, 15, 7, 3);

	//
	// Start CAN module operations
	//
	CAN_startModule(myCAN0_BASE);

	//CAN_B initialization
	CAN_initModule(CAN_B_BASE);

	// Refer to the Driver Library User Guide for information on how to set
	// tighter timing control. Additionally, consult the device data sheet
	// for more information about the CAN module clocking.
	//
	CAN_setBitTiming(CAN_B_BASE, 15, 0, 15, 7, 3);

	//
	// Start CAN module operations
	//
	CAN_startModule(myCAN0_BASE);
}

So I can't compile my project with error:

Description Resource Path Location Type
#20 identifier "myCAN0_BASE" is undefined board.c /TEST_F28384S/Debug/syscfg line 179 C/C++ Problem
gmake: *** [syscfg/board.obj] Error 1 TEST_F28384S C/C++ Problem

The only acceptable name for 1st CAN module is default:"myCAN0". Any changes of the default name leads to a compile error.

As you can see from "board.c" CAN_init() also has the problem with CAN_startModule. It calls both times with the same argument "myCAN0_BASE" instead of "CAN_B" for second call.

//
// Start CAN module operations
//
CAN_startModule(myCAN0_BASE);

...

//
// Start CAN module operations
//
CAN_startModule(myCAN0_BASE);

As a workaround I've delete all CAN modules and added them again with default names and successfully compiled project.