cancel
Showing results for 
Search instead for 
Did you mean: 

Cosmic, compile without unused code

FLast.19.71
Associate II
Posted on October 10, 2016 at 15:13

Hi,

I made a primitive program that calls few functions of Standard Peripheral Library / CLK and GPI modules, so source files  stm8s_clk.c + stm8s_gpio.c were added to project.

After compilation I checked .map file and found that code contains ALL functions of these modules, despite most of them are never called.

What needs to be done in order to not compile unused functions ?

2 REPLIES 2
hjs
Associate II
Posted on October 13, 2016 at 08:38

Hi !

Just try +split compiler flag...

FLast.19.71
Associate II
Posted on October 17, 2016 at 11:13

Thanks HaJo, it does what I needed.