Part Number: AM2632
need to replace the Debugp_assert() with the custom assert so can you help how I do this?? need a step to change function in sdk to add my custom function
--symbol_map to Rename the OriginalYou can tell the TI linker to rename the original function in the library to something else, then provide your own implementation.
Example: Override driver_init() but still call the original.
Linker command:
--symbol_map=driver_init=__real_driver_init
Your code:
#include <stdio.h>
// Declare the renamed original
extern void __real_driver_init(void);
void driver_init(void) {
printf("Custom driver_init override\n");
// Optionally call the original
__real_driver_init();
}
This works because the linker rewrites all references in the library from driver_init → __real_driver_init, leaving your driver_init as the public one.
--undef_sym to Force the Symbol to be UndefinedIf you don’t need to call the original, you can tell the linker to ignore the library’s definition and take yours instead.
Linker command:
--undef_sym=driver_init
Then just define your own:
void driver_init(void) {
// Completely replace the driver init
}Even with CCS, you can view the linker cmd file, you need to apply these changes in your linker command file.
so, all above steps do I need to put in linker file for the function which I need to replace??
I have done these changes in linker.cmd file but after change when i build the project again my all changes get erased from linker file. so not able to validate the same
Hi Madhuri,
Currently linker cmd file is generated by the syscfg, you will need to copy the linker command file manually to your project then disable the linker command linking from syscfg(this will ensure that your changes are not overwritten) and allow only the linker command whch you manually modify to be used.


yes, I have not able see the option to disable it. aslo I wanted to know by doing above steps all is all calls from sdk files also get override ???
oing above steps all is all calls from sdk files also get override ???
Yes this is correct. Please note that this is a fundamental concept of function overriding. It is an old concept.
yes, I have not able see the option to disable it.
Which syscfg version are you using, are you using ccs or standalone syscfg tool?
Please follow the getting started guide as mentioned here- https://software-dl.ti.com/mcu-plus-sdk/esd/AM263PX/latest/exports/docs/api_guide_am263px/GETTING_STARTED.html
You can share specific screenshot to show how you are not able to disable it.
**Attention** This is a public forum