cancel
Showing results for 
Search instead for 
Did you mean: 

WEAK references in startup_.s not working?

ajcurtis84
Associate II

Hello,

All of the interrupt handling routines in startup_stm32f765xx.s are marked as WEAK linker references. However it appears that some routines can not be overwritten. SysTick_Handler (sorry) is one of those. There are many solutions posted in the forums to address duplicate function references but it appears to me that this should not be an issue.

Is there a problem with the toolchain? It seems like every time I start a new project I need to lookup these work arounds.

TIA

Allen

4 REPLIES 4

What's the actual error you're getting?

Code might also be in stm32f7xx_it.c

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

The latest toolchain in STM32CubeIDE shouldn't have this issue when building normal (non-library) programs.

What is the actual behavior you see? Error during compiling? Program not working right? Details help.

If you feel a post has answered your question, please click "Accept as Solution".

Hello,

If CubeMX is configured to generate the IRQ template for SysTick_Handler, you get a multiply defined during link. (stm32f7xx_it.c) This should not happen with WEAK references.

I am not using STM32CubeIDE. I am using Keil.

Thanks

You don't mention CubeIDE, CubeMX or KEIL in your post, this will cause most to assume the former.

What is the actual reported from the tools? Your interpretation of them while helpful, is incomplete. The build log would be place to look.

Show the related sources, of the files the compiler is working with, and the linker is objecting.

startup.s has weak definitions, the stm32fxxx_it.c typically does not.

Don't under under estimate CubeMX's ability to build the project incorrectly, miss files, or for Keil to pull files and chip associativity from it's Packs or copies of the HAL

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..