on a diet

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,611件の閲覧回数
erikmalund
Contributor I

anyone have (preferably using CodeWarrior) a method for finding uncalled functions? (no Keil or IAR available)

ラベル(1)
0 件の賞賛
返信
1 解決策
1,516件の閲覧回数
adriansc
Contributor IV

Hi,

If you want to erase this uncalled functions because they are waste of space in memory all that you need to do is to Remove them in linker options. Go to Project Properties (right click on project) > C/C++ Build > ARM Ltd Windows GCC C Linker > General  and check the box "Remove unused sections" (this one is by default). With this all the uncalled functions will not be linked.

in a diet uncalled functions.png

You can check all the functions, variables and more in .map file (located in FLASH folder) there you can see the size of every function; all the uncalled functions will not have size because are not linked.

In the other hand if you only want to know which functions are uncalled check .map file: functions with size 0x00 are unused functions.

Hope this helps.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,516件の閲覧回数
erikmalund
Contributor I

figured that one out a week ago, your answer, while appreciated, is a bit late

what blew me is that you can "set a breakpoint" in an uncalled function.

with other systems setting a breakpoint is a good way to see if a given function is included.

0 件の賞賛
返信
1,517件の閲覧回数
adriansc
Contributor IV

Hi,

If you want to erase this uncalled functions because they are waste of space in memory all that you need to do is to Remove them in linker options. Go to Project Properties (right click on project) > C/C++ Build > ARM Ltd Windows GCC C Linker > General  and check the box "Remove unused sections" (this one is by default). With this all the uncalled functions will not be linked.

in a diet uncalled functions.png

You can check all the functions, variables and more in .map file (located in FLASH folder) there you can see the size of every function; all the uncalled functions will not have size because are not linked.

In the other hand if you only want to know which functions are uncalled check .map file: functions with size 0x00 are unused functions.

Hope this helps.

0 件の賞賛
返信