Hi all,
I want to overwrite the weak systick_handler function for a stm32f745 chip - it is labeled as weak in the Src\startup_stm32f745xx.s(258) : EXPORT SysTick_Handler [WEAK]
startup file, but when I try to overwrite it anywhere else
(using the extern "C" configuration)
I get this: Error: L6200E: Symbol SysTick_Handler multiply defined (by irq_cm4f.o and gpio_base.o)
NOTE: I cannot edit the startup file, it is locked to my project.
Am I missing something else?
Thanks,
nmcq
If you are still getting the same duplicate function error, then the .o file still has the function in it. Make sure if you remove it from the .s file, that the .o file is getting regenerated using the updated file AND the linker is using this updated .o file.
Hi Robert,
Yep, but I am still getting these errors even after cleaning my project. I have found that the Systick_Handler is still being referenced in the \AppData\Local\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\Library\ARM\RTX_CM4F.lib, but I don't want to modify that library since I can't read most of it (shows up as NULL or junk characters in my Visio)
In general, RTX_CM4F.lib needs to be in control of the Systick_Handler or the OS will not function properly. Since this is a separate library, you would need to rebuild the library to remove the Systick_Handler that is contained within it. It is not rebuilt based on you rebuilding your project.
If you want to use the OS, then I would not attempt to make any changes to the Systick_Handler that the OS provides until you understand more. Once you understand more, you will probably decide that it is just not a good idea to make any changes to this.
Mm yes I see - yeah I'd rather not mess with it until I actually know what I'm doing with it. I assume that this would occur then for any weak function that STM provides. How are we supposed to overwrite those functions then? Supposedly we should be able to, but then we would constantly get impeded by this.
Update: for this project I don't require the RTOS, so disabling that library fixed my issue.
Thank you for coming back and sharing the solution you found.