| Summary: | Config warnings from UIA and XDC redefining events | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | David Friedland <dfriedland> |
| Component: | Core | Assignee: | Sasha Slijepcevic <sascha> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | d-russo, sascha, todd_mullanix, vikram.adiga |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | targets: 3.25.00 | ||
|
Description
David Friedland
The generated event IDs are identical for the Log and UIA events because their message strings are identical. As a result, the config tool issues a warning.
Oddly enough, we probably _want_ the ids to be the same:
o no extra space is used if UIA and Log are used in a program,
o tools that process/display these events handle them the same way.
Accept. Decision is that these warnings coming from XDCtools will be off by default. I have the fix in place, but this bug opens up a larger work item. We don't have an established mechanism for enabling/disabling warnings. We have a function $logWarning, which prints warnings unconditionally, and we can't change that. To fix this bug, I added a function $logWarningC with the same signature as $logWarning, except that the new function prints warnings only if the variable environment["xdc.warning"] is true. The map 'environment' can't be changed from the xdc command line, so we will also need a new environment variable XDC_WARNING or similar, or we enable warnings only when XDCOPTIONS=v is set. I'll commit the fix when we resolve these open questions. I'll remove the temporary solution, while the outlines of the permanent solution are: - every warning emitted by xdc packages will have an ID that can be used to suppress that warning - we'll try to find a way for third-party packages to participate too - $logWarning should be extended to allow IDs - IDs are kept either in one place in xdc name space, or in a special module in each package - the current implementation of $logWarning should be kept, but the warnings that do not have an ID won't be suppressible Commited the fix in xdc-z44. The warning is on by default, but it displays an ID, which is the number 4. The ID can be used to suppress the warning: xdc XDC_WARNING_SUPPRESS=4 There is a test ecl.ecl370291 in the xdctest tree that can be used for verification. The environment variable is XDC_WARNINGS_SUPPRESS, not XDC_WARNING_SUPPRESS. Verified for XDCtools 3.25.00.43
I built the test case ecl.ecl370291. The output is as expected (for app1 the warnings are suppressed and app2 the warnings are not suppressed)
making package.mak (because of package.bld) ...
generating interfaces for package ecl370291 (because package/package.xdc.inc is older than package.xdc) ...
translating Mod
cl64P package/package_ecl370291.c ...
archiving package/lib/lib/ecl370291/package/package_ecl370291.o64P into lib/ecl370291.a64P ...
configuring app1.x64P from package/cfg/app1_p64P.cfg ...
cl64P package/cfg/app1_p64P.c ...
configuring app2.x64P from package/cfg/app2_p64P.cfg ...
warning: xdc.runtime.Log: "/db/rtree/library/trees/xdcprod/xdcprod-r43/product/Linux/xdctools_3_25_00_43_eng/packages/xdc/runtime/Log.xs", line 171: xdc.runtime.Log idToInfo: ID=4: Two events with the same id: ecl370291.Mod.start and xdc.runtime.Log.L_start share the msg: 'Start: %$S'. You must reconfigure the message of one of these events to ensure its id will be unique.
cl64P package/cfg/app2_p64P.c ...
cl64P app.c ...
lnk64P app1.x64P ...
cl64P app.c ...
lnk64P app2.x64P ...
all files complete.
Instead of suppressing warning by passing "-Dxdc.warningsSuppress=4" to xsopts of the executable, I passed XDC_WARNINGS_SUPPRESS=4 on command line to xdc command. The output is as expected (the warnings are suppressed for both app1 and app2).
tests/ecl370291> <PATH>/xdctools_3_25_00_43_eng/Linux/xdc XDC_WARNINGS_SUPPRESS=4
making package.mak (because of package.bld) ...
generating interfaces for package ecl370291 (because package/package.xdc.inc is older than package.xdc) ...
translating Mod
cl64P package/package_ecl370291.c ...
archiving package/lib/lib/ecl370291/package/package_ecl370291.o64P into lib/ecl370291.a64P ...
configuring app1.x64P from package/cfg/app1_p64P.cfg ...
cl64P package/cfg/app1_p64P.c ...
configuring app2.x64P from package/cfg/app2_p64P.cfg ...
cl64P package/cfg/app2_p64P.c ...
cl64P app.c ...
lnk64P app1.x64P ...
cl64P app.c ...
lnk64P app2.x64P ...
all files complete.
shipped in 3.25.00.48: http://downloads.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_25_00_48/index_FDS.html. |