Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 4 Forum Discussions

Simon_Chen
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Hi ,

     我们的bootloader和bootloadable的例程产生的bootloader程序和application程序如何合并成一个hex,一次烧录到芯片内?有什么AN或工具么?

Best Regards

Simon

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator
Moderator
10 questions asked 5 questions asked 250 sign-ins

PSoC4 :

直接烧写bootloadable工程生成的hex。

PSoC6:

In, PSoC Creator 4.2, you need to add post_build_core1.bat and line post_build_core1.bat creator ${OutputDir} ${ProjectShortName} to user commands under project Build Settings in app0, to copy the resulting ELF file into the project’s root folder for merging with app1.

Then add below code snippet to the ending of file app1->post_building_core1.bat. This command line enables merging the ELF file copied from app0 into hex file generated for app1.

@rem Merges App0 and App1 into a single hex file for easier programming

%CY_MCU_ELF_TOOL% -M %OUTPUT_DIR%\%PRJ_NAME%%ELF_EXT% ..\App0%ELF_EXT% --

output %OUTPUT_DIR%\%PRJ_NAME%_merged%ELF_EXT% --hex %OUTPUT_DIR%\%PRJ_NAME%.hex

You can refer to ce220960 for details of merging the bootloader and application files.

View solution in original post

1 Reply
LinglingG_46
Moderator
Moderator
Moderator
10 questions asked 5 questions asked 250 sign-ins

PSoC4 :

直接烧写bootloadable工程生成的hex。

PSoC6:

In, PSoC Creator 4.2, you need to add post_build_core1.bat and line post_build_core1.bat creator ${OutputDir} ${ProjectShortName} to user commands under project Build Settings in app0, to copy the resulting ELF file into the project’s root folder for merging with app1.

Then add below code snippet to the ending of file app1->post_building_core1.bat. This command line enables merging the ELF file copied from app0 into hex file generated for app1.

@rem Merges App0 and App1 into a single hex file for easier programming

%CY_MCU_ELF_TOOL% -M %OUTPUT_DIR%\%PRJ_NAME%%ELF_EXT% ..\App0%ELF_EXT% --

output %OUTPUT_DIR%\%PRJ_NAME%_merged%ELF_EXT% --hex %OUTPUT_DIR%\%PRJ_NAME%.hex

You can refer to ce220960 for details of merging the bootloader and application files.