Skip to main content
Pchau.3
Associate
March 14, 2022
Question

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

  • March 14, 2022
  • 2 replies
  • 1149 views

..

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
March 14, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Pchau.3
Pchau.3Author
Associate
March 14, 2022

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.