If a weak function is not defined there will be no linker error...
Yes but I made a default function to be weak
1) it avoids this scenario 2) because mainboard.c function is "strong" multiple accidental uses should produce link error (as opposed of multiple weak functions) 3) same scheme is used by linux kernel ;)
All seems to be fine with this can I get an ack if I test this?
Thanks, Rudolf
Thus, in order to give a board an easy way to define a platform specific (reboot) function in FILO, we used:
void filo_reset_handler(void) { void __attribute__((weak)) platform_reboot(void);
if (platform_reboot) platform_reboot(); else printf("Rebooting not supported.\n");
}
Stefan