| Summary: | Configuring a function pointer fails if function signature contains a UInt16 arg | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Brian Cruickshank <brianc.email> |
| Component: | Core | Assignee: | Sasha Slijepcevic <sascha> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | d-russo, dfriedland |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Brian Cruickshank
$externFxn("foo") can only be used to declare the specified function, foo, as follows:
extern void foo();
The errors below suggest that the compiler is refusing to allow the assignment of this type of function pointer to a function pointer of type (void *(ti_uia_stm_LoggerST M_Handle, xdc_runtime_Types_Event, xdc_UInt32, xdc_IArg, xdc_IArg, xdc_IArg, xdc_IArg, xdc_UInt16))
To ensure an exact type match in the generated C file, you can use the following syntax:
var LoggerSTM = xdc.module("ti.uia.stm.LoggerSTM");
LogSnapshot.loggerMemoryRangeFxn = LoggerSTM.writeMemoryRange;
If the function is _not_ defined by a module (e.g., defined in your application's C code), you can use the following:
LogSnapshot.loggerMemoryRangeFxn = "&nameOfMyCFunction";
|