cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply compiler option like "__attribute__((section(".ram")))" to math.h functions ? Where are actually these functions ?

Pchau.3
Associate II
 
2 REPLIES 2

In the C runtime libraries or as intrinsics?

Y​ou could perhaps manage at an object level in linker script or scatter file.

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

I can only see an option which is checked by default in GCC linker option. (i work on CubeIDE).

0693W00000KcWjnQAF.png-lm is the option to add math library whose name is "libm". I searched libm.* in the pc and i found this:

...\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_2.0.0.202105311346\tools\arm-none-eabi\lib\thumb\v7e-m+fp\hard\libm.a

So this is a static library. But now i dont know how to modify the linker to force this file to be in the ram section.