Hi jayheng,
Unfortunately I've run into another issue with the MCU Boot Utility. If I flash my application into my board using JTAG (via SEGGER pod), everything is fine. But if I use the MCU Boot Utility, it looks like it alters some of the header information in my image, and the target no longer boots after setting BOOT_MODE back to Internal Boot. Reflashing the unit again through the SEGGER pod works fine.
I've attached the files I'm working with.
I've done a full 1MB extract and compare of the flash before and after the MCU Boot Utility touches the board, and the only difference is in the first few KB; the application code is intact. When the debugger reflashes the target, it does so fairly quickly, hinting it's only erasing and rewriting the first page or two.
Why is the utility altering my header information, to the point where it doesn't work anymore? Are you able to tell exactly what it's changing? Is there any additional information you need? I've been able to reflash our custom board through USB successfully in the past, so I'm not sure what's broken now. Thanks.
David R.
Solved! Go to Solution.
Hi David,
There are two ways to flash application image by MCUBootUtility.
#1 Set image file (srec/hex/bin/axf/elf) path in "Application Image File" input box and click "All-In-One Action" button
#2 Set image file (only bin file) path in "Bin File" input box and click "Write (Auto Erase)" button
There are below differences between these two ways:
1). #2 can only flash bootable image (with FDCB, IVT, BootData header), and the format must be binary (.bin). #1 can flash both raw image (only app, no header) and bootable image, and the format is unlimited.
2). If provided image file is bootable image, #2 just flash this bootable image without any changes. #1 will only keep app and DCD, for FDCB, IVT, BootData, Tool will try to re-generate them according to settings in 'Boot Device Configuration' and image self
so for your case, you can use #2 to flash image or set 'Boot Device Configuration' properly before using #1
Best Regards,
Jay
Thanks, Method 2 is what I'm after. I followed your steps (I left Start/Offset at 0x0, it was fine), gave it my BIN file, and it programmed fine. Changed the boot jumper, power-cycled the target, and it worked fine. Thanks for your help.
David Rodgers
If you decide to use #2, You need to set 'Run Mode' to Master in Tool menu
Hi David,
There are two ways to flash application image by MCUBootUtility.
#1 Set image file (srec/hex/bin/axf/elf) path in "Application Image File" input box and click "All-In-One Action" button
#2 Set image file (only bin file) path in "Bin File" input box and click "Write (Auto Erase)" button
There are below differences between these two ways:
1). #2 can only flash bootable image (with FDCB, IVT, BootData header), and the format must be binary (.bin). #1 can flash both raw image (only app, no header) and bootable image, and the format is unlimited.
2). If provided image file is bootable image, #2 just flash this bootable image without any changes. #1 will only keep app and DCD, for FDCB, IVT, BootData, Tool will try to re-generate them according to settings in 'Boot Device Configuration' and image self
so for your case, you can use #2 to flash image or set 'Boot Device Configuration' properly before using #1
Best Regards,
Jay