This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

the keil still include unused functions

Hi: i try use keil version 5 build a project, like flash algorithm, a set of functions run in RAM, control by SWD, provide access SoC peripheral. it will use STM32 cube, and it build as lib, set "One ELF Section per Function", "Read-Only Position Independent", "Read-Write Position Independent" in C/C++ table, "Make RW Sections Position Independent" , "Make RO Sections Position Independent" in Linker table. the Major project will use the STM32 cube lib, also set same as above, and set "use Cross-Module optimization", but when compile and linked, i found still have lots of unused function in the image, it seem all the functions in STM32 cube same file included when it has one function used.

As document said, "One ELF Section per Function" mean one elf section for one function, not one file.

BTW, i also use --remove option.

what's wrong of my project setting?