Hi everybody!
I have deloped a bootloader for Kinetis K40 using CW 10.2. The application code has a size of 5 KB but when I check the MAP file I realize there are additional code whose size is up to 7KB more. I know it's neccesary additional functions, but, it's too much code, isn't it? I followed the steps in Optimizing the Kinetis gcc Startup | MCU on Eclipse and I saved about 2KB, but I really need to get rid of more code.
These are the additional functions I've found in the MAP file (some of them too big):
00001558 00000030 .text exit | (libc_Thumb_LE_v7M.a abort_exit.o ) |
00001584 00000000 .text $d | (libc_Thumb_LE_v7M.a abort_exit.o ) |
00001588 00000000 .text $t | (libc_Thumb_LE_v7M.a signal.o ) |
00001588 00000054 .text raise | (libc_Thumb_LE_v7M.a signal.o ) |
000015D8 00000000 .text $d | (libc_Thumb_LE_v7M.a signal.o ) |
000015DC 000000AC .text callHandler | (libc_Thumb_LE_v7M.a float_exception) |
000015DC 00000000 .text $t | (libc_Thumb_LE_v7M.a float_exception) |
00001688 00000024 .text __FSL__fp_handler_32_to_32 | (libc_Thumb_LE_v7M.a float_exception) |
00001688 00000000 .text $t | (libc_Thumb_LE_v7M.a float_exception) |
000016AC 00000024 .text __FSL__fp_handler_64_to_32 | (libc_Thumb_LE_v7M.a float_exception) |
000016AC 00000000 .text $t | (libc_Thumb_LE_v7M.a float_exception) |
000016D0 00000026 .text __FSL__fp_handler_64_to_64 | (libc_Thumb_LE_v7M.a float_exception) |
000016D0 00000000 .text $t | (libc_Thumb_LE_v7M.a float_exception) |
000016F8 0000002C .text __FSL__fp_handler_binary_64_to_64 | (libc_Thumb_LE_v7M.a float_exception) |
000016F8 00000000 .text $t | (libc_Thumb_LE_v7M.a float_exception) |
00001724 00000000 .text $t | (librt_Thumb_LE_v7M.a staticinitializ) |
00001724 00000026 .text __destroy_global_chain | (librt_Thumb_LE_v7M.a staticinitializ) |
00001746 00000000 .text $d | (librt_Thumb_LE_v7M.a staticinitializ) |
0000174C 00000000 .text $t | (librt_Thumb_LE_v7M.a __arm_eabi_init) |
0000174C 0000000C .text _ExitProcess | (librt_Thumb_LE_v7M.a __arm_eabi_init) |
00001754 00000000 .text $d | (librt_Thumb_LE_v7M.a __arm_eabi_init) |
00001758 00000000 .text $t | (librt_Thumb_LE_v7M.a _rt_fp_env_addr) |
00001758 0000000C .text __rt_fp_env_addr | (librt_Thumb_LE_v7M.a _rt_fp_env_addr) |
00001760 00000000 .text $d | (librt_Thumb_LE_v7M.a _rt_fp_env_addr) |
00001764 00000000 .text $t | (librt_Thumb_LE_v7M.a _rt_fp_status_a) |
00001764 0000000C .text __rt_fp_status_addr | (librt_Thumb_LE_v7M.a _rt_fp_status_a) |
0000176C 00000000 .text $d | (librt_Thumb_LE_v7M.a _rt_fp_status_a) |
00001770 00000000 .text $t | (librt_Thumb_LE_v7M.a semihosted_cons) |
00001770 00000010 .text sys_exit | (librt_Thumb_LE_v7M.a semihosted_cons) |
0000177C 00000000 .text $d | (librt_Thumb_LE_v7M.a semihosted_cons) |
00001780 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a _d_add.o ) |
00001780 0000057A .text .text | (FP_fullI_Thumb_LE_v7M.a _d_add.o ) |
00001780 00000000 .text __FSL_d_add | (FP_fullI_Thumb_LE_v7M.a _d_add.o ) |
00001780 00000000 .text __aeabi_dadd | (FP_fullI_Thumb_LE_v7M.a _d_add.o ) |
00001792 00000000 .text __FSL__dadd_start | (FP_fullI_Thumb_LE_v7M.a _d_add.o ) |
00001CE6 00000000 .text $d | (FP_fullI_Thumb_LE_v7M.a _d_add.o ) |
00001CFC 00000000 .text __aeabi_drsub | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
00001CFC 000005F8 .text .text | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
00001CFC 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
00001D14 00000000 .text __aeabi_dsub | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
00001D14 00000000 .text __FSL_d_sub | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
00001D26 00000000 .text __FSL__dsub_start | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
000022E8 00000000 .text $d | (FP_fullI_Thumb_LE_v7M.a _d_sub.o ) |
000022F4 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a _d_mul.o ) |
000022F4 00000734 .text .text | (FP_fullI_Thumb_LE_v7M.a _d_mul.o ) |
000022F4 00000000 .text __FSL_d_mul | (FP_fullI_Thumb_LE_v7M.a _d_mul.o ) |
000022F4 00000000 .text __aeabi_dmul | (FP_fullI_Thumb_LE_v7M.a _d_mul.o ) |
00002A14 00000000 .text $d | (FP_fullI_Thumb_LE_v7M.a _d_mul.o ) |
00002A28 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a _d_itod.o ) |
00002A28 00000000 .text __aeabi_ui2d | (FP_fullI_Thumb_LE_v7M.a _d_itod.o ) |
00002A28 00000000 .text __FSL_dfltu | (FP_fullI_Thumb_LE_v7M.a _d_itod.o ) |
00002A28 00000070 .text .text | (FP_fullI_Thumb_LE_v7M.a _d_itod.o ) |
00002A2A 00000000 .text __FSL__d_utod_common | (FP_fullI_Thumb_LE_v7M.a _d_itod.o ) |
00002A98 00000000 .text __FSL_u32_div_f | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002A98 00000000 .text __aeabi_uidivmod | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002A98 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002A98 00000000 .text __aeabi_uidiv | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002A98 000001EC .text .text | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002A9E 00000000 .text __FSL_u32_div_not_0_f | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002C78 00000000 .text __aeabi_ldiv0 | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002C82 00000000 .text $d | (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o ) |
00002C84 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a _d_dtou.o ) |
00002C84 00000100 .text .text | (FP_fullI_Thumb_LE_v7M.a _d_dtou.o ) |
00002C84 00000000 .text __aeabi_d2uiz | (FP_fullI_Thumb_LE_v7M.a _d_dtou.o ) |
00002C84 00000000 .text __FSL_dfixu | (FP_fullI_Thumb_LE_v7M.a _d_dtou.o ) |
00002D76 00000000 .text $d | (FP_fullI_Thumb_LE_v7M.a _d_dtou.o ) |
00002D84 00000000 .text $t | (FP_fullI_Thumb_LE_v7M.a ieee_status.o ) |
00002D84 00000028 .text .text | (FP_fullI_Thumb_LE_v7M.a ieee_status.o ) |
00002D84 00000000 .text __FSL__ieee_status | (FP_fullI_Thumb_LE_v7M.a ieee_status.o ) |
00002DAA 00000000 .text $d | (FP_fullI_Thumb_LE_v7M.a ieee_status.o ) |
#>00002DB0 ___ROM_AT (linker command file)
Any help? Thank you guys!
Solved! Go to Solution.
Hello Jose,
the additional functions you mentioned look like stuff from the floating point math lib. Do you use floating point arithmetic? And if so, are really in need of it in a bootloader?
If you are using the gcc for compiling you could add "-fdata-sections -ffunction-sections" to the compiling options. It will prevent the placement of unused code in your final application code.
Best regards,
Thomas
Hello Jose,
Could you share please your complete .MAP file? What kind of bootloader are you using?
Thanks.
Hi Santiago, it's a simple bootloader which program the flash memory with a new image. It's allocated at first area of the memory. Here you are the complete MAP file:
# .interrupts
#>00000000 ROM_START (linker command file)
00000000 000001E0 .vectores __vector_tab (main.obj)
00000000 00000000 .vectores .vectores (main.obj)
# .cfmprotect
00000400 00000010 .cfmconfig Config (main.obj)
00000400 00000000 .cfmconfig .cfmconfig (main.obj)
# .program_buff
14000000 00000100 .programbuff programbuffer (flash_kinetis.obj)
14000000 00000000 .programbuff .programbuff (flash_kinetis.obj)
# .relocated
1FFF8000 000001E0 .relocated_vectors ptr_relocated_table (main.obj)
1FFF8000 00000000 .relocated_vectors .relocated_vectors (main.obj)
# .band
1FFF81E0 00000004 .bandera BANDERA (main.obj)
1FFF81E0 00000000 .bandera .bandera (main.obj)
# .app_text
00000500 0000010C .text UART_Initialization (rs232.obj)
00000500 00000000 .text $t (rs232.obj)
0000060C 0000001C .text UART_PutChar (rs232.obj)
0000060C 00000000 .text $t (rs232.obj)
00000628 00000018 .text UART_IsChar (rs232.obj)
00000628 00000000 .text $t (rs232.obj)
00000640 0000001C .text UART_GetChar (rs232.obj)
00000640 00000000 .text $t (rs232.obj)
0000065C 00000000 .text $t (main.obj)
0000065C 00000024 .text JumpTo (main.obj)
0000067C 00000000 .text $d (main.obj)
00000680 00000016 .text Boot_ResetMCU (main.obj)
00000680 00000000 .text $t (main.obj)
00000698 00000000 .text $t (main.obj)
00000698 000007FC .text main (main.obj)
00000E24 00000000 .text $d (main.obj)
00000E94 00000000 .text $t (main.obj)
00000E94 00000094 .text habilitaInt (main.obj)
00000F24 00000000 .text $d (main.obj)
00000F28 0000003A .text deshabilitaInt (main.obj)
00000F28 00000000 .text $t (main.obj)
00000F64 00000000 .text $t (main.obj)
00000F64 000000D8 .text uart5_isr (main.obj)
0000102C 00000000 .text $d (main.obj)
0000103C 00000000 .text $t (main.obj)
0000103C 0000008C .text pit2_isr (main.obj)
000010C0 00000000 .text $d (main.obj)
000010C8 00000000 .text $t (main.obj)
000010C8 0000023C .text init_K40 (main.obj)
000012C4 00000000 .text $d (main.obj)
00001304 00000000 .text $t (flash_kinetis.obj)
00001304 00000058 .text FTFL_Initialization (flash_kinetis.obj)
0000134C 00000000 .text $d (flash_kinetis.obj)
0000135C 00000000 .text $t (flash_kinetis.obj)
0000135C 0000001C .text FTFL_ProgramLongWord (flash_kinetis.obj)
00001370 00000000 .text $d (flash_kinetis.obj)
00001378 00000000 .text $t (flash_kinetis.obj)
00001378 00000096 .text FTFL_ProgramSectionPhrases (flash_kinetis.obj)
00001406 00000000 .text $d (flash_kinetis.obj)
00001410 00000000 .text $t (flash_kinetis.obj)
00001410 0000001C .text FTFL_EraseSector (flash_kinetis.obj)
00001424 00000000 .text $d (flash_kinetis.obj)
0000142C 00000000 .text $t (flash_kinetis.obj)
0000142C 00000032 .text FTFL_EraseBlock (flash_kinetis.obj)
0000145A 00000000 .text $d (flash_kinetis.obj)
00001460 00000016 .text ExecuteOnStackStart (flash_kinetis.obj)
00001460 00000000 .text $t (flash_kinetis.obj)
00001478 00000000 .text $t (flash_kinetis.obj)
00001478 0000006E .text FTFL_FlashCommandSequence (flash_kinetis.obj)
000014DA 00000000 .text $d (flash_kinetis.obj)
000014E8 0000006E .text Send_state (Control_Packets.obj)
000014E8 00000000 .text $t (Control_Packets.obj)
00001558 00000000 .text $t (libc_Thumb_LE_v7M.a abort_exit.o )
00001558 00000030 .text exit (libc_Thumb_LE_v7M.a abort_exit.o )
00001584 00000000 .text $d (libc_Thumb_LE_v7M.a abort_exit.o )
00001588 00000000 .text $t (libc_Thumb_LE_v7M.a signal.o )
00001588 00000054 .text raise (libc_Thumb_LE_v7M.a signal.o )
000015D8 00000000 .text $d (libc_Thumb_LE_v7M.a signal.o )
000015DC 000000AC .text callHandler (libc_Thumb_LE_v7M.a float_exception)
000015DC 00000000 .text $t (libc_Thumb_LE_v7M.a float_exception)
00001688 00000024 .text __FSL__fp_handler_32_to_32 (libc_Thumb_LE_v7M.a float_exception)
00001688 00000000 .text $t (libc_Thumb_LE_v7M.a float_exception)
000016AC 00000024 .text __FSL__fp_handler_64_to_32 (libc_Thumb_LE_v7M.a float_exception)
000016AC 00000000 .text $t (libc_Thumb_LE_v7M.a float_exception)
000016D0 00000026 .text __FSL__fp_handler_64_to_64 (libc_Thumb_LE_v7M.a float_exception)
000016D0 00000000 .text $t (libc_Thumb_LE_v7M.a float_exception)
000016F8 0000002C .text __FSL__fp_handler_binary_64_to_64 (libc_Thumb_LE_v7M.a float_exception)
000016F8 00000000 .text $t (libc_Thumb_LE_v7M.a float_exception)
00001724 00000000 .text $t (librt_Thumb_LE_v7M.a staticinitializ)
00001724 00000026 .text __destroy_global_chain (librt_Thumb_LE_v7M.a staticinitializ)
00001746 00000000 .text $d (librt_Thumb_LE_v7M.a staticinitializ)
0000174C 00000000 .text $t (librt_Thumb_LE_v7M.a __arm_eabi_init)
0000174C 0000000C .text _ExitProcess (librt_Thumb_LE_v7M.a __arm_eabi_init)
00001754 00000000 .text $d (librt_Thumb_LE_v7M.a __arm_eabi_init)
00001758 00000000 .text $t (librt_Thumb_LE_v7M.a _rt_fp_env_addr)
00001758 0000000C .text __rt_fp_env_addr (librt_Thumb_LE_v7M.a _rt_fp_env_addr)
00001760 00000000 .text $d (librt_Thumb_LE_v7M.a _rt_fp_env_addr)
00001764 00000000 .text $t (librt_Thumb_LE_v7M.a _rt_fp_status_a)
00001764 0000000C .text __rt_fp_status_addr (librt_Thumb_LE_v7M.a _rt_fp_status_a)
0000176C 00000000 .text $d (librt_Thumb_LE_v7M.a _rt_fp_status_a)
00001770 00000000 .text $t (librt_Thumb_LE_v7M.a semihosted_cons)
00001770 00000010 .text sys_exit (librt_Thumb_LE_v7M.a semihosted_cons)
0000177C 00000000 .text $d (librt_Thumb_LE_v7M.a semihosted_cons)
00001780 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a _d_add.o )
00001780 0000057A .text .text (FP_fullI_Thumb_LE_v7M.a _d_add.o )
00001780 00000000 .text __FSL_d_add (FP_fullI_Thumb_LE_v7M.a _d_add.o )
00001780 00000000 .text __aeabi_dadd (FP_fullI_Thumb_LE_v7M.a _d_add.o )
00001792 00000000 .text __FSL__dadd_start (FP_fullI_Thumb_LE_v7M.a _d_add.o )
00001CE6 00000000 .text $d (FP_fullI_Thumb_LE_v7M.a _d_add.o )
00001CFC 00000000 .text __aeabi_drsub (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
00001CFC 000005F8 .text .text (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
00001CFC 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
00001D14 00000000 .text __aeabi_dsub (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
00001D14 00000000 .text __FSL_d_sub (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
00001D26 00000000 .text __FSL__dsub_start (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
000022E8 00000000 .text $d (FP_fullI_Thumb_LE_v7M.a _d_sub.o )
000022F4 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a _d_mul.o )
000022F4 00000734 .text .text (FP_fullI_Thumb_LE_v7M.a _d_mul.o )
000022F4 00000000 .text __FSL_d_mul (FP_fullI_Thumb_LE_v7M.a _d_mul.o )
000022F4 00000000 .text __aeabi_dmul (FP_fullI_Thumb_LE_v7M.a _d_mul.o )
00002A14 00000000 .text $d (FP_fullI_Thumb_LE_v7M.a _d_mul.o )
00002A28 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a _d_itod.o )
00002A28 00000000 .text __aeabi_ui2d (FP_fullI_Thumb_LE_v7M.a _d_itod.o )
00002A28 00000000 .text __FSL_dfltu (FP_fullI_Thumb_LE_v7M.a _d_itod.o )
00002A28 00000070 .text .text (FP_fullI_Thumb_LE_v7M.a _d_itod.o )
00002A2A 00000000 .text __FSL__d_utod_common (FP_fullI_Thumb_LE_v7M.a _d_itod.o )
00002A98 00000000 .text __FSL_u32_div_f (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002A98 00000000 .text __aeabi_uidivmod (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002A98 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002A98 00000000 .text __aeabi_uidiv (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002A98 000001EC .text .text (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002A9E 00000000 .text __FSL_u32_div_not_0_f (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002C78 00000000 .text __aeabi_ldiv0 (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002C82 00000000 .text $d (FP_fullI_Thumb_LE_v7M.a _u32_div_f.o )
00002C84 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a _d_dtou.o )
00002C84 00000100 .text .text (FP_fullI_Thumb_LE_v7M.a _d_dtou.o )
00002C84 00000000 .text __aeabi_d2uiz (FP_fullI_Thumb_LE_v7M.a _d_dtou.o )
00002C84 00000000 .text __FSL_dfixu (FP_fullI_Thumb_LE_v7M.a _d_dtou.o )
00002D76 00000000 .text $d (FP_fullI_Thumb_LE_v7M.a _d_dtou.o )
00002D84 00000000 .text $t (FP_fullI_Thumb_LE_v7M.a ieee_status.o )
00002D84 00000028 .text .text (FP_fullI_Thumb_LE_v7M.a ieee_status.o )
00002D84 00000000 .text __FSL__ieee_status (FP_fullI_Thumb_LE_v7M.a ieee_status.o )
00002DAA 00000000 .text $d (FP_fullI_Thumb_LE_v7M.a ieee_status.o )
#>00002DB0 ___ROM_AT (linker command file)
# .app_data
#>1FFF81E8 __exception_table_start__ (linker command file)
# Exception index
1FFF81E8 00000000 Exception Table Index ()
#>1FFF81E8 __exception_table_end__ (linker command file)
#>1FFF81E8 __sinit__ (linker command file)
# Linker generated symbols
1FFF81E8 00000004 static initializer (linker generated)
# .bss
#>1FFF81F0 __START_BSS (linker command file)
1FFF81F0 00000004 .bss ptr_JumpTo (main.obj)
1FFF81F0 00000000 .bss .bss (main.obj)
1FFF81F4 0000000C .bss state_rsp (main.obj)
1FFF8200 00000FA0 .bss pageIndexList (main.obj)
1FFF91A0 00000002 .bss srs_backup (main.obj)
1FFF91A2 00000002 .bss SafetyTimer (main.obj)
1FFF91A4 00000002 .bss RestartTimer (main.obj)
1FFF91A6 00000100 .bss data_buffer (main.obj)
1FFF92A8 00000004 .bss long_var (main.obj)
1FFF92AC 00000004 .bss pageIndexReq (main.obj)
1FFF92B0 00000004 .bss pageIndex (main.obj)
1FFF92B4 00000004 .bss imageSize (main.obj)
1FFF92B8 00000004 .bss downloadComplete (main.obj)
1FFF92BC 00000004 .bss enableFUMode (main.obj)
1FFF92C0 00000004 .bss enableBootMode (main.obj)
1FFF92C4 00000004 .bss length (main.obj)
1FFF92C8 00000004 .bss lastPageSize (main.obj)
1FFF92CC 00000004 .bss program_add (main.obj)
1FFF92D0 00000004 .bss oldFW_add (main.obj)
1FFF92D4 00000004 .bss newFW_add (main.obj)
1FFF92D8 00000004 .bss pageCount (main.obj)
1FFF92DC 00000004 .bss sum (main.obj)
1FFF92E0 00000004 .bss size (main.obj)
1FFF92E4 00000004 .bss i (main.obj)
1FFF92E8 00000004 .bss cont (main.obj)
1FFF92EC 00000004 .bss pageSize (main.obj)
1FFF92F0 00000001 .bss packetByte (main.obj)
1FFF92F4 00000004 .bss firmwareState (main.obj)
1FFF92F8 00000000 .bss .bss (flash_kinetis.obj)
1FFF92F8 00000080 .bss buffer (flash_kinetis.obj)
1FFF9378 00000004 .bss ExecuteOnStack (flash_kinetis.obj)
1FFF937C 0000000C .bss CommandObj (flash_kinetis.obj)
1FFF9388 0000000C .bss pCommandArray (flash_kinetis.obj)
1FFF9394 00000000 .bss .bss (libc_Thumb_LE_v7M.a abort_exit.o )
1FFF9394 00000004 .bss __stdio_exit (libc_Thumb_LE_v7M.a abort_exit.o )
1FFF9398 00000004 .bss __atexit_curr_func_C (libc_Thumb_LE_v7M.a abort_exit.o )
1FFF939C 00000004 .bss __console_exit (libc_Thumb_LE_v7M.a abort_exit.o )
1FFF93A0 00000080 .bss __atexit_funcs_C (libc_Thumb_LE_v7M.a abort_exit.o )
1FFF9420 0000001C .bss signal_funcs (libc_Thumb_LE_v7M.a signal.o )
1FFF9420 00000000 .bss .bss (libc_Thumb_LE_v7M.a signal.o )
1FFF943C 00000004 .bss __global_destructor_chain (librt_Thumb_LE_v7M.a staticinitializ)
1FFF943C 00000000 .bss .bss (librt_Thumb_LE_v7M.a staticinitializ)
1FFF9440 00000000 .bss .bss (librt_Thumb_LE_v7M.a _rt_fp_env_addr)
1FFF9440 00000018 .bss defaultCurrentFPEnvironment (librt_Thumb_LE_v7M.a _rt_fp_env_addr)
1FFF9458 00000000 .bss .bss (librt_Thumb_LE_v7M.a _rt_fp_status_a)
1FFF9458 00000004 .bss FPSCR (librt_Thumb_LE_v7M.a _rt_fp_status_a)
#>1FFF945C __END_BSS (linker command file)
#>00002DB8 _romp_at (linker command file)
# .romp
#>00002DB8 __S_romp (linker command file)
#>1FFFD478 __SP_INIT (linker command file)
#>1FFFD478 __heap_addr (linker command file)
#>00004000 __heap_size (linker command file)
# Memory map:
v_addr p_addr size name
00000000 00000000 000001E0 .interrupts m_interrupts
00000400 00000400 00000010 .cfmprotect m_cfmprotrom
00000500 00000500 000028B0 .app_text m_text
14000000 14000000 00000100 .program_buff m_programbuff
1FFF8000 1FFF8000 000001E0 .relocated m_relocatedvectors
1FFF81E0 1FFF81E0 00000004 .band m_bandera
1FFF81E8 00002DB0 00000008 .app_data m_data
1FFF81F0 1FFF81F0 00001270 .bss m_data
1FFF9460 00002DB8 00000018 .romp m_data
# Link start time: Fri Sep 06 12:02:42 2013
# Link end time: Fri Sep 06 12:02:42 2013
any help?
Hello Jose,
the additional functions you mentioned look like stuff from the floating point math lib. Do you use floating point arithmetic? And if so, are really in need of it in a bootloader?
If you are using the gcc for compiling you could add "-fdata-sections -ffunction-sections" to the compiling options. It will prevent the placement of unused code in your final application code.
Best regards,
Thomas
You are right. I've removed arithmetical operations in my code (like module (%) or exponential) and I saved at least more than 6KB. Thanks for your aswer Thomas!