cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Combine Dual-application Bootloadable Hex Files for Production Programming– KBA224390

chaitanyav_41
Employee

Combine Dual-application Bootloadable Hex Files for Production Programming– KBA224390

Author: GeonaP_26         Version: **

Translation - Japanese: 量産プログラミング用のデュアルアプリケーションブートローダブルhexファイルを組み合わせ – KBA224390 - Community Translated (JA)

Question:

How do you combine PSoC® Creator™ dual-application bootloadable hex files (PSoC 3, PSoC 4, and PSoC 5LP) for production programming using the command prompt?

Answer:

For production programming and testing, you may need to merge dual-application bootloadable hex files. This will enable the device to be programmed with a combined hex file, which will contain a bootloader and both applications. Follow these steps to merge the hex files using the command prompt:

1.  Open a Command Prompt window.

    • In Windows® XP, click Start and Run, and type cmd.exe.
    • In Windows Vista and Windows 7, click Start, select All Programs and Accessories; double-click Command Prompt
    • In Windows 10, click Start, select Windows System, and double-click Command Prompt.


2. Change the current directory to the folder containing the combined workspace file of the bootloader project. The syntax for the command is: cd "path of the workspace file"—for example:
               cd "C:\Users\geon\Documents\PSoC Creator\TestBootloader"
Note: In this case, the “TestBootloader” folder contains the workspace file (TestBootloader.cywrk).

3. To combine the project, type this command in  command prompt:
“[Path of installation folder of PSoC Creator]\[version of PSoC Creator]\PSoC Creator\bin\cyelftool.exe" -M "[Path of first bootloadable_1.elf file]" "[Path of second bootloadable_2.elf file]" “[Path to save combined hex file]" --flash_size [FlashSize] --flash_row_size [FlashRowSize]

    1. For 32-bit operating systems, the default path of cyelftool is:
      "C:\Program Files\Cypress\PSoC Creator\[version of Creator]\PSoC Creator\bin\cyelftool.exe"
    2. For 64-bit operating systems, the default path of cyelftool is:
      "C:\Program Files (x86)\Cypress\PSoC Creator\[version of Creator]\PSoC Creator\bin\cyelftool.exe"
      Note: Replace [version of PSoC Creator] with the PSoC Creator version for combining, such as “4.1” or “4.2”.

    3. Replace the [FlashSize] with the size of flash in bytes. Substitute [FlashRowSize] with flash row size in bytes—for example, the final command for a 64-bit system and 256 kB (row size = 256 bytes) device could be:
      "C:\Program Files (x86)\Cypress\PSoC Creator\4.2\PSoC Creator\bin\cyelftool.exe" -M "DualApp1.cydsn\ARM_GCC_541\Debug\DualApp1_1.elf" "DualApp2.cydsn\ARM_GCC_541\Debug\DualApp2_2.elf" CombinedHex.hex --flash_size 262144 --flash_row_size 256

4. The CombinedHex.hex file will be available in the workspace folder; in this case, the “TestBootloader” folder (C:\Users\geon\Documents\PSoC Creator\TestBootloader).

5. For more information on the command line merging parameters, type this command:

     “[Path of installation folder of Creator]\[version of Creator]\PSoC Creator\bin\cyelftool.exe" -h
      For example, the final command for a 64-bit system could be:
      "C:\Program Files (x86)\Cypress\PSoC Creator\4.2\PSoC Creator\bin\cyelftool.exe" -h
     Figure 1 shows the command prompt screen combining the hex files.

Figure 1. Command Prompt Screen

Untitled.png

0 Likes
Comments
LinglingG_46
Moderator
Moderator

In the future, could you incorporate the KBA content in AN73854 ?

Because the AN73854 explain how to find the combined hex about the copied bootloadable, and don't tell us where can find how to acquire the combined hex when the customer use different bootloadable projects.

https://www.cypress.com/documentation/application-notes/an73854-psoc-3-psoc-4-and-psoc-5lp-introduct...

Version history
Revision #:
1 of 1
Last update:
‎Jul 09, 2018 12:26 AM
Updated by:
 
Contributors