您好!
我正在尝试将一个旧的旧旧项目从 IAR 移植到 GCC。 我已经成功了、但即使在 IAR 中、代码大小也存在问题-我们的闪存几乎已满。 但是对于 gcc、我必须禁用部分应用程序才能完成链接。 主要原因可能是库函数的大小。
这些来自 IAR。 总尺寸约为1650。
352 FUNC GLOBAL DEFAULT ABS _Add32f 304 FUNC GLOBAL DEFAULT ABS _Div32f 272 FUNC GLOBAL DEFAULT ABS _Mul32f 126 FUNC GLOBAL DEFAULT ABS _Cast32uto32f 50 FUNC GLOBAL DEFAULT ABS _Cast32fto32s 28 FUNC GLOBAL DEFAULT ABS _make_new_mem_hole 16 FUNC GLOBAL DEFAULT ABS __data16_memzero 4 FUNC GLOBAL DEFAULT ABS __data16_memcpy 4 FUNC GLOBAL DEFAULT ABS _Sub32f 4 FUNC GLOBAL DEFAULT ABS __program_start 2 FUNC GLOBAL DEFAULT ABS __exit 0 FUNC GLOBAL DEFAULT ABS _exit 0 FUNC GLOBAL DEFAULT ABS _STACK_SIZE 0 FUNC GLOBAL DEFAULT ABS _HEAP_SIZE 0 FUNC GLOBAL DEFAULT ABS _SYS_RAM_END 0 FUNC GLOBAL DEFAULT ABS _APP_RAM_START 0 FUNC GLOBAL DEFAULT ABS _USER_EE_END 0 FUNC GLOBAL DEFAULT ABS _APP_INTERN_START 86 FUNC GLOBAL DEFAULT ABS ?FLT_GE 82 FUNC GLOBAL DEFAULT ABS ?FLT_LT 76 FUNC GLOBAL DEFAULT ABS ?FLT_Extract 48 FUNC GLOBAL DEFAULT ABS ?DivMod16s 46 FUNC GLOBAL DEFAULT ABS ?Mul16to32u 46 FUNC GLOBAL DEFAULT ABS ?Mul16 24 FUNC GLOBAL DEFAULT ABS ?DivMod16u 16 FUNC GLOBAL DEFAULT ABS ?cstart_init_copy 12 FUNC GLOBAL DEFAULT ABS ?ShiftRight16s 12 FUNC GLOBAL DEFAULT ABS ?cstart_init_zero 8 FUNC GLOBAL DEFAULT ABS ?Epilogue3 8 FUNC GLOBAL DEFAULT ABS ?cstart_call_main 4 FUNC GLOBAL DEFAULT ABS ?Mul8 4 FUNC GLOBAL DEFAULT ABS ?cstart_begin 2 FUNC GLOBAL DEFAULT ABS ?Epilogue6 2 FUNC GLOBAL DEFAULT ABS ?Epilogue5 2 FUNC GLOBAL DEFAULT ABS ?Epilogue4 2 FUNC GLOBAL DEFAULT ABS ?C_EXIT 0 FUNC GLOBAL DEFAULT ABS ?cstart_end
对于 gcc、它们有9000多个。
1398 FUNC LOCAL DEFAULT 74 _fpadd_parts 1308 FUNC GLOBAL HIDDEN 74 __mspabi_mpyd 650 FUNC GLOBAL HIDDEN 74 __pack_d 606 FUNC GLOBAL HIDDEN 74 __mspabi_mpyf 568 FUNC LOCAL DEFAULT 74 _fpadd_parts 374 FUNC GLOBAL HIDDEN 74 __unpack_d 368 FUNC GLOBAL HIDDEN 74 __pack_f 334 FUNC GLOBAL HIDDEN 74 __mspabi_divf 258 FUNC GLOBAL DEFAULT 74 _malloc_r 254 FUNC GLOBAL DEFAULT 74 _free_r 252 FUNC GLOBAL HIDDEN 74 __unpack_f 234 FUNC GLOBAL HIDDEN 74 __fpcmp_parts_d 180 FUNC GLOBAL HIDDEN 74 __fpcmp_parts_f 166 FUNC GLOBAL HIDDEN 74 __mspabi_fixdli 148 FUNC GLOBAL HIDDEN 74 __mspabi_fltulf 146 FUNC GLOBAL HIDDEN 74 __mspabi_fixfli 112 FUNC GLOBAL HIDDEN 74 __gedf2 108 FUNC GLOBAL HIDDEN 74 __mspabi_cvtdf 106 FUNC GLOBAL HIDDEN 74 __mspabi_subd 104 FUNC GLOBAL HIDDEN 74 __mspabi_fltuld 104 FUNC GLOBAL DEFAULT 74 _raise_r 102 FUNC GLOBAL HIDDEN 74 __mspabi_addd 92 FUNC GLOBAL HIDDEN 74 __mspabi_fixdul 92 FUNC GLOBAL HIDDEN 74 __mspabi_cvtfd 90 FUNC GLOBAL DEFAULT 74 _realloc_r 84 FUNC GLOBAL HIDDEN 74 __gesf2 84 FUNC GLOBAL HIDDEN 74 __gtsf2 82 FUNC GLOBAL HIDDEN 74 __ltsf2 82 FUNC GLOBAL HIDDEN 74 __mspabi_subf 78 FUNC GLOBAL HIDDEN 74 __mspabi_addf 76 FUNC GLOBAL HIDDEN 74 __clzsi2 62 FUNC GLOBAL HIDDEN 74 __fixunssfsi 58 FUNC GLOBAL HIDDEN 74 __make_fp 52 FUNC GLOBAL HIDDEN 74 __make_dp 48 FUNC GLOBAL HIDDEN 74 __mspabi_divi 48 FUNC GLOBAL DEFAULT 74 _sbrk 44 FUNC GLOBAL DEFAULT 74 __crt0_run_smi_location_init_array 36 FUNC GLOBAL DEFAULT 74 _kill_r 34 FUNC GLOBAL DEFAULT 74 _sbrk_r 24 FUNC GLOBAL DEFAULT 74 __umulhisi2 20 FUNC GLOBAL DEFAULT 74 __crt0_movedata 20 FUNC GLOBAL DEFAULT 74 __mulhi2 20 FUNC GLOBAL DEFAULT 74 _malloc_usable_size_r 14 FUNC GLOBAL DEFAULT 74 __crt0_init_bss 8 FUNC GLOBAL HIDDEN 74 __mspabi_divu 8 FUNC GLOBAL HIDDEN 74 __mspabi_remu 6 FUNC GLOBAL DEFAULT 74 __crt0_call_main 6 FUNC GLOBAL DEFAULT 74 _getpid_r 6 FUNC GLOBAL DEFAULT 74 __errno 4 FUNC WEAK DEFAULT 74 _exit 4 FUNC GLOBAL DEFAULT 74 __crt0_start 0 FUNC GLOBAL DEFAULT 74 __mspabi_mpyi 0 FUNC GLOBAL DEFAULT 74 __mspabi_mpyul_hw 0 FUNC GLOBAL DEFAULT 74 __mspabi_mpyul 0 FUNC GLOBAL DEFAULT 74 __mspabi_mpyi_hw
是否有任何简单的解决方案? 我猜至少部分函数是浮点支持、但快速测试显示、即使我从应用程序中删除了所有浮点值、它们也是链接的。
BR
1月

