Hello Kerry Zhou,
Thanks for your reply. I will follow your advice to try the KBOOT MDK tower version.
For the current bootloader code size is as below:
Total RO Size (Code + RO Data) 2200 ( 2.15kB)
Total RW Size (RW Data + ZI Data) 2248 ( 2.20kB)
Total ROM Size (Code + RO Data + RW Data) 2208 ( 2.16kB)
I choose this version because its code size is samll enough(around 2K), for our product is using KL16Z64 in witch a protocol stack have used more than 30K, so I have to limit the bootloader size . I did test the KBOOT for a quick look with the target KL25Z4,I modified the bootloader_config.h as be low, and the preprocessor symbles deine: BL_FEATURE_MIN_PROFILE,NDEBUG,USB_STACK_BM, CPU_MKL25Z64VLK4, CPU_IS_ARM_CORTEX_M0P=1, TOWER, BL_TARGET_FLASH (I can't remove the USB_STACK_BM or it will complie error)
#if !defined(BL_CONFIG_UART)
#define BL_CONFIG_UART (1)
#endif
#if !defined(BL_CONFIG_I2C)
#define BL_CONFIG_I2C (0)
#endif
#if !defined(BL_CONFIG_SPI)
#define BL_CONFIG_SPI (0)
#endif
#if !defined(BL_CONFIG_USB_HID)
#define BL_CONFIG_USB_HID (0)
#endif
#if !defined(BL_CONFIG_USB_MSC)
#define BL_CONFIG_USB_MSC (0)
#endif
Then I got the result -- Program Size: Code=8580 RO-data=1608 RW-data=384 ZI-data=5552
This size is larger than I expected.
Can you tell me the approximate code size with only UART supported in KBOOT?
BTW, when I use the IAR project in KBOOT, it shows errors
IAR ELF Linker V8.22.1.15669/W32 for ARM
Copyright 2007-2018 IAR Systems AB.
Error[Li005]: no definition for "__iar_small___aeabi_uidivmod" [referenced from xprintftiny.o(dl6M_tln.a)]
Error[Li005]: no definition for "__iar_small___aeabi_uidiv" [referenced from xprintftiny.o(dl6M_tln.a)]
Error while running Linker
Total number of errors: 2
I think it maybe due to my IAR version
=== Install subdirectory: arm ===
IAR Project Converter
4.00.2 (4.0.2.230)
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\ConvertToIAR.exe
22/Feb/2018 13:24:14, 686080 bytes
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\het470.exe
22/Feb/2018 10:05:20, 212992 bytes
IAR Archive Tool
10.2.5.200 (10.2.5.200)
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\iarchive.exe
21/Feb/2018 02:25:38, 1297408 bytes
IAR Assembler for ARM
8.22.1.15669 (8.22.1.15669)
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\iasmarm.exe
21/Feb/2018 02:25:38, 1914368 bytes
IAR C/C++ Compiler for ARM
8.22.1.15669 (8.22.1.15669)
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\iccarm.exe
21/Feb/2018 02:25:38, 22944768 bytes
IAR C-STAT Checks Manifest Handler
1.5.2.316 (1.5.2.316)
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\ichecks.exe
25/Jan/2018 01:07:32, 852992 bytes
IAR C-STAT Command Line Interface
1.5.2.316 (1.5.2.316)
C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\icstat.exe
25/Jan/2018 01:07:34, 955392 bytes
IAR ELF Dumper for ARM
8.22.1.15669 (8.22.1.15669)