We are using HeapMem_alloc() and it requires an "Error_Block" object to catch asserts. We've noticed that we can compile link the code using #include <xdc/runtime/Error.h> without having this in the .cfg file
var Error = xdc.useModule('xdc.runtime.Error')
Will the error module still "work" without the above .cfg file text? What will happen when we use Erro_getCode()?
The rule is: Whenever you need to a module's header in your C code, there should be a corresponding xdc.useModule() call in your CFG script. Sometimes you may get away with breaking this rule, if you are calling xdc.useModule() an another module, which then calls xdc.useModule() on the original module (xdc.runtime.Error in your case).
If you don't call xdc.useModule(), but you are calling the module's functions in your C code, you could get linker errors.
If my reply answers your question please mark the thread as answered.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.