Hi,
I've attempted upgrading the UIA version we use from uia_1_04_00_06 to uia_2_00_01_34, but our code fails to build with the new UIA version. The following line in our code:
LogSnapshot_writeNameOfReference(h, "Task_create: name=%s", name, std::strlen(name) + 1);
Generates the following errors:
/d/Dev/trunk/Src/Firmware/Sitara/Products/Stem/StemMain.cpp: In function 'void TaskCreateHook(ti_sysbios_knl_Task_Handle, xdc_runtime_Error_Block*)':
c:\TI\uia_2_00_01_34\packages\ti\uia\runtime\LogSnapshot__epilogue.h(142,61): error : 'snapshotId' was not declared in this scope
(ti_uia_runtime_LogSnapshot_writeMemoryBlockWithIdTag(0,snapshotId, fmt, startAdrs, lengthInMAUs) )
^
/c/TI/uia_2_00_01_34/packages/ti/uia/runtime/LogSnapshot__epilogue.h:86:69: note: in definition of macro 'ti_uia_runtime_LogSnapshot_putMemoryRange'
(LogSnapshot__LOGMEMORYFXN(LogSnapshot__LOGOBJ, (evt), (mid), (snapshotId), (fileName), (lineNum), (fmt), (startAdrs), (lengthInMAUs)))
^
/c/TI/uia_2_00_01_34/packages/ti/uia/runtime/LogSnapshot__epilogue.h:142:6: note: in expansion of macro 'ti_uia_runtime_LogSnapshot_writeMemoryBlockWithIdTag'
(ti_uia_runtime_LogSnapshot_writeMemoryBlockWithIdTag(0,snapshotId, fmt, startAdrs, lengthInMAUs) )
^
/c/TI/uia_2_00_01_34/packages/ti/uia/runtime/LogSnapshot.h:358:42: note: in expansion of macro 'ti_uia_runtime_LogSnapshot_writeNameOfReference'
#define LogSnapshot_writeNameOfReference ti_uia_runtime_LogSnapshot_writeNameOfReference
^
/d/Dev/trunk/Src/Firmware/Sitara/Products/Stem/StemMain.cpp:40:2: note: in expansion of macro 'LogSnapshot_writeNameOfReference'
LogSnapshot_writeNameOfReference(h, "Task_create: name=%s", name, std::strlen(name) + 1);
^
Looking into UIAs code, it seems the writeNameOfReference function in new UIA has few issues:
- There is a confusion between refId and snapshotId names.
- In UIA 1.x this function generated a record with ti_uia_events_UIASnapshot_nameOfReference event type, while in UIA 2.x it attempts to generate record with ti_uia_events_UIASnapshot_memoryRange type. Won't that effect/break the CCS System Analyser functionality?
Looking forward for your guidance on how fix this build problem.
Best regards,
Vasili