公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

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

cross mob
Simon_Chen
Level 3
Level 3
Distributor - Weikeng(GC)
10 replies posted 10 questions asked 10 sign-ins

Hi ,

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

Best Regards

Simon

0 点赞
1 解答
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

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.

在原帖中查看解决方案

1 回复
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

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.