How to convert bootloader.hex to bootloader.bin without big size

Hi,

       My SDK is 17.0.2

       I add Bootloader function to my project. It works very well. Now, I want to convert bootloader.hex to bootloader.bin but the converted bin file is very large(260MB)

As I know. This is because the hex file contains UICR infomation. I also check below link to solved.

 NOLOAD directive for .uicr_bootloader_start_address and .uicr_mbr_params_page 

But I have two problems

1. I use IAR as build tool for my project, so I don't have .elf file I try to use .out to replaced .elf file as below command. But bootloader.bin size still have 260MB.

arm-none-eabi-objcopy -O binary --remove-section .uicr_bootloader_start_address --remove-section .uicr_mbr_params_page secure_bootloader_ble_s140_pca10056_debug.out bootloader.bin

2. I want to remove SECTION from source code by myself.But I can't find it in which file?

How can I convert hex into bin for my project?

Thank you.

John

Related